Find a second order ODE which is satisfied by a function with arbitrary constants. Given an initial function $y(x)=C_1x+C_2\sin(x)$ how can I derive a second order differential equation with no arbitrary constants?
I have attempted by finding the derivatives: $y'=C_1+C_2\cos(x)$;  $y''=-C_2\sin(x)$; and then forming an ODE of the form $y''+Ay'+By=0,$ but I am unable to find values for $A$ and $B$ which satisfy this. 
 A: To eliminate the first constant, write
$$\frac yx=C_1+C_2\frac{\sin x}x$$
then taking the derivative,
$$\frac{y'x-y}{x^2}=C_2\frac{\cos x\, x-\sin x}{x^2}.$$
To eliminate the second constant, now write
$$\frac{y'x-y}{\cos x\,x-\sin x}=C_2.$$
After differentiation and simplification, the numerator yields 
$$y''(\cos x\,x-\sin x)+(y'x-y)\sin x=0.$$
A: A general second order ODE (in $y$) that these two basis functions have to satisfy by basic properties of the determinant is
$$
0=\det\pmatrix{y&y_1&y_2\\y'&y_1'&y_2'\\y''&y_1''&y_2''}
=\det\pmatrix{y&x&\sin x\\y'&1&\cos x\\y''&0&-\sin x}
=\det\pmatrix{y+y''&x&0\\y'&1&\cos x\\y''&0&-\sin x}
$$
Expanding for the first row then results in
\begin{align}
0&=(y''+y)(-\sin x)-x(-y'\sin x-y''\cos x)
\\
&=(x\cos x-\sin x)\,y''(x)+x\sin x\, y'(x)-\sin x\, y(x).
\end{align}
A: You're on the right track. What really helps here is to differentiate in such a way as to eliminate the constants more quickly. Note that this is one of the standard tricks in ordinary differential equations. For example:
\begin{align*}
y(x)&=C_1x+C_2\sin(x)\\
y(x)-C_2\sin(x)&=C_1x \\
\frac{y(x)-C_2\sin(x)}{x}&=C_1 \\
\frac{d}{dx}\bigg[\frac{y(x)-C_2\sin(x)}{x}&=C_1\bigg] \\
\frac{x(y'(x)-C_2\cos(x))-(y(x)-C_2\sin(x))}{x^2}&=0 \\
x y'(x)-C_2x \cos(x)-y(x)+C_2\sin(x)&=0 \\
xy'(x)-y(x)&=C_2(x\cos(x)-\sin(x)) \\
\frac{xy'(x)-y(x)}{x\cos(x)-\sin(x)}&=C_2 \\
\frac{d}{dx}\bigg[\frac{xy'(x)-y(x)}{x\cos(x)-\sin(x)}&=C_2\bigg] \\
\frac{(x\cos(x)-\sin(x))(xy''(x))-(xy'(x)-y(x))(-x\sin(x))}{(x\cos(x)-\sin(x))^2}&=0 \\
xy''(x)(x\cos(x)-\sin(x))+x\sin(x)(xy'(x)-y(x))&=0 \\
y''(x)(x\cos(x)-\sin(x))+\sin(x)(xy'(x)-y(x))&=0.
\end{align*}
So there you go.
