MAT202 Test solution
Photo Credit: Mymathware |
This is my very first tutorial on ordinary differential equation,
i am looking into some basic problems of O.D.E's and how to solve them.
This problems are obtained from
the continuous assessment of MAT202[Ordinary Differential Equations] course.
The problems include:
(i) Linear first order differential equation
(ii) How to evaluate homogeneous differential equations with
boundary conditions using Laplace transforms.
(iii) How to solve non-homogeneous linear differential equations using the method of
undetermined coefficients
(iv) And lastly, i also treated how to evaluate the
Laplace transforms of functions and how to evaluate the inverse Laplace transforms.
(1) Solve $\frac{dy}{dx}+y=y^2$
Solution
This is a linear first order differential equation
$\frac{dy}{dx}+y=y^2$
$\frac{dy}{dx}=y(y-1)$
using variable separable form we get
$(\frac{1}{y-1}-\frac{1}{y})dy=dx$........(1)
you can verify the fact that
$(\frac{1}{y-1}-\frac{1}{y})dy=dx\Rightarrow\frac{dy}{dx}=y(y-1)$
we now integrate both sides of (1)
$\ln(y-1)-\ln(y)=x+C$ where $C$ is the constant of integration
by the laws of logarithm functions we get
$\ln(\frac{y-1}{y})=x+C$
$\frac{y-1}{y}=e^{x+C}$
$\frac{y-1}{y}=Ce^{x}$
now we need to obtain $y$
$y-1=yCe^x$
$y-yCe^x=1$
$y(1-Ce^x)=1$
$y=\frac{1}{1-Ce^x}$
and that's the required solution
(2) Solve the equation $y"+4y=0$, $y(0)=2$, $y'(0)=2$ by laplace transform method
Solution
This is a simple linear homogeneous differential equation,
but remember you do not have to solve it using the homogeneous method
because the questions says
"Use laplace transform method".
So we begin by taking the the laplace of the whole equation by:
$L\{y"\}+4L\{y\}=0$
and by the rules of taking laplace of a
differential equation we are going to have:
$=S^2L\{y\}-Sy(0)-y'(0)+4L\{y\}=0$
now we simply substitute the boundary conditions $y(0)=2$ and $y'(0)=2$ to get:
$S^2L\{y\}-2S-2+4L\{y\}=0$
rearrange the equation by collecting the like terms
$S^2L\{y\}+4L\{y\}-2S-2=0$
factor out $L\{y\}$
$L\{y\}[S^2+4]-2S-2=0$
$L\{y\}[S^2+4]=2S+2$
make $L\{y\}$ subject of the formula
$L\{y\}=\frac{2S+2}{S^2+4}$
Now take the lapalce inverse to obtain $y$
$y=L^{-1}\{\frac{2S+2}{S^2+4}\}$
Factor out $2$ from the numerator to get.
$y=2L^{-1}\{\frac{S+2}{S^2+4}\}$
separate the laplace function.
$=2L^{-1}\{\frac{S}{S^2+4}+\frac{2}{S^2+4}\}$
take the laplace inverse individually
$=2L^{-1}\{\frac{S}{S^2+4}\}+2L^{-1}\{\frac{2}{S^2+4}\}$
and by the properties of laplace transforms we get
$=2\cos{2t}+2\sin{2t}$
(3) Solve the equation using undetermined coefficient
$\frac{d^2}{dx^2y}-4\frac{dy}{dx}+3y=x^2$
Solution
This is a linear non-homogeneous differential equation,
and we can simply rewrite the equation as
$y"-4y'+3y=x^2$........(i) to get equation one
To solve this equation using undetermined coefficient,
there are three things involved namely
(i) Solving the homogeneous solution $Y_h$
(ii) Solving the particular solution $Y_p$
(iii) And the general Solution $Y=Y_h+Y_p$
Now we begin with the homogeneous solution
Let $y"-4y'+3y=0$
The characteristic equation of this differential equation is
$m^2-4m+3=0$
$(m-1)(m-1)=0$
$m=1$ and $m=3$
Since the characteristic equation has a real but
different root then the homogeneous solution is:
$Y_h=C_{1}e^x+C_2e^{3x}$........(ii)
Now we proceed to the particular solution
Let $g(x)=x^2$, here we see that the polynomial at the
right hand side is a second degree
polynomial so we construct a second degree polynomial for $Y_p$
$Y_p=A_{2}x^2+A_{1}x+A_0$...........(iii)
we differentiate twice because the given D.E in the question is
a second order differential equation
$Y'_p=2A_2{x}+A_1$.......(iv)
$Y"_{p}=2A_2$.........(v)
substitute $Y_p$,$Y'_{p},Y"_{p}$ into (i)
$2A_2-4(2A_2x+A_1)+3(A_2x^2+A_1x+A_0)=x^2$
Now we equate the coefficient of the L.H.S to that of the R.H.S
$2A_2=1$............(vi)
$-8A_2-4A_1=0$......(vii)
$3A_2+3A_1+3A_0=0$..........(viii)
from (vi) we get $A_2=\frac{1}{2}$
substitute $A_2=\frac{1}{2}$ into (v)
$\Rightarrow{-8}(\frac{1}{2})-4A_1=0$
$=4A_1=4$
$=A_1=-1$
substitute $A_1$ and $A_2$ into (vi)
$\Rightarrow{3}(\frac{1}{2})+3(-1)+3A_0=0$
$\Rightarrow{A_0}=\frac{1}{3}$
Hence The values of the particular solution are $A_0=\frac{1}{3}$,
$A_1=-1$, and $A_2=\frac{1}{2}$
The particular solution is
$Y_p=\frac{1}{2}x^2-x+\frac{1}{3}$
And this leads us to a general solution
$Y=Y_h+Y_p$
$Y=Y_h=C_{1}e^x+C_2e^{3x}+\frac{1}{2}x^2-x+\frac{1}{3}$
(4) (i) find the $L\{e^{at}\cos{bt}\}$
Solution
To evaluate this laplace transform without waste of time,
i will apply the shifting theorem
using the property of laplace transformation for $L\{e^{at}f(t)\}=F(s-a)$
if $L\{f(t)\}=F(s)$
and $L\{\cos{bt}\}=\frac{s}{s^2+b^2}$
then by the shifting theorem we have
$L\{e^{at}\cos{bt}\}=\frac{(s-a)}{(s-a)^2+b^2}$
(ii) Find $L^{-1}\{\frac{s}{s^2+6s+25}\}$
Solution
I will try to make the solution of this Laplace transform as easy as possible,
because many
people studying Laplace inverse find it difficult to evaluate,
so i will be simplifying the
transform to the easiest form, but in as much as i will be
simplifying it, you still need
basic knowledge of the Laplace transforms and algebraic simplifications.
$L^{-1}\{\frac{s}{s^2+6s+25}\}$
We can rewrite this as
=$L^{-1}\{\frac{s}{s^2+6s+9+16}\}$
$=L^{-1}\{\frac{s}{(s^2+6s+9)+4^2}\}$
$=L^{-1}\{\frac{s}{(s^2+3s+3s+9)+4^2}\}$
$=L^{-1}\{\frac{s}{(s^2+3s)+(3s+9)+4^2}\}$
$=L^{-1}\{\frac{s}{s(s+3)+3(s+3)+4^2}\}$
$=L^{-1}\{\frac{s}{(s+3)(s+3)+4^2}\}$
$=L^{-1}\{\frac{s}{(s+3)^2+4^2}\}$
this can be rewritten as
$=L^{-1}\{\frac{s+3-3}{(s+3)^2+4^2}\}$
we can further split this to get
$=L^{-1}\{\frac{s+3}{(s+3)^2+4^2}\}-L^{-1}\{{\frac{3}{(s+3)^2+4^2}}\}$
this can be rewritten as
$L^{-1}\{\frac{s+3}{(s+3)^2+4^2}\}-\frac{3}{4}L^{-1}\{\frac{4}{(s+3)^2+4^2}\}$
and by the properties of Laplace transform we have
$=L^{-1}\{e^{-3t}\cos{4t}\}-\frac{3}{4}L^{-1}\{e^{-3t}\sin{4t}\}$
$=\{e^{-3t}\cos{4t}\}-\frac{3}{4}\{e^{-3t}\sin{4t}\}$
Now we factor out $e^{-3t}$ to get
$=e^{-3t}\{\cos{4t}-\frac{3}{4}\sin{4t}\}$
And this brings us to the end of the solution.