fIs it possible to solve the D.E. $f''(x) + a(x) f'(x) + bf(x) = 0 $ for arbitrary $a(x)$? I have a second order differential equation with a coefficient which depends on the independent variable in a generally unspecified way. The equation is
$$f''(x) + a(x) f'(x) + b f(x) = 0 $$
I would like to obtain $f(x)$ for some boundary values.
For small $x$ the general solution of this equation should be close to
$$ f(x) = A \exp\Big[-\int_0^x \frac{b}{a(x')}dx'\Big],$$
whereas if $b=0$ then the solution is
$$ f(x) = A \int_0^x e^{-K(x)}dx + B,$$
where $K(x) = \int_0^x a(x')dx'.$
For arbitrary $x$ and $b$ I am not sure how to proceed. Can anyone suggest maybe a substitution for convert this equation into an easier problem? I was thinking $g(x) = f(x)/a(x)$ seemed rather natural but I cannot make progress with this one.
 A: Let $g=f'$, then the ODE reduces to $g'(x)+a(x)g(x)+b=0$. Let $\mu(x)$
be a function that will be determined soon. Observe that
$$
\frac{d}{dx}(\mu(x)g(x))=\mu(x)g'(x)+\mu'(x)g(x).
$$
Therefore, if we multiply $\mu(x)$ on both sides of the ODE and choose
$\mu(x)$ such that $\mu(x)a(x)=\mu'(x)$, then
$$
\frac{d}{dx}(\mu(x)g(x))=-b\mu(x)
$$
and the ODE can be solved. Put everything formally:
Define $\mu(x)=\exp\left(\int_{0}^{x}a(t)dt\right),$ then $\mu'(x)=\mu(x)a(x)$.
Therefore, multiplying $\mu(x)$ on both sides of the ODE, we have
that
\begin{eqnarray*}
\mu(x)g'(x)+\mu(x)a(x)g(x) & = & -b\mu(x)\\
\mu(x)g'(x)+\mu'(x)g(x) & = & -b\mu(x)\\
\frac{d}{dx}\left(\mu(x)g(x)\right) & = & -b\mu(x)\\
\mu(x)g(x) & = & C-b\int\mu(x)dx.
\end{eqnarray*}
A: $$f''(x) + a(x) f'(x) + b f(x) = 0 $$
For example :
If $a(x)=\frac{1}{x}$ the solution involves Bessel functions.
If $a(x)=e^x$ the solution involves confluent hypergeometric functions.
If $a(x)=\tan(x)$ the solution involves hypergeometric function and Meijer G-function.
Etc.
In many cases some special functions are involves in the solution. But in most of the cases no convenient standard special function is available.
Thus in the general case the solution cannot be expressed with a finite number of standard functions. One have to use infinite series (if possible) or more commonly to solve the problem thanks to numerical calculus.
