# Thread: Help me to solve a second order differential equation.

1. ## Help me to solve a second order differential equation.

Can any one help me to solve a differential equation of the form

d2y/dx2 + f(x) y = 0

where, f(x) can be any kind of function
e.g. f(x)=sin2x or exp(x) or ax2+bx+c or cosech(x) etc.

2. Originally Posted by skullface
Can any one help me to solve a differential equation of the form

d2y/dx2 + f(x) y = 0

where, f(x) can be any kind of function
e.g. f(x)=sin2x or exp(x) or ax2+bx+c or cosech(x) etc.
ODE's without constant coefficients are hard to find general solutions to.
One common method is to attempt to find a power series solution centered around your initial conditions. (The other is numerically)

It usually goes something like this suppose that

Note that I am using the $\displaystyle y_n$ to be the constants in the series expansion

$\displaystyle \displaystyle y(x)=\sum_{n=0}^{\infty}y_nx^n \implies y(x)''=\sum_{n=0}^{\infty}(n+1)(n+2)y_{n+2}x^n$

Now we need to do the same thing with $\displaystyle f(x)$ this gives

$\displaystyle \displaystyle f(x)=\sum_{n=0}^{\infty}f_nx^n$

Now comes the bad part we need to product of the series
$\displaystyle f(x)y(x)$

$\displaystyle \begin{array}{c c c c c c c c c c c c} \,& (f_0 &+& f_1x &+&f_2x^2&+& \cdots & +&f_nx^n&+&\cdots )\\ \times &(y_0 &+& y_1x &+&y_2x^2&+& \cdots & +&y_nx^n&+&\cdots )\\ \hline \,&y_0f_0 &+& y_0f_1x &+&y_0f_2x^2&+& \cdots & + & y_0f_nx^n & + & \cdots \\ \,& \, &\,& y_1f_0x &+&y_1f_1x^2&+& \cdots & +&y_1f_{n-1}x^n&+&\cdots \\ \,& \, &\,& \, &\,&y_2f_0x^2&+& \cdots & +&y_2f_{n-2}x^n&+&\cdots \\ \end{array}$

Using the columns gives the series representation

$\displaystyle \displaystyle f(x)y(x)=\sum_{n=0}^{\infty}\left(\sum_{i=0}^{n} y_i \cdot f_{n-i}\right)x^n$

Now just equate coefficients

$\displaystyle \displaystyle y''(x)=-f(x)y(x)$

This gives

$\displaystyle \displaystyle (n+1)(n+2)y_{n+2}=\left(\sum_{i=0}^{n} y_i \cdot f_{n-i}\right) \iff y_{n+2}=\left(\sum_{i=0}^{n} \frac{y_i \cdot f_{n-i}}{(n+1)(n+2)}\right)$

Now you should know all of the $\displaystyle f_n$ and the first two $\displaystyle y_n$ your initial conditions and this will give a recurrence relation for all of the coefficients of the power series.

3. u might also "guess" the solution is of kind:

$\displaystyle y=e^{g(x)}$
and get that:
$\displaystyle g` + g^2 + f = 0$

and then u'll need to solve this, but the solution method depends on f
(or u can apply the "duhamel principle", and then the solution is global.
i don't remember rules for applying it)