For each of the following differential equations find yc and
Solution
a.
First we solve homogeneous ode and get y_c
Homogeneous ode is
y\'\'+y=0
y\'\'=-y
Hence,
yc=A sin(x)+B cos(x)
Now based on the inhomogeneous part the guess for particular solution is
yp=Cx^2+Dx+E
yp\'=2Cx+D
yp\'\'=2C
Substituting gives
2C+Cx^2+Dx+E=x^2
COmparing coefficients gives
D=0,C=1,2C+E=0
E=-1/2
yp=x^2-1/2
So general solution is
y=A sin(x)+B cos(x)+x^2-1/2
b.
y\'\'+4y=sin(2x)
First we look for yc ie solution to homogeneous ode
y\'\'=-4y=-2^2y
Hence,
yc=A sin(2x)+B cos(2x)
Now we guess yp based on inhomogeneous part. Normally the guess would be
C sin(2x)+D cos(2x)
But this is already solution to homogeneous ode
So we take the guess
yp=x(C sin(2x)+D cos(2x))=xyc
yp\'=xyc\'+yc
yp\'\'=2yc\'+xyc\'\'
Substituting and using yc is a solution to homogeneous ode gives
2yc\'=sin(2x)
2(2C cos(2x)-2D sin(2x))=sin(2x)
This gives, C=0,D=-1/4
So,yp=-cos(2x)/4
Hence general solution is
y=A sin(2x)+B cos(2x)-cos(2x)/4

