Differential Equations – Solving y??? + 2y?³? + y’ = 2x + sin(x) + cos(x)

ordinary differential equations

I'm trying to solve the differential equation $$L[y] = y^{(5)} + 2y^{(3)} + y' = 2x + \sin(x) + \cos(x)$$ using the method of undetermined coefficients. I'm having a problem in that my solution differs from that given, and I am trying to find out why. First we note that the characteristic equation is $$r^5 + 2r^3 + 1 = r(r^2 + 1)^2$$ whose roots are $0$ and $\pm i$ twice.

So the complementary function to the homogeneous case $L[y]=0$ is
$$C_0 + C_1 e^{ix} + C_2 e^{-ix} + C_3 x e^{ix} + C_4 x e^{-ix}.$$

Now to tackle the particular solution. So I thought if I solve the differential equation for each of the terms of the right hand side, namely Solve $L[y]=2x$, $L[y] = \sin x$ and $L[y] = \cos x$ then add them up, I will get a particular solution.

The first involving a linear function is easy, $y_p$ for that just works out as $x^2$.

However for the other two involving trigonometric functions, I try and solve $L[y] = e^{ix}$ and take the imaginary and real parts respectively for $L[y]=\sin x$ and $L[y]=\cos x$.

Now as my R.H.S. is $e^{ix}$ which is already contained in the complementary function, I make the ansatz that my $y_p$ should be of the form $Bx^2 e^{ix}$.

So calculating substituting this ansatz for $y_p$ into the differential equation $L[y] = e^{ix}$ and comparing coefficients, I get that $B = \frac{i}{8}$, so that $$y_p = \frac{ie^{ix}}{8}$$ and $$\text{Re}(y_p) = \frac{- \sin x}{8},\qquad \text{Im}(y_p) = \frac{\cos x}{8}.$$

So the full solution to my differential equation $L[y] = 2x + \sin x + \cos x$ is $$y_c + y_p = C_0 + C_1 e^{ix} + C_2 e^{-ix} + C_3 x e^{ix} + C_4 x e^{-ix} + x^2 + \frac{- \sin x}{8} + \frac{\cos x}{8}.$$

But when I check the solution given it says that my cosine and sine terms have to have a $x^2$ term in the front of them. What's wrong, is my initial guess not right?

Ben

Best Answer

From the comment by GWu:
Your general solution involves $e^{ix}$ and $xe^{ix}$. So if you want the particular solution with $\sin x$ and $\cos x$ (which are disguised forms of $e^{ix}$ and $e^{-ix}$), then you have to try $A x^2\cos x + Bx^2\sin x$