# Method of Undetermined Coefficients Streamlined with Complex Arithmetic

I'm currently trying to solve an ordinary differential equation using complex arithmetic. The equation is

$$y''+y=e^{-x}\left [ \cos(2x)-3\sin(2x) \right ]=g(x)$$

Summarizing, I see that $$g(x)$$ is of the special form: $$g(x)=e^{\alpha x}(a_0\cos\beta x+b_0\sin\beta x)$$ where $$\alpha=-1$$, $$\beta=2$$,$$a_0=1$$, and $$b_0=-3$$. We have that

$$g(x)=\Re \left \{ G(x) \right \}$$ where, summarizing, $$G(x)$$ is of the form $$G(x)=e^{(\alpha -i\beta )x}(a_0+ib_0)\rightarrow e^{(-1-2i)x}(1-3i)$$ So now I'm supposing that we can find a complex-valued solution $$Y$$ to the equation

$$L\left [ Y \right ]=Y''+Y=G(x)=e^{(-1-2i)x}(1-3i)$$

According to my textbook, the method of undetermined coefficients asserts that any differential equation of the form

$$L\left [ Y \right ]=e^{(\alpha \pm i\beta )x}\left [ (a_n+ib_n)x^n+...+(a_1+ib_1)x+(a_0+ib_0) \right ]$$

has a solution of the form

$$Y_p(x)=x^se^{(\alpha \pm i\beta )x}\left [ A_nx^n+...+A_1x+A_0\right ]$$,

where $$A_n,...,A_0$$ are complex constants and $$s$$ is the smallest nonnegative integer such that no term in this equation is a complex solution to the corresponding homogeneous equation $$L\left [ Y \right ]=0$$.

I'm confused on how to apply these statements to this particular problem. Seeing this done as an example would be very appreciated.

• I ended up figuring it out, simply a matter of understanding what was written. Commented Nov 11, 2021 at 5:29

$$y''+y = c_0 e^{(\alpha+i\beta)x}$$ a particular solution has the structure $$y_p = c_1 e^{(\alpha+i\beta)x}$$ and after substituting we have
$$c_1(\alpha+i\beta)^2+c_1 = c_0$$
$$y_p = \frac{c_0}{(\alpha+i\beta)^2+1}e^{(\alpha+i\beta)x}$$