Use variation of parameters to find the solution of the diff
Solution
First we solve associatd homogeneous ode
y\'\'+4y=0
Solution to this equation is
yh=A sin(2t)+B cos(2t)
For particular solution we assume:
yp=P(t) sin(2t)+Q(t) cos(2t) , taking the solution to homogeneous equation and treat coefficients
as functions of t
with the constraint
P\' sin(2t)+Q\' cos(2t)=0
ie Q\'=-P\' tan(2t)
yp\'=2 P cos(2t)-2Q sin(2t)
yp\'\'=-4yp+2P\' cos(2t)-2Q\' sin(2t)
Substituting gives
2P\' cos(2t)-2Q\' sin(2t)=3 cosec(2t)
2P\' cos(2t)+2P\' tan(2t)=3 cosec(2t)
2P\'=3 cot(2t)
INtegrating gives
2P=3 ln(sin(2t))
P=3 ln(sin(2t))/2
2P\'=3 cot(2t)
Q\'=-P\' tan(2t)
HEnce, Q\'=-3/2
Q=-3t/2
yp=3 ln(sin(2t))sin(2t)/2-3t cos(2t)/2
Henc general solution is
y=A sin(2t)+B cos(2t)+3 ln(sin(2t))sin(2t)/2-3t cos(2t)/2
