# How do you solve y''' + y = 2 - sinx?

Feb 21, 2015

Hello !

$y \left(x\right) = A {x}^{- 1} + B \cos \left(\frac{\sqrt{3}}{2} x\right) + C \sin \left(\frac{\sqrt{3}}{2} x\right) + 2 - \frac{\cos \left(x\right) + \sin \left(x\right)}{2}$
where $A , B , C$ are real constants.

• First, solve the homogeneous equation : $y ' ' ' + y = 0$.

The characteristic equation is ${x}^{3} + 1 = 0$, the complex roots are $- 1 , - j , - {j}^{2}$, where $j = {e}^{i \frac{2 \pi}{3}} = - \frac{1}{2} + i \frac{\sqrt{3}}{2}$ (famous number !)

So, the solutions of $y ' ' ' + y = 0$ are the functions :
$x \setminus \mapsto \lambda {x}^{- 1} + \mu {x}^{- j} + \nu {x}^{- {j}^{2}}$
where $\lambda , \mu , \nu$ are arbitrary complex constants.

Maybe you wish real solutions. It's not a problem. Take the real part.
1) ${x}^{- j} = {e}^{- j \ln \left(x\right)} = {e}^{\left(\frac{1}{2} - i \frac{\sqrt{3}}{2}\right) \ln \left(x\right)} = \sqrt{x} {e}^{- i \frac{\sqrt{3}}{2} \ln \left(x\right)}$.
2) Same thing with ${x}^{- {j}^{2}}$, with $- {j}^{2} = \frac{1}{2} + i \frac{\sqrt{3}}{2}$ :
${x}^{- {j}^{2}} = \sqrt{x} {e}^{i \frac{\sqrt{3}}{2} \ln \left(x\right)}$.

The real solutions of $y ' ' ' + y = 0$ are :
$x \setminus \mapsto A {x}^{- 1} + B \cos \left(\frac{\sqrt{3}}{2} x\right) + C \sin \left(\frac{\sqrt{3}}{2} x\right)$
where $A , B , C$ are real constants.

• Second, find a particular solution of $y ' ' ' + y = 2 - \sin \left(x\right)$. To do that,
1) find a particular solution (so called ${f}_{1}$) of $y ' ' ' + y = 2$
2) find a particular solution (so called ${f}_{2}$) of $y ' ' ' + y = \sin \left(x\right)$
A particular solution of $y ' ' ' + y = 2 - \sin \left(x\right)$ will be ${f}_{1} - {f}_{2}$.

1) To find ${f}_{1}$, it's really easy : take ${f}_{1} \left(x\right) = 2$ (constant function).

2) To find ${f}_{2}$ it's more clever. Remember that
$\frac{{d}^{3}}{d {x}^{3}} \cos \left(x\right) = \sin \left(x\right)$ and $\frac{{d}^{3}}{d {x}^{3}} \sin \left(x\right) = - \cos \left(x\right)$,
so you have
$\frac{{d}^{3}}{d {x}^{3}} \left(\cos \left(x\right) + \sin \left(x\right)\right) = 2 \sin \left(x\right)$, therefor :
$\frac{{d}^{3}}{d {x}^{3}} \left(\frac{\cos \left(x\right) + \sin \left(x\right)}{2}\right) = \sin \left(x\right)$.
So, you can take ${f}_{2} \left(x\right) = \frac{\cos \left(x\right) + \sin \left(x\right)}{2}$.

Finally, a particular solution of $y ' ' ' + y = 2 - \sin \left(x\right)$ is
$x \setminus \mapsto 2 - \frac{\cos \left(x\right) + \sin \left(x\right)}{2}$.

Conclusion. All the (real) solutions of $y ' ' ' + y = 2 - \sin \left(x\right)$ are
$x \setminus \mapsto A {x}^{- 1} + B \cos \left(\frac{\sqrt{3}}{2} x\right) + C \sin \left(\frac{\sqrt{3}}{2} x\right) + 2 - \frac{\cos \left(x\right) + \sin \left(x\right)}{2}$
where $A , B , C$ are real constants.