2.3 HW 2

  2.3.1 Section 1.8, problem 8
  2.3.2 Section 1.8, problem 14
  2.3.3 section 1.10, problem 4
  2.3.4 Section 1.10, problem 17
  2.3.5 Section 1.13, problem 2
  2.3.6 Key solution for HW 2
PDF (letter size)
PDF (legal size)

2.3.1 Section 1.8, problem 8

A tank contains 300 gallons of water and 100 gallons of pollutant. Fresh water is pumped into the tank at rate 2 gal/min, and the well stirred mixture leaves at the same rate. How long does it take for the concentration of pollutants in the tank to decrease to \(\frac{1}{10}\) of its original value?

Solution

Let \(V\left ( t\right ) \) be the volume in gallons of the pollutant at time \(t\). Hence\begin{equation} \frac{dV\left ( t\right ) }{dt}=R_{in}-R_{out} \tag{1} \end{equation} Where \(R_{in}\) is the rate in gallons per min that the pollutant is entering the tank and \(R_{out}\) is the rate in gallons per min that the pollutant is leaving the tank. In this problem \begin{equation} R_{in}=0 \tag{1A} \end{equation} Since no pollutant enters the tank. And \(R_{out}=2\) gal/min. But each gallon that leaves contains the ratio \(\frac{V\left ( t\right ) }{400}\) of pollutant at any moment of time. This is because the volume of the tank is fixed at \(400\) gallons since same volume enters as it leaves. Hence \begin{equation} R_{out}=2\frac{V\left ( t\right ) }{400}\qquad \text{gal/min} \tag{1B} \end{equation} Using (1A,1B) in (1) gives\begin{align*} \frac{dV\left ( t\right ) }{dt} & =-\frac{2}{400}V\left ( t\right ) \\ \frac{dV\left ( t\right ) }{dt}+\frac{1}{200}V\left ( t\right ) & =0 \end{align*}

This is a linear ODE. The integration factor is \(I=e^{\int \frac{1}{200}dt}=e^{\frac{t}{200}}\). Therefore the above can be written as \begin{align*} \frac{d}{dt}\left ( V\left ( t\right ) I\right ) & =0\\ \frac{d}{dt}\left ( Ve^{\frac{t}{200}}\right ) & =0 \end{align*}

Integrating gives the general solution as\begin{equation} Ve^{\frac{t}{200}}=C \tag{1} \end{equation} Using initial conditions, at \(t=0\), \(V=100\) gallons. Substituting these in the above to solve for \(C\) gives\[ 100=C \] Hence the solution (1) becomes\begin{equation} V\left ( t\right ) =100e^{\frac{-t}{200}} \tag{2} \end{equation} To find the time \(t\) when \(V\left ( t\right ) =10\) gallons (this is \(\frac{1}{10}\) of the original volume of pollutant, which is \(100\) gallons), then the above becomes\[ 10=100e^{\frac{-1}{200}t_{0}}\] Solving for \(t_{0}\) gives\begin{align*} \frac{1}{10} & =e^{\frac{-1}{200}t_{0}}\\ \ln \left ( \frac{1}{10}\right ) & =\frac{-1}{200}t_{0}\\ t_{0} & =-200\ln \left ( \frac{1}{10}\right ) \end{align*}

Hence\[ \fbox{$t_0=460.517$ minutes}\] This is the time it takes for the pollutant volume to decrease to \(\frac{1}{10}\) of its original value in the tank.

2.3.2 Section 1.8, problem 14

Find the orthogonal trajectory of the curve \(y=c\sin x\)

Solution

Let \begin{equation} F\left ( x,y,c\right ) =c\sin x-y\tag{1} \end{equation}

Then \(F_{x}=c\cos x\) and \(F_{y}=-1\). Hence the slope of the orhogonal projection is given by

\begin{align*} \frac{dy}{dx} & =\frac{F_{y}}{F_{x}}\\ & =\frac{-1}{c\cos x} \end{align*}

From (1), we need to solve for \(c\) from \(F\left ( x,y,c\right ) =0\) which gives \(c\sin x-y=0\) or \(c=\frac{y}{\sin x}\). Substituting this back into the above result gives

\begin{align*} \frac{dy}{dx} & =\frac{-1}{\left ( \frac{y}{\sin x}\right ) \cos x}\\ & =\frac{-\sin x}{y\cos x}\\ & =-\frac{1}{y}\tan x \end{align*}

The above gives the ODE to sovle for the orthogonal trajectory curves. This is separable. Integrating gives\[ \int ydy=-\int \tan xdx \] But \(\int \tan xdx=-\ln \left \vert \cos \left ( x\right ) \right \vert \). Hence the above becomes\begin{align*} \frac{y^{2}}{2} & =\ln \left ( \left \vert \cos \left ( x\right ) \right \vert \right ) +C_{1}\\ y^{2} & =2\ln \left ( \left \vert \cos x\right \vert \right ) +C \end{align*}

Where \(C=2C_{1}\). Solving for \(y\) gives two solutions\[ y\left ( x\right ) =\pm \sqrt{2\ln \left ( \left \vert \cos x\right \vert \right ) +C}\] For illustration, the above was plotted for \(C=1,2,3,4,5\) in the following (shown in red color) against the function \(\sin \left ( x\right ) \) (in blue color). It shows the projection curves all cross \(\sin \left ( x\right ) \) at \(90^{0}\) everywhere as expected.

pict
Figure 2.3:Orthogonal projections for different \(C\) values

pict
Figure 2.4:code used for the above

The following plot is over a larger \(x\) range, from \(-2\pi \) to \(2\pi \)

pict
Figure 2.5:Orthogonal projections for different \(C\) values

2.3.3 section 1.10, problem 4

Show that the solution \(y\left ( t\right ) \) of the given initial value problem exists on the specified interval.\[ y^{\prime }=y^{2}+\cos \left ( t^{2}\right ) \qquad y\left ( 0\right ) =0;\qquad 0\leq t\leq \frac{1}{2}\] Solution

Writing the ODE as\begin{align*} y^{\prime } & =f\left ( t,y\right ) \\ & =y^{2}+\cos \left ( t^{2}\right ) \end{align*}

Let \(R\) be rectangle \(0\leq t\leq \frac{1}{2},y_{0}-b\leq y\leq y_{0}+b\). But \(y_{0}=0\) as given. Therefore \[ R=\left [ 0,\frac{1}{2}\right ] \times \left [ -b,b\right ] \] Now\begin{align*} M & =\max _{\left ( t,y\right ) \in R}\left \vert f\left ( t,y\right ) \right \vert \\ & =\max _{\left ( t,y\right ) \in R}\left \vert y^{2}+\cos \left ( t^{2}\right ) \right \vert \\ & =b^{2}+1 \end{align*}

Hence\[ \alpha =\min \left ( a,\frac{b}{M}\right ) \] But \(a=\frac{1}{2},M=b^{2}+1\), therefore the above becomes\[ \alpha =\min \left ( \frac{1}{2},\frac{b}{b^{2}+1}\right ) \] The largest value \(\alpha \) can obtain is when \(g\left ( b\right ) =\frac{b}{b^{2}+1}\) is maximum. \begin{align*} g^{\prime }\left ( b\right ) & =\frac{\left ( b^{2}+1\right ) -b\left ( 2b\right ) }{\left ( b^{2}+1\right ) ^{2}}\\ & =\frac{b^{2}+1-2b^{2}}{\left ( b^{2}+1\right ) ^{2}}\\ & =\frac{1-b^{2}}{\left ( b^{2}+1\right ) ^{2}} \end{align*}

Hence \(g^{\prime }\left ( b\right ) =0\) gives \(1-b^{2}=0\) or \(b=\pm 1\). Taking \(b=1\) gives \(g_{\max }\left ( b\right ) =\frac{1}{1^{2}+1}=\frac{1}{2}\). Therefore \begin{align*} \alpha & =\min \left ( \frac{1}{2},\frac{1}{2}\right ) \\ & =\frac{1}{2} \end{align*}

This shows that the solution \(y\left ( t\right ) \) exists on \[ t_{0}\leq t\leq t_{0}+\alpha \] But \(t_{0}=0,\alpha =\frac{1}{2}\), therefore\[ 0\leq t\leq \frac{1}{2}\] Hence a unique solution exist inside rectangle \[ R=\left [ 0,\frac{1}{2}\right ] \times \left [ -1,1\right ] \]

2.3.4 Section 1.10, problem 17

Prove that \(y\left ( t\right ) =-1\) is the only solution of the initial value problem\[ y^{\prime }=t\left ( 1+y\right ) \qquad y\left ( 0\right ) =-1 \] Solution

The solution is found first to show it is \(y\left ( t\right ) =-1\), then using the uniqueness theory, one can show it is unique. The above ODE is separable. Hence\begin{align} \int \frac{dy}{1+y} & =\int tdt\nonumber \\ \ln \left ( \left \vert 1+y\right \vert \right ) & =\frac{t^{2}}{2}+C\nonumber \\ \left \vert 1+y\right \vert & =e^{\frac{t^{2}}{2}+C}\nonumber \\ 1+y & =C_{1}e^{\frac{t^{2}}{2}} \tag{1} \end{align}

Applying initial conditions gives\begin{align*} 1-1 & =C_{1}\\ C_{1} & =0 \end{align*}

Hence the solution (1) becomes\begin{align*} 1+y & =0\\ y\left ( t\right ) & =-1 \end{align*}

To show the above is the only solution we need to show the uniqueness theorem applies to this ODE over all of \(\Re \). Let\begin{align*} y^{\prime } & =f\left ( t,y\right ) \\ & =t\left ( 1+y\right ) \end{align*}

The above shows that \(f\left ( t,y\right ) \) is continuous in \(t\) over \(-\infty <t<\infty \) and continuous in \(y\) over \(-\infty <y<\infty \). Now\[ \frac{\partial f}{\partial y}=t \] Hence \(\frac{\partial f}{\partial y}\) is also continuous in \(y\) over \(-\infty <y<\infty \). Therefore a solution exist and is unique in any region that includes the initial conditions. Hence the solution \(y\left ( t\right ) =-1\) found above is the only solution.

2.3.5 Section 1.13, problem 2

Using Euler’s method with step size \(h=0.1\), determine an approximate value of the solution at \(t=1\) for\[ y^{\prime }=2ty\qquad y\left ( 0\right ) =2 \] Which has analytical solution \(y\left ( t\right ) =2e^{t^{2}}\).  Compute approximate value at \(t=1\) using just \(h=0.1\), and compare with \(y(1)\).

Solution

Euler method is given by\begin{align*} y_{1} & =y_{0}+hf\left ( t_{0},y_{0}\right ) \\ y_{2} & =y_{1}+hf\left ( t_{1},y_{1}\right ) \\ & \vdots \\ y_{k+1} & =y_{k}+hf\left ( t_{k},y_{k}\right ) \end{align*}

Where \(y_{0}=2\) in this problem, and \(t_{1}=t_{0}+h,t_{2}=t_{1}+h\) and so on. Where \(h=0.1\). The following table shows the numerical value of \(y\left ( t\right ) \) found at each \(t\) starting from \(0,0.1,0.2,\cdots ,1.0\) and comparing it to the exact \(y\left ( t\right ) \) and the error at each step using a small Mathematica program which implements the above method.

pict
Figure 2.6:Table to compare Euler method with exact

pict
Figure 2.7:Code for Euler method to generate the above table

pict
Figure 2.8:Plot of exact vs. Euler

pict
Figure 2.9:Code to make plot

2.3.6 Key solution for HW 2

PDF