Question Show that \(x^{2}y^{3}+x\left ( 1+y^{2}\right ) y^{\prime }=0\) is not exact, and then becomes exact when multiplied by \(\mu \left ( x,y\right ) =\frac{1}{xy^{3}}\) and then solve.
Solution The first step is to apply theorem two and also check where the ODE is singular. Writing it as\[ \frac{dy}{dx}=f\left ( x,y\right ) =\frac{-x^{2}y^{3}}{x\left ( 1+y^{2}\right ) }\] This is non-linear first order ODE. There is a pole at \(x=0\,\). From theorem two, this says that unique solution is not guaranteed to exist since the first condition which says that \(f\left ( x,y\right ) \) must be continuous, was not satisfied. Now the ODE is solved.\[ \overset{M}{\overbrace{x^{2}y^{3}}}+\overset{N}{\overbrace{x\left ( 1+y^{2}\right ) }}y^{\prime }=0 \] Hence\begin{align*} M\left ( x,y\right ) & =x^{2}y^{3}\\ N\left ( x,y\right ) & =x\left ( 1+y^{2}\right ) \end{align*}
An ODE is exact when \(\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}\). These are now calculated to see if the ODE is exact or not\begin{align*} \frac{\partial M}{\partial y} & =3x^{2}y^{2}\\ \frac{\partial N}{\partial x} & =1+y^{2} \end{align*}
The above shows that that \(\frac{\partial M}{\partial y}\neq \frac{\partial N}{\partial x}\) therefore the ODE is not exact. Multiplying the original ODE by given integrating factor it becomes \begin{align*} \left ( \mu x^{2}y^{3}\right ) +\mu x\left ( 1+y^{2}\right ) y^{\prime } & =0\\ \frac{x^{2}y^{3}}{xy^{3}}+\frac{1}{xy^{3}}x\left ( 1+y^{2}\right ) y^{\prime } & =0\\ x+\frac{1}{y^{3}}\left ( 1+y^{2}\right ) y^{\prime } & =0 \end{align*}
Now \(\bar{M}=x\) and \(\bar{N}=\frac{1}{y^{3}}\left ( 1+y^{2}\right ) \). Checking that the new \(\bar{M},\bar{N}\,\ \)are indeed exact. \begin{align*} \frac{\partial \bar{M}}{\partial y} & =0\\ \frac{\partial \bar{N}}{\partial x} & =0 \end{align*}
The new ODE is exact. Now the ODE is solved using the standard method.\begin{align} \frac{\partial \Psi \left ( x,y\right ) }{\partial x} & =\bar{M}=x\tag{1}\\ \frac{\partial \Psi \left ( x,y\right ) }{\partial y} & =\bar{N}=\frac{1}{y^{3}}\left ( 1+y^{2}\right ) \tag{2} \end{align}
Integrating (1) w.r.t \(x\) gives\begin{align} \Psi & =\frac{1}{2}x^{2}+f\left ( y\right ) \tag{3}\\ \frac{\partial \Psi }{\partial y} & =f^{\prime }\left ( y\right ) \nonumber \end{align}
Comparing the above to (2) in order to solve for \(f^{\prime }\left ( y\right ) \) gives\begin{align} f^{\prime }\left ( y\right ) & =\frac{1+y^{2}}{y^{3}}\nonumber \\ f\left ( y\right ) & =\int \frac{1+y^{2}}{y^{3}}dy+c \tag{4} \end{align}
We need now to solve \(\int \frac{1+y^{2}}{y^{3}}dy\)\begin{align*} \int \frac{1+y^{2}}{y^{3}}dy & =\int \frac{1}{y^{3}}dy+\int \frac{y^{2}}{y^{3}}dy\\ & =-\frac{1}{2y^{2}}+\int \frac{1}{y}dy\\ & =-\frac{1}{2y^{2}}+\ln \left \vert y\right \vert \end{align*}
Using the above solution in (4) gives\[ f\left ( y\right ) =-\frac{1}{2y^{2}}+\ln \left \vert y\right \vert +c \] Using the above in (3) gives\[ \Psi =\frac{1}{2}x^{2}-\frac{1}{2y^{2}}+\ln \left \vert y\right \vert +c \] But \(\frac{d\Psi }{dx}=c_{0}\), therefore the above simplifies to, after collecting all constants to one\[ \frac{1}{2}x^{2}-\frac{1}{2y^{2}}+\ln \left \vert y\right \vert =C\qquad x\neq 0 \] Checking \(y=0\) as solution, shows that putting \(y=0\) in \(f\left ( x,y\right ) =\frac{-x^{2}y^{3}}{x\left ( 1+y^{2}\right ) }=0\). Hence \(y=0\) is also a solution.
Summary The solutions are\begin{align*} \frac{1}{2}x^{2}-\frac{1}{2y^{2}}+\ln \left \vert y\right \vert & =C\qquad x\neq 0,y\neq 0\\ y & =0\qquad x\neq 0 \end{align*}
Question Show that \(\left ( \frac{\sin y}{y}-2e^{-x}\sin x\right ) +\left ( \frac{\cos y+2e^{-x}\cos x}{y}\right ) y^{\prime }=0\) is not exact, and then becomes exact when multiplied by \(\mu \left ( x,y\right ) =ye^{x}\) and then solve.
Solution First we will check where the ODE is singular. Writing it as\[ \frac{dy}{dx}=f\left ( x,y\right ) =\frac{\frac{\sin y}{y}-2e^{-x}\sin x}{\frac{\cos y+2e^{-x}\cos x}{y}}\] This is non-linear first order ODE. We see a pole at \(y=0\,\). Hence \(y\neq 0\). From theorem two, this says that that unique solution is not guaranteed since first condition which says that \(f\left ( x,y\right ) \) must be continuous, was not satisfied. \begin{align*} M\left ( x,y\right ) & =\frac{\sin y}{y}-2e^{-x}\sin x\\ N\left ( x,y\right ) & =\frac{\cos y+2e^{-x}\cos x}{y} \end{align*}
An ODE is exact when \(\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}\). These are now calculated to see if the ODE is exact or not\begin{align*} \frac{\partial M}{\partial y} & =\ln y\sin y+\frac{1}{y}\cos y\\ \frac{\partial N}{\partial x} & =\frac{\partial }{\partial x}\left ( \frac{1}{y}\cos y+\frac{1}{y}2e^{-x}\cos x\right ) =\frac{-1}{y}2e^{-x}\cos x-\frac{1}{y}2e^{-x}\sin x=\frac{-2e^{-x}}{y}\left ( \cos x+\sin x\right ) \end{align*}
From above we see that \(\frac{\partial M}{\partial y}\neq \frac{\partial N}{\partial x}\) therefore the ODE is not exact. Multiplying the original ODE by given integrating factor it becomes \begin{align*} \mu \left ( \frac{\sin y}{y}-2e^{-x}\sin x\right ) +\mu \left ( \frac{\cos y+2e^{-x}\cos x}{y}\right ) y^{\prime } & =0\\ ye^{x}\left ( \frac{\sin y}{y}-2e^{-x}\sin x\right ) +ye^{x}\left ( \frac{\cos y+2e^{-x}\cos x}{y}\right ) y^{\prime } & =0\\ \left ( e^{x}\sin y-2y\sin x\right ) +\left ( e^{x}\cos y+2\cos x\right ) y^{\prime } & =0 \end{align*}
Now \begin{align*} \bar{M} & =e^{x}\sin y-2y\sin x\\ \bar{N} & =e^{x}\cos y+2\cos x \end{align*}
Checking now the new \(\bar{M},\bar{N}\,\ \)are indeed exact.\begin{align*} \frac{\partial \bar{M}}{\partial y} & =e^{x}\cos y-2\sin x\\ \frac{\partial \bar{N}}{\partial x} & =e^{x}\cos y-2\sin x \end{align*}
The new ODE is exact. Now the ODE is solved using the standard method.\begin{align} \frac{\partial \Psi \left ( x,y\right ) }{\partial x} & =\bar{M}=e^{x}\sin y-2y\sin x\tag{1}\\ \frac{\partial \Psi \left ( x,y\right ) }{\partial y} & =\bar{N}=e^{x}\cos y+2\cos x \tag{2} \end{align}
Integrating (1) w.r.t \(x\) gives\begin{align} \Psi & =e^{x}\sin y+2y\cos x+f\left ( y\right ) \tag{3}\\ \frac{\partial \Psi }{\partial y} & =e^{x}\cos y+2\cos x+f^{\prime }\left ( y\right ) \nonumber \end{align}
Comparing the above to (2) in order to solve for \(f^{\prime }\left ( y\right ) \) gives\begin{align} e^{x}\cos y+2\cos x+f^{\prime }\left ( y\right ) & =e^{x}\cos y+2\cos x\nonumber \\ f^{\prime }\left ( y\right ) & =0\nonumber \\ f\left ( y\right ) & =c \tag{4} \end{align}
Substituting the above into (3) gives\[ \Psi =e^{x}\sin y+2y\cos x+c \] But \(\frac{d\Psi }{dx}=c_{0}\), therefore the above simplifies to, after collecting all constants to one\[ e^{x}\sin y+2y\cos x=C\qquad y\neq 0 \]
Question Show that \(y+\left ( 2x-ye^{y}\right ) y^{\prime }=0\) is not exact, and then becomes exact when multiplied by \(\mu \left ( x,y\right ) =y\) and then solve.
Solution \begin{align*} M\left ( x,y\right ) & =y\\ N\left ( x,y\right ) & =2x-ye^{y} \end{align*}
An ODE is exact when \(\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}\). These are now calculated to see if the ODE is exact or not\begin{align*} \frac{\partial M}{\partial y} & =1\\ \frac{\partial N}{\partial x} & =2 \end{align*}
From above we see that \(\frac{\partial M}{\partial y}\neq \frac{\partial N}{\partial x}\) therefore the ODE is not exact. Multiplying the original ODE by given integrating factor it becomes \begin{align*} \mu y+\mu \left ( 2x-ye^{y}\right ) y^{\prime } & =0\\ y^{2}+\left ( 2xy-y^{2}e^{y}\right ) y^{\prime } & =0 \end{align*}
Now \begin{align*} \bar{M} & =y^{2}\\ \bar{N} & =2xy-y^{2}e^{y} \end{align*}
Checking now the new \(\bar{M},\bar{N}\,\ \)are indeed exact.\begin{align*} \frac{\partial \bar{M}}{\partial y} & =2y\\ \frac{\partial \bar{N}}{\partial x} & =2y \end{align*}
The new ODE is exact. Now the ODE is solved using the standard method.\begin{align} \frac{\partial \Psi \left ( x,y\right ) }{\partial x} & =\bar{M}=y^{2}\tag{1}\\ \frac{\partial \Psi \left ( x,y\right ) }{\partial y} & =\bar{N}=2xy-y^{2}e^{y} \tag{2} \end{align}
Integrating (1) w.r.t \(x\) gives\begin{align} \Psi & =y^{2}x+f\left ( y\right ) \tag{3}\\ \frac{\partial \Psi }{\partial y} & =2yx+f^{\prime }\left ( y\right ) \nonumber \end{align}
Comparing the above to (2) in order to solve for \(f^{\prime }\left ( y\right ) \) gives\begin{align} 2yx+f^{\prime }\left ( y\right ) & =2xy-y^{2}e^{y}\nonumber \\ f^{\prime }\left ( y\right ) & =-y^{2}e^{y}\nonumber \\ f\left ( y\right ) & =-\int y^{2}e^{y}dy+c \tag{4} \end{align}
The integral \(\int y^{2}e^{y}dy\) can be found using integration by parts. Let \(u=y^{2},dv=e^{y}\rightarrow du=2y,v=e^{y}\), therefore\begin{align*} \int y^{2}e^{y}dy & =\int udv\\ & =uv-\int vdu\\ & =y^{2}e^{y}-2\int ye^{y}dy \end{align*}
Applying integration by parts again to \(\int ye^{y}dy\), where now \(u=y,dv=e^{y}\rightarrow du=1,v=e^{y}\), the above becomes\begin{align*} \int y^{2}e^{y}dy & =y^{2}e^{y}-2\left ( ye^{y}-\int e^{y}dy\right ) \\ & =y^{2}e^{y}-2\left ( ye^{y}-e^{y}\right ) \\ & =y^{2}e^{y}-2ye^{y}+2e^{y}\\ & =e^{y}\left ( y^{2}-2y+2\right ) \end{align*}
Therefore from (4)\[ f\left ( y\right ) =-e^{y}\left ( y^{2}-2y+2\right ) +c \] Substituting the above into (3) gives\[ \Psi =y^{2}x-e^{y}\left ( y^{2}-2y+2\right ) +c \] But \(\frac{d\Psi }{dx}=c_{0}\), therefore the above simplifies to, after collecting all constants to one\[ y^{2}x-e^{y}\left ( y^{2}-2y+2\right ) =C \]
Question Show that \(\left ( x+2\right ) \sin y+\left ( x\cos y\right ) y^{\prime }=0\) is not exact, and then becomes exact when multiplied by \(\mu \left ( x,y\right ) =xe^{x}\) and then solve.
Solution \begin{align*} M\left ( x,y\right ) & =\left ( x+2\right ) \sin y\\ N\left ( x,y\right ) & =x\cos y \end{align*}
An ODE is exact when \(\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}\). These are now calculated to see if the ODE is exact or not\begin{align*} \frac{\partial M}{\partial y} & =\left ( x+2\right ) \cos y\\ \frac{\partial N}{\partial x} & =\cos y \end{align*}
From above we see that \(\frac{\partial M}{\partial y}\neq \frac{\partial N}{\partial x}\) therefore the ODE is not exact. Multiplying the original ODE by given integrating factor it becomes \begin{align*} \mu \left ( x+2\right ) \sin y+\mu \left ( x\cos y\right ) y^{\prime } & =0\\ xe^{x}\left ( x+2\right ) \sin y+xe^{x}\left ( x\cos y\right ) y^{\prime } & =0 \end{align*}
Now \begin{align*} \bar{M} & =\left ( x^{2}e^{x}+2xe^{x}\right ) \sin y\\ \bar{N} & =x^{2}e^{x}\cos y \end{align*}
Checking now the new \(\bar{M},\bar{N}\,\ \)are indeed exact.\begin{align*} \frac{\partial \bar{M}}{\partial y} & =\left ( x^{2}e^{x}+2xe^{x}\right ) \cos y\\ \frac{\partial \bar{N}}{\partial x} & =2xe^{x}\cos y+x^{2}e^{x}\cos y=\left ( x^{2}e^{x}+2xe^{x}\right ) \cos y \end{align*}
The new ODE is exact. Now the ODE is solved using the standard method.\begin{align} \frac{\partial \Psi \left ( x,y\right ) }{\partial x} & =\bar{M}=\left ( x^{2}e^{x}+2xe^{x}\right ) \sin y\tag{1}\\ \frac{\partial \Psi \left ( x,y\right ) }{\partial y} & =\bar{N}=x^{2}e^{x}\cos y \tag{2} \end{align}
Integrating (2) w.r.t \(y\) as it is simpler than integrating (1) w.r.t. \(x\), gives\begin{align} \Psi & =\int x^{2}e^{x}\cos ydy=x^{2}e^{x}\sin y+f\left ( x\right ) \tag{3}\\ \frac{\partial \Psi }{\partial x} & =2xe^{x}\sin y+x^{2}e^{x}\sin y+f^{\prime }\left ( x\right ) \nonumber \end{align}
Comparing the above to (1) in order to solve for \(f^{\prime }\left ( x\right ) \) gives\begin{align} 2xe^{x}\sin y+x^{2}e^{x}\sin y+f^{\prime }\left ( x\right ) & =\left ( x^{2}e^{x}+2xe^{x}\right ) \sin y\nonumber \\ f^{\prime }\left ( x\right ) & =0\nonumber \\ f\left ( x\right ) & =c \tag{4} \end{align}
Substituting the above into (3) gives\[ \Psi =x^{2}e^{x}\sin y+c \] But \(\frac{d\Psi }{dx}=c_{0}\), therefore \(\Psi =c_{1}\) and the above simplifies to, after collecting all constants to one\[ x^{2}e^{x}\sin y=C \]
Question Show that if \(\frac{N_{x}-M_{y}}{M}=Q\) where \(Q\) is function of \(y\) only, then \(M+Ny^{\prime }=0\) has integrating factor of form \(\mu \left ( y\right ) =e^{\int Q\left ( y\right ) dt}\)
Solution Given the differential equation\[ M\left ( x,y\right ) +N\left ( x,y\right ) \frac{dy\left ( x\right ) }{dx}=0 \] Multiplying by \(\mu \left ( y\right ) \) results in\[ \mu M+\mu Ny^{\prime }=0 \] The above is exact if \[ \frac{\partial \left ( \mu M\right ) }{\partial y}=\frac{\partial \left ( \mu N\right ) }{\partial x}\] Performing the above, taking into account that \(\mu \) depends on \(y\) only, results in\[ \frac{d\mu }{dy}M+\mu \frac{\partial M}{\partial y}=\mu \frac{\partial N}{\partial x}\] The above is first order ODE in \(\mu \,\)\begin{align*} \frac{d\mu }{dy}M & =\mu \frac{\partial N}{\partial x}-\mu \frac{\partial M}{\partial y}\\ \frac{d\mu }{dy} & =\mu \left ( \frac{\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}}{M}\right ) \end{align*}
Let \(Q=\frac{\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}}{M}\). If \(Q\) depends on \(y\) only, then the above ODE is separable. Hence\begin{align*} \frac{d\mu }{dy} & =\mu Q\left ( y\right ) \\ \frac{d\mu }{\mu } & =Q\left ( y\right ) dy \end{align*}
Integrating both sides gives\begin{align*} \ln \left \vert \mu \right \vert & =\int Q\left ( y\right ) dy+C\\ \left \vert \mu \right \vert & =e^{\int Q\left ( y\right ) dy+C}\\ \mu \left ( y\right ) & =Ae^{\int Q\left ( y\right ) dy} \end{align*}
Where \(A\) is some constant, which can be taken to be \(1\) leading to the result required to show. The above procedure works only when \(Q=\frac{\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}}{M}\) happened to be function of \(y\) only. This complete the proof.
Question Show that if \(\frac{N_{x}-M_{y}}{xM-yN}=R\) where \(R\) is function of \(xy\) only, then \(M+Ny^{\prime }=0\) has integrating factor of form \(\mu \left ( x,y\right ) \). Find the general formula for \(\mu \).
Solution Given the differential equation\[ M\left ( x,y\right ) +N\left ( x,y\right ) \frac{dy\left ( x\right ) }{dx}=0 \] Let \(\mu \left ( t\right ) \) where \(t=xy\). Multiplying the above with \(\mu \left ( t\right ) \) gives\[ \mu \left ( t\right ) M\left ( x,y\right ) +\mu \left ( t\right ) N\left ( x,y\right ) \frac{dy\left ( x\right ) }{dx}=0 \] The above is exact when \[ \frac{\partial \mu M}{\partial y}=\frac{\partial \mu N}{\partial x}\] Hence\begin{equation} \frac{\partial \mu }{\partial y}M+\mu \frac{\partial M}{\partial y}=\frac{\partial \mu }{\partial x}N+\mu \frac{\partial N}{\partial x}\tag{1} \end{equation} However,\begin{equation} \frac{\partial \mu }{\partial y}=\frac{d\mu }{dt}\frac{\partial t}{dy}=\frac{d\mu }{dt}x\tag{2} \end{equation} And \begin{equation} \frac{\partial \mu }{\partial x}=\frac{d\mu }{dt}\frac{\partial t}{dx}=\frac{d\mu }{dt}y\tag{3} \end{equation} Substituting (2,3) into (1) gives\begin{align*} \frac{d\mu }{dt}xM+\mu \frac{\partial M}{\partial y} & =\frac{d\mu }{dt}yN+\mu \frac{\partial N}{\partial x}\\ \frac{d\mu }{dt}\left ( xM-yN\right ) & =\mu \frac{\partial N}{\partial x}-\mu \frac{\partial M}{\partial y}\\ \frac{d\mu \left ( t\right ) }{dt} & =\mu \frac{\left ( \frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}\right ) }{\left ( xM-yN\right ) } \end{align*}
In the above, \(\mu \) depends on \(t\) only, where \(t\) is function of \(xy\) only. If \(\frac{\left ( \frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}\right ) }{\left ( xM-yN\right ) }\) depends on \(t\) only, then the above can be considered a separable first order ODE in \(\mu \). Let \(R\left ( t\right ) =\frac{\left ( \frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}\right ) }{\left ( xM-yN\right ) }\) and the above can be written as\[ \frac{d\mu \left ( t\right ) }{dt}=\mu R\left ( t\right ) \] Since separable, then\begin{align*} \frac{d\mu \left ( t\right ) }{\mu } & =R\left ( t\right ) dt\\ \int \frac{d\mu }{\mu } & =\int Rdt\\ \ln \left \vert \mu \right \vert & =\int Rdt+C\\ \left \vert \mu \right \vert & =e^{\int Rdt+C}\\ \mu & =Ae^{\int Rdt} \end{align*}
Where \(A\) is constant of integration which can be taken to be \(1\). Hence \(\mu =e^{\int Rdt}\). This works only if \(R\) is function of \(t\) only.
\begin{align*} y^{\prime } & =1-t+y\\ y\left ( t_{0}\right ) & =y_{0} \end{align*}
This is linear first order ODE. Writing it as \(y^{\prime }-y=1-t\), then the integrating factor is \(\mu =e^{-\int dt}=e^{-t}\) and the ODE becomes\[ \frac{d}{dt}\left ( ye^{-t}\right ) =e^{-t}\left ( 1-t\right ) \] Integrating both sides\begin{align} ye^{-t} & =\int e^{-t}\left ( 1-t\right ) dt+c\nonumber \\ & =\int e^{-t}dt-\int te^{-t}dt+c\tag{1} \end{align}
But \(\int te^{-t}dt=\int udv\) where \(u=t,dv=e^{-t}\rightarrow du=1,v=-e^{-t}\), hence\begin{align*} \int te^{-t}dt & =uv-\int vdu\\ & =-te^{-t}+\int e^{-t}dt\\ & =-te^{-t}-e^{-t} \end{align*}
Putting this result in (1) gives\begin{align*} ye^{-t} & =-e^{-t}-\left ( -te^{-t}-e^{-t}\right ) +c\\ & =-e^{-t}+te^{-t}+e^{-t}+c\\ & =te^{-t}+c \end{align*}
Therefore solving for \(y\) gives\begin{equation} y=t+ce^{t}\tag{2} \end{equation} The constant \(c\) is now found from initial conditions.\begin{align*} y_{0} & =t_{0}+ce^{t_{0}}\\ c & =\left ( y_{0}-t_{0}\right ) e^{-t_{0}} \end{align*}
Substituting \(c\) found back into (2) gives the final solution\begin{align} y & =t+\left ( y_{0}-t_{0}\right ) e^{-t_{0}}e^{t}\nonumber \\ & =\left ( y_{0}-t_{0}\right ) e^{t-t_{0}}+t\tag{3} \end{align}
Euler formula is \begin{equation} y_{k}=hf\left ( t_{k-1},y_{k-1}\right ) +y_{k-1}\qquad k=1,2,3,\cdots \tag{1} \end{equation} Where in this problem \(f\left ( t_{k-1},y_{k-1}\right ) \) is the RHS\(\ \)of \(y^{\prime }=1-t+y\) but evaluated at \(t_{k-1}\). Hence\[ f\left ( t_{k-1},y_{k-1}\right ) =1-t_{k-1}+y_{k-1}\] Substituting this into (1) gives\begin{align*} y_{k} & =h\left ( 1-t_{k-1}+y_{k-1}\right ) +y_{k-1}\qquad \\ & =h-ht_{k-1}+hy_{k-1}+y_{k-1}\\ & =\left ( 1+h\right ) y_{k-1}+h-ht_{k-1}\qquad k=1,2,3,\cdots \end{align*}
Which is the required formula asked to derive.
The formula given \(y_{1}=\left ( 1+h\right ) \left ( y_{0}-t_{0}\right ) +t_{1}\) can be found as follows. Since\begin{align*} y_{1} & =y_{0}+hf\left ( t_{0},y_{0}\right ) \\ & =y_{0}+h\left ( 1-t_{0}+y_{0}\right ) \\ & =y_{0}+h-ht_{1}+hy_{0} \end{align*}
Adding \(t_{0}-t_{0}\) to the above will not changed anything, hence\[ y_{1}=y_{0}+h-ht_{1}+hy_{0}+t_{0}-t_{0}\] But \(t_{1}=t_{0}+h\) by definition, hence the above becomes, by replacing \(t_{0}+h\) above with \(t_{1}\)\[ y_{1}=y_{0}+t_{1}-ht_{1}+hy_{0}-t_{0}\] Simplifying\begin{align*} y_{1} & =\left ( y_{0}-t_{0}\right ) +h\left ( y_{0}-t_{0}\right ) +t_{1}\\ & =\left ( 1+h\right ) \left ( y_{0}-t_{0}\right ) +t_{1} \end{align*}
Now the question will be answered. Need to show that \(y_{n}=\left ( 1+h\right ) ^{n}\left ( y_{0}-t_{0}\right ) +t_{n}\) is true, using induction. This is true for \(k=1\) as shown above. Now assuming it is true for \(k\), we then need to show it is true for \(k+1\).
By assumption, it is true for \(k\), hence\begin{equation} y_{k}=\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k}\tag{1} \end{equation} But using Euler formula\begin{align} y_{k+1} & =y_{k}+hf\left ( t_{k},y_{k}\right ) \nonumber \\ & =y_{k}+h\left ( 1-t_{k}+y_{k}\right ) \tag{2} \end{align}
Substituting (1) into RHS of (2)\begin{align*} y_{k+1} & =\left ( \left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k}\right ) +h\left ( 1-t_{k}+\left ( \left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k}\right ) \right ) \\ & =\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k}+h-ht_{k}+h\left ( \left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k}\right ) \\ & =\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k}+h-ht_{k}+h\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +ht_{k}\\ & =\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k}+h+h\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) \end{align*}
But \(t_{k}+h=t_{k+1}\) by definition, hence\begin{align*} y_{k+1} & =\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) +t_{k+1}+h\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) \\ & =\left ( 1+h\right ) ^{k}\left ( y_{0}-t_{0}\right ) \left ( 1+h\right ) +t_{k+1}\\ & =\left ( 1+h\right ) ^{k+1}\left ( y_{0}-t_{0}\right ) +t_{k+1} \end{align*}
The above shows it is true for \(k+1\) given it is true for \(k\). Therefore, it is true for any positive integer \(n\).
Using
\[ y_{n}=\left ( 1+h\right ) ^{n}\left ( y_{0}-t_{0}\right ) +t_{n}\]
Replacing \(h=\frac{t_{n}-t_{0}}{n}\) in the above gives\[ y_{n}=\left ( 1+\left ( \frac{t_{n}-t_{0}}{n}\right ) \right ) ^{n}\left ( y_{0}-t_{0}\right ) +t_{n}\] Taking the limit\[ \lim _{n\rightarrow \infty }y_{n}=\lim _{n\rightarrow \infty }\left ( 1+\left ( \frac{t_{n}-t_{0}}{n}\right ) \right ) ^{n}\left ( y_{0}-t_{0}\right ) +\lim _{n\rightarrow \infty }t_{n}\] But \(\lim _{n\rightarrow \infty }t_{n}=t\), hence replacing all \(t_{n}\) with \(t\) in the above gives\[ \lim _{n\rightarrow \infty }y_{n}=\lim _{n\rightarrow \infty }\left ( 1+\left ( \frac{t-t_{0}}{n}\right ) \right ) ^{n}\left ( y_{0}-t_{0}\right ) +t \] Using hint that \(\lim _{n\rightarrow \infty }\left ( 1+\frac{a}{n}\right ) ^{n}=e^{a}\) the above simplifies to\begin{align*} y\left ( t\right ) & =\lim _{n\rightarrow \infty }y_{n}\\ & =e^{\left ( t-t_{0}\right ) }\left ( y_{0}-t_{0}\right ) +t \end{align*}
Which is the analytical solution found in part (a).
Find the general solution to \(y^{\prime \prime }+2y^{\prime }-3y=0\).
This is second order, linear, constant coefficient ODE. Letting \(y=e^{rt}\) and replacing this into the ODE gives\[ e^{rt}\left ( r^{2}+2r-3\right ) =0 \] Since \(e^{rt}\neq 0\), the above reduces to what is called the characteristic equation of the ODE\[ \fbox{$r^2+2r-3=0$}\] Which can be written as \(\left ( r-1\right ) \left ( r+3\right ) =0\). Hence \(r_{1}=1,r_{2}=-3\). Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}e^{t}+c_{2}e^{-3t}\]
Find the general solution to \(y^{\prime \prime }+3y^{\prime }+2y=0\).
This is second order, linear, constant coefficient ODE. The characteristic equation of the ODE\[ \fbox{$r^2+3r+2=0$}\] Which can be written as \(\left ( r+1\right ) \left ( r+2\right ) =0\). Hence \(r_{1}=-1,r_{2}=-2\). Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}e^{-t}+c_{2}e^{-2t}\]
Find the general solution to \(6y^{\prime \prime }-y^{\prime }-y=0\).
This is second order, linear, constant coefficient ODE. The characteristic equation of the ODE\[ \fbox{$6r^2-r-1=0$}\] Hence \(r=\frac{-b\pm \sqrt{b^{2}-4ac}}{2a}=\frac{1\pm \sqrt{1-4\left ( 6\right ) \left ( -1\right ) }}{12}=\frac{1\pm \sqrt{1+24}}{12}=\frac{1\pm 5}{12}\). Hence \(r_{1}=\frac{1}{2},r_{2}=\frac{-1}{3}\). Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}e^{\frac{1}{2}t}+c_{2}e^{\frac{-1}{3}t}\]
Find the general solution to \(2y^{\prime \prime }-3y^{\prime }+y=0\).
This is second order, linear, constant coefficient ODE. The characteristic equation of the ODE\[ \fbox{$2r^2-3r+1=0$}\] Hence \(r=\frac{-b\pm \sqrt{b^{2}-4ac}}{2a}=\frac{3\pm \sqrt{9-4\left ( 2\right ) \left ( 1\right ) }}{4}=\frac{3\pm 1}{4}\). Hence \(r_{1}=1,r_{2}=\frac{1}{2}\). Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}e^{t}+c_{2}e^{\frac{1}{2}t}\]
Find the general solution to \(y^{\prime \prime }+5y^{\prime }=0\).
This is second order, linear, constant coefficient ODE. The characteristic equation of the ODE\[ \fbox{$r^2+5r=0$}\] Which can be written as \(r\left ( r+5\right ) =0\), hence \(r_{1}=0,r_{2}=-5.\)Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}+c_{2}e^{-5t}\]
Find the general solution to \(4y^{\prime \prime }-9y=0\).
This is second order, linear, constant coefficient ODE. The characteristic equation of the ODE\[ \fbox{$4r^2-9=0$}\] Therefore \(r^{2}=\frac{9}{4}\) or \(r=\pm \sqrt{\frac{9}{4}}=\pm \frac{3}{2}\). Hence \(r_{1}=\frac{3}{2},r_{2}=-\frac{3}{2}.\)Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}e^{\frac{3}{2}t}+c_{2}e^{-\frac{3}{2}t}\]
Find the general solution to \(y^{\prime \prime }-9y^{\prime }+9y=0\).
This is second order, linear, constant coefficient ODE. The characteristic equation of the ODE is\[ \fbox{$r^2-9r+9=0$}\] Hence \(r=\frac{-b\pm \sqrt{b^{2}-4ac}}{2a}=\frac{9\pm \sqrt{81-4\left ( 1\right ) \left ( 9\right ) }}{2}=\frac{9\pm \sqrt{81-36}}{2}=\frac{9\pm \sqrt{45}}{2}=\frac{9\pm 3\sqrt{5}}{2}\). Hence \(r_{1}=\frac{9+3\sqrt{5}}{2},r_{2}=\frac{9-3\sqrt{5}}{2}\). Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}e^{\frac{9+3\sqrt{5}}{2}t}+c_{2}e^{\frac{9-3\sqrt{5}}{2}t}\]
Find the general solution to \(y^{\prime \prime }-2y^{\prime }-2y=0\).
This is second order, linear, constant coefficient ODE. The characteristic equation of the ODE is\[ \fbox{$r^2-2r-2=0$}\] Hence \(r=\frac{-b\pm \sqrt{b^{2}-4ac}}{2a}=\frac{2\pm \sqrt{4-4\left ( 1\right ) \left ( -2\right ) }}{2}=\frac{2\pm \sqrt{4+8}}{2}=\frac{2\pm \sqrt{12}}{2}=\frac{2\pm 2\sqrt{3}}{2}=1\pm \sqrt{3}\). Hence \(r_{1}=1+\sqrt{3},r_{2}=1-\sqrt{3}\). Therefore the solution is\[ y\left ( t\right ) =c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}\] Where \(c_{1},c_{2}\) are constants which can be found from initial conditions. Hence the general solution is\[ y\left ( t\right ) =c_{1}e^{\left ( 1+\sqrt{3}\right ) t}+c_{2}e^{\left ( 1-\sqrt{3}\right ) t}\]