# Thread: Solving second order ODE

1. ## Solving second order ODE

I'm trying to solve a second order ODE in the form of Ay''+By'+1=0. This is part of a genetics problem I have, but I haven't taken DiffEq in a very long time and can't quite remember how to go about solving this. Can anyone help?

Thanks!

2. ## Re: Solving second order ODE

$\displaystyle y(x)= -\frac{a c_1 e^{-\frac{b x}{a}}}{b}-\frac{x}{b}+c_2$

3. ## Re: Solving second order ODE

Originally Posted by mhguo1
I'm trying to solve a second order ODE in the form of Ay''+By'+1=0. This is part of a genetics problem I have, but I haven't taken DiffEq in a very long time and can't quite remember how to go about solving this. Can anyone help?
Thanks!
Let f(x)=y'
This leads to a first order ODE. I suppose that you know the method to solve linear first order ODE.

4. ## Re: Solving second order ODE

I would write the ODE as follows:

$\displaystyle Ay''+By'=-1$

The characteristic roots are:

$\displaystyle 0,-\frac{B}{A}$ and so the homogeneous solution is:

$\displaystyle y_h(x)=c_1+c_2\frac{A}{B}e^{-\frac{B}{A}x}$

I would next assume a particular solution of the form:

$\displaystyle y_p(x)=kx$

Now, we may use the method of undetermined coefficients to find $\displaystyle k$:

$\displaystyle y_p'(x)=k$

$\displaystyle y_p''(x)=0$ and so:

$\displaystyle Bk=-1\,\therefore\,k=-\frac{1}{B}$ and we have:

$\displaystyle y_p(x)=-\frac{1}{B}x$

By superposition, we now may write the general solution:

$\displaystyle y(x)=y_h(x)+y_p(x)=c_1+c_2\frac{A}{B}e^{-\frac{B}{A}x}-\frac{x}{B}$

5. ## Re: Solving second order ODE

Great, thanks for everyone's help!