# How to solve $2^\text{nd}$ order ODE $y'' + 4y' + 8y = 145\cos(3x)$

I tried using the method of undetermined coefficients to find the particular solution for this equation. However, I got stuck halfway through.

I'm not sure if this is the correct way to approach this equation. Help will be greatly appreciated.

• That doesn't look like undetermined coefficients - at least not the way I learned it. Why not set y = Acos(3x) + Bsin(3x), differentiate twice and plug into the original equation? Oct 30 '20 at 14:53
• Welcome to the website. Please use Mathjax to format your equations in future, instead of attaching pictures. Oct 30 '20 at 15:06

You have solved it correctly. You get $$U=145/(12i-1)=-1-12i$$, so the paeticular solution of $$y''+4y'+8y=145e^{i3x}$$ is $$Ue^{i3x}=(-1-12i)e^{i3x}=12\sin3x-\cos3x+i(\cdot\cdot\cdot)$$. Clearly the real part of this particular solution generates the real part of the ODE it satisfies i.e. $$145\cos3x$$, so the particular solution of original ODE is $$12\sin3x-\cos 3x$$.
Suppose $$f(x)+ig(x)$$ is a solution of $$\mathcal Ly=h(x)+ik(x)$$, where $$\mathcal L$$ is a linear differential operator with real-valued coefficients (in your case $$D^2+4D+8)$$. Then$$\mathcal L(f+ig)=\cal Lf+i~\cal Lg=h+ik$$Now equate the real and complex parts. This means $$f$$ satisfies $$\cal Lf=h$$ and $$g$$ satisfies $$\cal Lg=k$$.
In your case, $$f(x)=12\sin3x-\cos 3x$$ and $$h(x)=145\cos3x$$.