Personally, I feel that "Laplace transform" is NEVER a good way to solve an ordinary linear differential equation! Instead, solve the "characteristic equation". In a "differential equations" course, that typically is taught well
before "Laplace transform". Did you learn it in a physics or engineering class?
For the linear differential equation, with constant coefficients,
any(n)+⋅⋅⋅+a1y′+a0y=0 has "characteristic equation"
antn+⋅⋅⋅+a1t+a0=0.
(If you "try"
y=etx as a solution, it reduces to
(antn+⋅⋅⋅+a1t+a0)etx=0a. Since
etx is never 0,
antn+⋅⋅⋅+a1t+a0 must be 0. If solutions to that characteristic equation are
s1,
s2, etc., then the solutions to the differential equation are of the form
Aes1x,
Bes2x, etc. with "A", "B", etc.)
Here, your equation is
y′′−2y′+4y so the characteristic equation is
s2−2s+5=s2−2s+4+1=(s−2)2+1=0 which has roots s= 2+ i and s= 2- i. Solutions to the differential equation are
Ae(2+i)x and
Be(2−i)x.
Since all numbers in the differential equation are real, we would prefer a solution written in terms of real numbers only. So write
e(2+i)x=e2xeix. But now we can use the identity,
eix=cos(x)+isin(x). That is,
e2eix=e2(cos(x)+isin(x)) so that
Ae(2+i)x)+Be(2−ix)=Ae2x(cos(x)+isin(x))+Be2x(cos(x)−isin(x))=e2x((A+B)cos(x)+i(A−B)sin(x))=e2x(Ccos(x)+Dsin(x)) where C= A+ B, D= Ai- Bi.
Given
y(x)=e2x(Ccos(x)+Dsin(x), we also have
y′=(e2x)′(Ccos(x)+Dsin(x))′+(e2x)(Ccos(x)+Dsin(x))′=2e2x(Ccos(x)+Dsin(2x))+e2x(−Csin(x)+Dcos(x)).
e0=1,
cos(0)=1, and
sin(0)=0 so
y(0)=C=2 and
y′(0)=D=−4.
That is,
y(x)=e2x(2cos(x)−4sin(x)).