I can't tell if you're asking this in total generality (ie, $f(x)$, $g(x)$, $h(x)$ are arbitrary) or if you are abstracting the specifics to convey the "gist" of your problem. One thing that comes to mind is that if you know the coefficients of an equation $y'' + p(x) y' + q(x) y = 0$ (your equation has this form, at least near values of $x$ where $f(x)$ is nonzero) you can, via "Abel's formula", write down the Wronskian of any two solutions to the equation. With this and one solution to the DE, you have a first order DE you can try to solve for another solution to the original equation.
–
leslie townesFeb 5 '12 at 20:58

In you example, by direct substitution, you are forced to admit that f(x)-g(x)+h(x)=0$ and the only possible solution is that these are constants.
–
JonFeb 5 '12 at 20:58

2 Answers
2

You can proceed using Abel's integration identity.
In general for differential equations of the form
$$
\sum\limits_{k=0}^n a_k(x)y^{(n-k)}(x)=0
$$
we can consider its solutions $y_1(x),\ldots,y_n(x)$ and define so called Wronskian
$$
W(y_1,\ldots,y_n)(x)=
\begin{pmatrix}
y_1(x)&&y_2(x)&&\ldots&&y_n(x)\\
y'_1(x)&&y'_2(x)&&\ldots&&y'_n(x)\\
\ldots&&\ldots&&\ldots&&\ldots\\
y'_1(x)&&y'_2(x)&&\ldots&&y'_n(x)\\
\end{pmatrix}
$$
Then we have the following identity
$$
\det W(x)=\det W(x_0) e^{-\int\limits_{x_0}^x \frac{a_1(t)}{a_0(t)}dt}
$$
In particular for your problem we have the following differential equation
$$
\begin{vmatrix}
y_1(x)&&y_2(x)\\
y'_1(x)&&y'_2(x)
\end{vmatrix}=C e^{-\int\frac{-(x^2-2)}{x^2-2x}dx}
$$
with $y_1(x)=e^x$. Which reduces to
$$
y'_2(x)e^x-y_2(x)e^x=C e^{\int\frac{x^2-2}{x^2-2x}dx}=C(2x-x^2)e^x
$$
After division by $e^{2x}$ we get
$$
\frac{y'_2(x)e^x-y_2(x)e^x}{e^{2x}}=C(2x-x^2)e^{-x}
$$
which is equivalent to
$$
\left(\frac{y_2(x)}{e^x}\right)'=C(2x-x^2)e^{-x}
$$
It is remains to integrate
$$
\frac{y_2(x)}{e^x}=Cx^2 e^{-x}+D
$$
and write down the answer
$$
y_2(x)=Cx^2+D e^{x}
$$
In fact this is a general solution of original equation.