\frac{dP\left ( t\right ) }{dt}=-\left ( bP^{2}\left ( t\right ) -aP\left ( t\right ) +h\right )
Part(a)
For a=6,b=1 the ODE becomes \frac{dP\left ( t\right ) }{dt}=-\left ( P^{2}\left ( t\right ) -6P\left ( t\right ) +h\right )
We see now how P_{c} depends on h. For real valued P_{c} we want 9-h>0 or h<9
Part(b)
For a=6,b=1,h=7 then \frac{dP\left ( t\right ) }{dt}=-\left ( P^{2}\left ( t\right ) -6P\left ( t\right ) +7\right )
To classify P_{c} we look at little above and little below each critical value and see what the slope is there. Depending on the sign of the slope around each critical point, we will know if it stable, not stable, or semi-stable. For P_{c}=4.4142, lets look at P=5 and P=4\begin{align*} \left ( -\left ( P^{2}\left ( t\right ) -6P\left ( t\right ) +7\right ) \right ) _{P=5} & =-\left ( 25-6\left ( 5\right ) +7\right ) =-2\\ \left ( -\left ( P^{2}\left ( t\right ) -6P\left ( t\right ) +7\right ) \right ) _{P=4} & =-\left ( 16-6\left ( 4\right ) +7\right ) =1 \end{align*}
Since the slope is negative to the right of P_{c}=4.4142 and the slope is positive to the left of P_{c}=4.4142, this means P_{c}=4.4142 is stable.
For P_{c}=1.5858, let look at P=2 and P=1\begin{align*} \left ( -\left ( P^{2}\left ( t\right ) -6P\left ( t\right ) +7\right ) \right ) _{P=2} & =-\left ( 4-6\left ( 2\right ) +7\right ) =1\\ \left ( -\left ( P^{2}\left ( t\right ) -6P\left ( t\right ) +7\right ) \right ) _{P=1} & =-\left ( 1-6\left ( 1\right ) +7\right ) =-2 \end{align*}
Since the slope is positive to the right of P_{c}=1.5858 and the slope is negative to the left of P_{c}=1.5858, this means P_{c}=1.5858 is unstable.
Here is the phase plot
Here is sketch of the slope field diagram using the computer showing the two critical values of P\left ( t\right ) found above, confirming that one is stable, and the other is not stable.
Part(c)
For a=6,b=1,h=7 then
\frac{dP\left ( t\right ) }{dt}=-\left ( P^{2}\left ( t\right ) -6P\left ( t\right ) +7\right )
\begin{pmatrix} -1 & 1 & 1 & 2\\ 0 & 5 & -k & 4\\ 0 & 0 & k & p+3 \end{pmatrix}
Part (a)
Using p=-3\begin{pmatrix} -1 & 1 & 1 & 2\\ 0 & 5 & -k & 4\\ 0 & 0 & k & 0 \end{pmatrix}
case (iii) If k=0 then we have 0\left ( x_{3}\right ) =0. Hence any x_{3} value will satisfy this. So there are infinite number of solutions. Let x_{3}=t, hence from second equation 5x_{2}-kt=4 or x_{2}=\frac{4+kt}{5} and from the first equation -x_{1}+\frac{4+kt}{5}+t=2 or -x_{1}=2-t-\frac{4+kt}{5}, hence x_{1}=t+\frac{1}{5}kt-\frac{6}{5}. The solution in vector form is\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} t+\frac{1}{5}kt-\frac{6}{5}\\ \frac{4+kt}{5}\\ t \end{pmatrix} =\begin{pmatrix} t-\frac{6}{5}\\ \frac{4}{5}\\ t \end{pmatrix} _{k=0}
Part (b)
Using p=-2\begin{pmatrix} -1 & 1 & 1 & 2\\ 0 & 5 & -k & 4\\ 0 & 0 & k & 1 \end{pmatrix}
case (ii) If k=0 we have \left ( 0\right ) x_{3}=1 which is not possible. Hence k=0 gives no solutions.
case (iii) There is no value of k which gives infinite number of solutions.
\frac{dy}{dx}=-\frac{y}{\left ( x-1\right ) }+\frac{e^{-x}}{x-1};y\left ( 0\right ) =2
part (a)
\frac{dy}{dx}=\frac{-y+e^{-x}}{\left ( x-1\right ) }
Therefore, by multiplying both sides of (1) by \mu , we obtain\begin{align*} \frac{d}{dx}\left ( \mu y\right ) & =\mu \frac{e^{-x}}{x-1}\\ \frac{d}{dx}\left ( \left ( x-1\right ) y\right ) & =\left ( x-1\right ) \frac{e^{-x}}{x-1}\\ & =e^{-x} \end{align*}
Integrating both sides\begin{align*} \left ( x-1\right ) y & =-e^{-x}+c\\ y\left ( x\right ) & =\frac{e^{-x}}{1-x}+\frac{c}{x-1} \end{align*}
From initial conditions
\begin{align*} 2 & =\frac{1}{1}+\frac{c}{-1}\\ c & =-1 \end{align*}
Hence the exact solution is\begin{align*} y\left ( x\right ) & =\frac{e^{-x}}{1-x}+\frac{1}{1-x}\\ & =\frac{e^{-x}+1}{1-x} \end{align*}
Since initial conditions is at x=0 and since we found above that solution region can not include point x=1, then the solution region is -\infty <x<1
Here is a plot of the solution showing the singularity at x=1. For our case, the solution curve is the one to the left of x=1 in this diagram
Part (b)
In Forward Euler, we have y_{n+1}=y_{n}+hf\left ( x_{n},y_{n}\right )
Therefore, after one step y\left ( h\right ) =y\left ( 0\right ) +h
\frac{dy}{dx}=-\frac{5}{2}x^{4}y^{3};y\left ( 0\right ) =-1
Part (a)
f\left ( x,y\right ) =-\frac{5}{2}x^{4}y^{3}. We see that this is continuous for all x and all y. \frac{\partial f}{\partial y}=-\frac{5}{2}3x^{4}y^{2}. This is also continuous for all x and all y. Therefore a solution exist and is unique in some region inside -\infty <x<\infty .
Now we solve the ODE. This is separable. Hence \frac{dy}{y^{3}}=-\frac{5}{2}x^{4}dx
Hence \frac{-1}{y^{2}}=-x^{5}-1 or\begin{align*} y^{2} & =\frac{-1}{-x^{5}-1}\\ & =\frac{1}{x^{5}+1}\\ y & =\pm \sqrt{\frac{1}{x^{5}+1}} \end{align*}
But since y\left ( 0\right ) =-1, then at this point, using the above solution, we see that -1=\pm \sqrt{\frac{1}{1}}. Hence only the negative sign can be used, to satisfy the initial conditions. Therefore, the solution becomes y=-\sqrt{\frac{1}{x^{5}+1}}
Part (b)
In rk2, we have \begin{align*} k_{1} & =f\left ( x_{n},y_{n}\right ) \\ u_{n+1} & =y_{n}+hk_{1}\\ k_{2} & =f\left ( x_{n+1},u_{n+1}\right ) \\ y_{n+1} & =y_{n}+h\frac{1}{2}\left ( k_{1}+k_{2}\right ) \end{align*}
In this problem f\left ( x,y\right ) =-\frac{5}{2}x^{4}y^{3}, hence k_{1}=-\frac{5}{2}x_{n}^{4}y_{n}^{3}
And\begin{align*} k_{2} & =f\left ( x_{1},u_{1}\right ) \\ & =-\frac{5}{2}x_{1}^{4}u_{1}^{3}\\ & =-\frac{5}{2}h^{4}\left ( -1\right ) ^{3}\\ & =\frac{5}{2}h^{4} \end{align*}
Hence\begin{align*} y_{1} & =y_{0}+h\frac{1}{2}\left ( k_{1}+k_{2}\right ) \\ & =-1+h\frac{1}{2}\left ( 0+\frac{5}{2}h^{4}\right ) \\ & =\frac{5}{4}h^{5}-1 \end{align*}
\frac{dy}{dt}=\left ( y-1\right ) ^{\frac{3}{2}};y\left ( 1\right ) =2
Note: When solving this, the solution came out to be y\left ( t\right ) =\frac{t^{2}-6t+13}{\left ( t-3\right ) ^{2}}, which means the solution below up at t=3. i.e the solution is singular at t=3. Therefore, the subrange is -\infty <t<-3. (we were not asked to find the subrange?) Just to answer that there exist some subrange. Here is a plot of the solution