# Solving differential equation $y^{(5)} + 2y^{(3)} + y' = 2x + \sin(x) + \cos(x)$

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

-
Isn't your $y_p=Bx^2e^{ix}, B=\frac i 8$? then $\sin x$ and $\cos x$ do have $x^2$ in front of them. –  GWu Apr 16 '11 at 1:21
@GWu Oh my god I don't believe this how did I make such a bad error!! I must have been blind! Yes certainly $y_p = \frac{i x^2 e^{ix}}{8}$ so the sine and cosine have an $x^2$ in front of them; now how did I miss that???? –  user38268 Apr 16 '11 at 1:48
@GWu: you should probably post that as an answer. –  Willie Wong Apr 16 '11 at 17:41
you should probably post that as an answer because if you don't, then the sustem will keep reposting this to the front page, hoping for an answer. –  GEdgar Jul 4 '11 at 16:56
@GEdgar: It has been a couple months, so I wonder if GWu is going to do it. Maybe you can undelete your answer? –  Willie Wong Jul 4 '11 at 17:17

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$