Checking Solutions of a Second Order Differential Equation There is a question that I got stuck on. The question is: Is there a second order linear non-homogeneous differential equation such that $x$, $\sin(x)$, $\cos(x)$ are solutions of it.
I managed to solve the same question but for a homogeneous equation. I tried to use the fact that the difference between 2 solutions of the non-homogeneous equation is a solution of the matching homogeneous equation (i.e. $\sin(x)-\cos(x)$ is a solution of the matching homogeneous equation, etc...).
Thanks in advance for any help :)
 A: Your question is: does there exist a differential equation $y''+p(x)y'+q(x)y=r(x)$, with $p(x)$, $q(x)$, and $r(x)$ continuous on the interval $(0,2\pi)$, for which $y(x)=x$, $y(x)=\sin(x)$, and $y(x)=\cos(x)$ are solutions? As you correctly pointed out, in that case the difference of any two of them would be a solution to the associated homogeneous equation $y''+p(x)y'+q(x)y=0$.
So we can rephrase our task as follows: does there exist a homogeneous differential equation $y''+p(x)y'+q(x)y=0$, with $p(x)$ and $q(x)$ continuous on the interval $(0,2\pi)$, for which $y_1(x)=\sin(x)-x$ and $y_2(x)=\cos(x)-x$ are solutions?
But that is impossible. If such an equation exists, then the Wronskian of any two solutions would be either identically equal to zero on $(0,2\pi)$ if they are linearly dependent or never equal to zero on $(0,2\pi)$ if they are linearly independent. The Wronskian of these two functions is
$$W(y_1,y_2)=\begin{vmatrix} \sin(x)-x & \cos(x)-x \\ \cos(x)-1 & -\sin(x)-1 \end{vmatrix}=x\sin(x)+x\cos(x)+\cos(x)-\sin(x)-1.$$
It is clearly not the identically zero function (which was expected, as $y_1(x)$ and $y_2(x)$ are pretty obviously not linearly dependent), but it has some roots within $(0,2\pi)$, see the graph.

