## WeBWorK Problems

### What's wrong with this problem?!

by Jason Aubrey -
Number of replies: 1

Hi all,

In the problem below, the first answer blank is supposed to only accept $R1*$c-$R2*Q/($V-2*t) but it seems to also accept $R1*$c-$R2*Q/($V + 2*t) and $R1*$c-$R2*Q/($V). Any ideas about what is going on?

Thanks,

Jason

## DESCRIPTION

## First order ODEs: Applications

## ENDDESCRIPTION

## DBsubject(Differential equations)

## DBchapter(First order differential equations)

## DBsection(Application)

## Date(01/01/2012)

## Institution(University of Arizona)

## Author(May Yeap)

## KEYWORDS('differential equations','newtonian mechanics','first order', 'linear')

##############################

# Initialization

DOCUMENT();

"PGstandard.pl",

"MathObjects.pl",

"PGunion.pl",

"PGcourse.pl",

"PGbasicmacros.pl",

"PGML.pl",

"contextPiecewiseFunction.pl"

);

TEXT(beginproblem());

#############################

# Setup

$c = random(1.1,5,0.2);$R1 = random(3,7,1);

$R2 = Compute("$R1+2");

$V = random(100,1000,20);$answer1 = Compute("$R1*$c-$R2*Q/($V-2*t)");

$answer2 = Compute("($c*$R1)*(-2*t+((1-2*t/$V)**($R2/2))*(-$V)+$V)/(-2+$R2)");

$answer3 = Compute("$V/2");

#############################

# Main text

BEGIN_PGML

A tank initially contains [$V] gal of pure water. Brine containing [$c] lb/gal of salt is poured into the tank at a rate of [$R1] gal/min. Suppose the solution in the tank is instantly well mixed and drained out at a rate of [$R2] gal/min.

Let [Q=Q(t)] be the quantity of salt in the tank at time [t] minutes.

What is the initial condition?

[Q(0)=][___________]{"0"}[lb]

Set up the differential equation for the quantity of salt in the tank:

[Q^{\, \prime}=][__________________]{$anwser1->cmp} lb/min. Find the particular solution: [Q(t)=][__________________]{$answer2->cmp} lb.

When does this differential equation become invalid?

[t=][_______________]{$answer3->cmp} min. END_PGML ############################## # Answer evaluation$showPartialCorrectAnswers = 1;

ENDDOCUMENT();

The problem is most likely that $V is too big and$t is too small. Try setting the limits for the variable t to be something like [300,400], that will make expressions like $V +$t significantly different than $V-$t. I'll bet that something like the line below should fix the problem.
Context()->variables->set(t=>{limits=>[300,400]});