Math 215 Sec. 201
Solutions to First Midterm
Feb 8, 2002


1.     [ 6 pts ]     The direction field of a differential equation $y' = f(x,y)$ is shown below. Sketch the isocline $f(x,y) = 0$ and the solution curve with $y(0) = -1$. Will they meet?

The isocline is shown in red and the solution curve in blue.

They will not meet (unless the isocline unexpectedly takes a downward turn somewhere to the left of the part that is shown).

2.     [ 12 pts ]     For what value of the constant $p$ is the differential equation

\begin{displaymath}2 x + py + (2 x + 3 y) {dy\over dx} = 0\end{displaymath}

exact? Using this $p$, find (in implicit form) the solution that satisfies the initial condition $y(2)=4$.

The test for exactness is $\partial M/\partial y = \partial N/\partial x$. With $M = 2 x + p y$ and $N = 2 x + 3 y$, that is $p = 2$.

With $p = 2$, the solution is $F(x,y) = c$ where $\displaystyle F(x,y) = \int M(x,y)\, dx = \int (2 x + 2 y)\, dx = x^2 + 2 x y + h(y)$. Then $\displaystyle \partial F/\partial y = 2 x + h'(y) = N = 2 x + 3 y$, so $h'(y) = 3 y$. Note that this depends only on $y$ - if it didn't, we'd know that we'd made a mistake somewhere. Then $h(y) = 3 y^2/2$. From the initial condition, $c = F(2,4) = 44$, so the solution (in implicit form) is $x^2 + 2 x y + 3 y^2/2 = 44$.

3.     [ 12 pts ]     A tank initially contains 200 litres of fresh water. Then a salt solution of unknown concentration is poured into the tank at a steady rate of 2 litres per minute, and the well-stirred mixture is drained out at the same rate. After 120 minutes the concentration of salt in the tank is 15 grams per litre. What is the concentration of the salt solution entering the tank?

The volume of liquid in the tank is constant. Salt enters the tank at a rate of $2 x$ grams per minute, where $x$ is the concentration of the solution entering the tank. The differential equation for the amount $Q$ of salt in the tank is

\begin{displaymath}
{dQ\over dt} = 2 x - 2{Q\over 200} = 2 x - {Q\over 100}
\end{displaymath}

and the initial condition is $Q(0)=0$. The integrating factor is $\mu(t) = \exp(t/100)$, and the general solution is $\displaystyle Q = 200 x + C \hbox{e}^{-t/100}$. From the initial condition we then get $C = -200 x$. At $t=120$ we should have $Q = 15 \times 200 = 3000$, so $3000 = 200 x (1 - \hbox{e}^{-1.2})$. The answer is $\displaystyle x = 15/(1 - \hbox{e}^{-1.2}) \approx 21.465191$ grams per litre.

4.     [ 10 pts ]     Using the Improved Euler method to approximate the solution at $x=6$ of an initial value problem $y' = f(x,y)$, $y(0) = y_0$, I obtained an answer of $3.7621$ with step size $h = 0.3$ and $3.7521$ with step size $h = 0.2$. What step size should I try if I want the error to be approximately $0.001$?

The global error for Improved Euler is approximately proportional to $h^2$. The Richardson Extrapolation value for $y(6)$ is

\begin{displaymath}Q_R = {h_1^2 Q(h_2) - h_2^2 Q(h_1)\over h_1^2 - h_2^2} =
3.7441\end{displaymath}

The error in the Improved Euler result for step size $0.2$ is approximately $3.7441-3.7521 = -.008$. To get an error of approximately $.001$, we should take $h = 0.2 \left({.001\over .008}\right)^{1/2} \approx .070711$.





Robert Israel
2002-03-10