TITLE: How to solve $y''' - y = 2\sin(x)$
QUESTION [8 upvotes]: $$y''' - y = 2\sin(x)$$
I'm doing differential equations and know pretty much all methods of solving them, but I haven't come across anything of a higher order than second yet. 
How do I go about solving this?

REPLY [2 votes]: One way to look for particular solutions to the given equation (I'll assume you're fine with the homogeneous solution, which is generally easier, in principle), is the following.
Consider the collection of function $f, f', f'', f''', f^{(iv)}, \ldots$. If at some point these functions form a finite-dimensional vector space i.e. there ends up being some linear relation of the form
$$
f^{(n)} = \sum_{k=0}^{n-1}a_kf^{(k)}
$$
then you can use as a guess for your particular solution the test function
$$
\sum_{k=0}^{n-1}A_kf^{(k)}
$$
If you substitute this into the differential equation, then you will find some linear equations which will determine the coefficients $A_k$. This is, in a nutshell, the method of undetermined coefficients.
In your case, $f = 2\sin(x)$. Its derivatives are $f' = 2\cos(x)$ and $f'' = -2\sin(x)$, which yields the relation
$$
f'' = (-1)f + 0 f'
$$
and so we would use the guess
$$
y_p(x) = Af(x) + Bf'(x)
$$
or more simply,
$$
y_p(x) = A\sin(x) + B\cos(x)
$$