# solving second order linear ODE

I do not know how to solve this differential equation: $$\frac{a}{x}y'(x) + \frac{1}{2}y''(x) = 0$$

where $a$ is a constant. Also how can I solve this equation if the right hand side is different than zero?

-
what do you mean 'right hand side different than zero'? Do you mean a constant term or a function? – Riccardo.Alestra Feb 15 '12 at 20:29

Consider $z=y'$. Then this is just $\frac{a}{x}z(x)+\frac{1}{2}z'(x)=0$. That is $z'=-\frac{2a}{x}z$ which is separable.

$\ln|z|=\int \frac{dz}{z} = \int -\frac{2a}{x}dx=-2a\ln|x|+C_0$ and so $y'=z=C_1x^{-2a}$.

Integrating yields $y=\frac{C_1}{1-2a}x^{1-2a}+C_2$

-
you missed a $-$. – Pedro Tamaroff Feb 15 '12 at 20:34
@Peter thanks!! – Bill Cook Feb 15 '12 at 20:36
...and you got the credit! :| – Pedro Tamaroff Feb 15 '12 at 20:46

Substitute : $~y'=u \Rightarrow y''=u'~$ , so :

$$\frac{1}{2}u'+\frac{a}{x}u=0 \Rightarrow \frac{1}{2}u'=\frac{-a}{x}u \Rightarrow \int \frac{du}{u} = -2a\int \frac {dx}{x}$$

-

Assuming a solution in an interval not containing $x=0$, lets rewrite the equation as:

$$2ay' + xy'' = 0$$

Now put $y'=v$, $y'' = v'$ to get

$$2av + xv' = 0$$

Separating variables produces

$$\frac{2a}{x} =- \frac{v'}{v}$$

$$2a\log{Cx} =-\log v$$

$$2a\log{Cx} =-\log v$$

$${Kx^{-2a}} =y'$$

$$\frac{Kx^{1-2a}}{1-2a}+C =y \text{ and } a \neq \frac{1}{2}$$

-