How do I solve a second-order linear ODE without prior knowledge?

  • Thread starter Thread starter Char. Limit
  • Start date Start date
  • Tags Tags
    Linear Ode
Char. Limit
Gold Member
Messages
1,222
Reaction score
23

Homework Statement



So I made a random differential equation to try to solve, but I found out that I can't solve second-order differential equations with knowledge I've gleaned solely from PF. So I need your help to ask how to solve this. Note that I've never taken a differential equations class, but I have completed Calculus II, if that helps, and I've looked into ways to solve first order linear ODEs. So yeah.

The equation I made up to solve is...

x^2 y'' + x y' + y = 0

Homework Equations



Nope, I don't even know how to do this. None here, then.

The Attempt at a Solution



I'm sorry, but I'm totally lost. I just need a method... is there a way to turn this equation first order, maybe?
 
Physics news on Phys.org
Try a power series solution.
 
Or even simpler, try a solution of the form y=xr.
 
vela said:
Or even simpler, try a solution of the form y=xr.

This, the equation is of the Euler type:

<br /> (a x + b)^{n} \, y^{(n)} + a_{1} \, (a x + b)^{n - 1} \, y^{(n - 1)} + \ldots + a_{n} \, y = 0<br />

If you perform the substitution of the independent variable:

<br /> a x + b \equiv \exp(t) \Rightarrow a \, dx = \exp(t) \, dt<br />

then the derivatives transform as:

<br /> \frac{d}{dx} = \frac{dt}{dx} \, \frac{d}{dt} = a \, \exp(-t) \frac{d}{dt}<br />

<br /> \frac{d^{2}}{dx^{2}} = a \, \exp(-t) \, \frac{d}{dt}\left(a \, \exp(-t) \, \frac{d}{dt} \right) = a^{2} \, exp(-2 t) \, \left(\frac{d^{2}}{dt^{2}} - \frac{d}{dt}\right)<br />

In general:
<br /> \frac{d^{n}}{dx^{n}} = a^{n} \, \exp(-n \, t) \, \sum_{k = 0}^{n - 1}{p^{(n)}_{k} \, \frac{d^{n - k}}{d t^{n - k}}}<br />

and one can find a recursive relation for the coefficients \{p^{(n)}_{k}\} by differentiating one more time:

<br /> \frac{d^{n + 1}}{dx^{n + 1}} = \frac{d}{dx} \, \left( a^{n} \, \exp(-n \, t) \, \sum_{k = 0}^{n - 1}{p^{(n)}_{k} \, \frac{d^{n - k}}{d t^{n - k}}}\right)<br />
<br /> = a^{n + 1} \, \exp(-t) \, \frac{d}{dt} \, \left(\exp(-n \, t) \, \sum_{k = 0}^{n - 1}{p^{(n)}_{k} \, \frac{d^{n - k}}{d t^{n - k}}}\right)<br />
<br /> = a^{n + 1} \, \exp(-t) \, \left(\exp(-n \, t) \, \sum_{k = 0}^{n - 1}{p^{(n)}_{k} \, \frac{d^{n - k + 1}}{d t^{n - k + 1}}} - n \, \exp(-n \, t) \, \sum_{k = 0}^{n - 1}{p^{(n)}_{k} \, \frac{d^{n - k}}{d t^{n - k}}}\right)<br />
<br /> = a^{n + 1} \, \exp\left(-(n + 1) \, t\right) \, \left[ p^{(n)}_{0} \, \frac{d^{n + 1}}{dt^{n + 1}} + \sum_{k = 1}^{n - 1}{p^{(n)}_{k} \, \frac{d^{n + 1 - k}}{dt^{n + 1 - k}} - n \, \sum_{k = 1}^{n - 1}{p^{(n)}_{k - 1} \, \frac{d^{n + 1 - k}}{dt^{n + 1 - k}}}} - n \, p^{(n)}_{n - 1} \, \frac{d}{dt}\right]<br />
Comparing this with the formula for n + 1


<br /> \frac{d^{n + 1}}{dx^{n + 1}} = a^{n + 1} \, \exp\left(-(n + 1) \, t\right) \, \sum_{k = 0}^{n}{p^{(n + 1)}_{k} \, \frac{d^{n + 1 - k}}{d t^{n + 1- k}}}<br />

we see that the following recursion relations for the coefficients hold:

<br /> p^{(n + 1)}_{0} = p^{(n)}_{0}, \; p^{(1)}_{0} = 1 \Rightarrow p^{(n)}_{0} = 1<br />

<br /> p^{(n + 1)}_{k} = p^{(n)}_{k} - n \, p^{(n)}_{k - 1}, 1 \le k \le n - 1<br />

<br /> p^{(n + 1)}_{n} = - n \, p^{(n)}_{n - 1}, p^{(2)}_{1} = -1 \Rightarrow p^{(n)}_{n - 1} = (-1)^{n - 1} \, (n - 1)!, n \ge 2<br />

In any case, after performing all the substitutions and noticing that:
<br /> (a x + b)^{n} = \left[\exp(t)\right]^{n} = \exp(n \, t)<br />

the exponential factors cancel and you get an Linear Ordinary Differential Equation with constant coefficients.

Since the ansatz you put into solve these is of the form y = \exp(k t) and in the above case a = 1, b = 0, we have y = \exp(k t) = \left[\exp(t)\right]^{k} = x^{k} as a direct ansatz. However, this is not suitable for the cases of double or complex conjugate roots (for complex k) and the previous procedure should make it clear what the solution is in those cases.
 
Note, by the way, that most linear differential equations have solutions that cannot be written in terms of elementary functions but can be written in terms of power series, while solutions to almost all non-linear differential equations cannot be written in any simple way.

I would not recommend "making up random differential equations" and trying to solve them as good practice, unless you have some way of making up equations that you know have solutions of some particular form. You will NOT be able to solve most of them.

Because, as Dickfore said, this is an Euler type equation, you can transform it into an equation with constant coefficients. Let t= ln(x). Then, by the chain rule,
\frac{dy}{dx}= \frac{dy}{dt}\frac{dt}{dx}= \frac{1}{x}\frac{dy}{dt}

\frac{d^2y}{dx^2}= \frac{d }{dx}\left(\frac{dy}{dx}\right)= \frac{d }{dx}\left(\frac{1}{x}\frac{dy}{dt}\right)
= -\frac{1}{x^2}\frac{dy}{dt}+ \frac{1}{x}\left(\frac{1}{x}\frac{d^2y}{dt^2}\right)
= \frac{1}{x^2}\left(\frac{d^2y}{dt^2}- \frac{dy}{dt}\right)

Putting those into the differential equation reduces it to
\left(\frac{d^2y}{dt^2}- \frac{dy}{dt}\right)+ \frac{dy}{dt}+ y= 0
\frac{d^2y}{dt^2}+ y= 0

which is a linear, homogeneous, differential equation with constant coefficients. It has characteristic equation r^2+ 1= 0 which has solutions r= \pm i and so the differential equation has general solution y(t)= C_1cos(t)+ C_2 sin(t).

Since t= ln(x), the general solution to the original equation is
y(x)= C_1 cos(ln(x))+ C_2 sin(ln(x))
 
Last edited by a moderator:
Another important thing about 2nd order LODEs is, if you put them in normal form:

<br /> y&#039;&#039; + P(x) \, y&#039; + Q(x) \, y = 0<br />

then, by multiplying with the integrating factor:

<br /> \mu(x) = \exp\left(\int{P(x) \, dx}\right)<br />

you can get them in Sturm - Liouville form:

<br /> \frac{d}{dx}\left(\mu(x) \, \frac{dy}{dx}\right) + \mu(x) \, Q(x) \, y = 0<br />

For your equation P(x) = \frac{1}{x} and Q(x) = \frac{1}{x^{2}} and:

<br /> \mu(x) = \exp(\int{\frac{dx}{x}}) = \exp(\log{x}) = x<br />

so the Sturm - Liouville form of the equation is:

<br /> x \, \frac{d}{dx}\left(x \, \frac{dy}{dx}\right) + y = 0<br />

From here, "it should be obvious" that, if you make a substitution to the indpendent variable such that:

<br /> x \, \frac{d}{dx} = \frac{d}{dt} \Leftrightarrow dt = \frac{dx}{x} \Rightarrow t = \log{x}<br />

then your equation becomes:
<br /> \frac{d^{2}y}{dt^{2}} + y = 0<br />
 
@Dickfore
May be you know where I can read about "Sturm - Liouville form" and it's implications? :)
 
gomunkul51 said:
@Dickfore
May be you know where I can read about "Sturm - Liouville form" and it's implications? :)

It's a standard topic in any Mathematical Methods course. Also, s simple Google search reveals many resources.
 
Dickfore said:
It's a standard topic in any Mathematical Methods course. Also, s simple Google search reveals many resources.

I though may be you have a link to your course summaries or something, its hard to find academic material on the net, there is a lot of amateurs out there :)
 
Back
Top