All you need to know about ODE

[Math 619 home]

Contents

In calculus we learn how to “solve” two kinds of differential equations of the form

dydx=f(x,y)(1)\frac{dy}{dx} = f(x, y) \tag{1}

Here are two solution methods that come up regularly when studying PDE.

First Order Separable Equations

By definition a separable differential equation is a diffeq of the form

y(x)=F(x)G(y(x)),ordydx=F(x)G(y).y'(x) = F(x) G(y(x)),\quad\text{or}\quad \frac{d y}{d x} = F(x)G(y).

Thus the function f(x,y)f(x,y) on the right hand side in (1) has the special form

f(x,y)=F(x)G(y).(2)f(x,y) = F(x)\, G(y). \tag{2}

For example, the differential equation

dydx=sin(x)(1+y2)\frac{d y}{d x} = \sin(x) \bigl(1+y^2\bigr)

is separable, and one has F(x)=sinxF(x) = \sin x and G(y)=1+y2G(y) = 1+y^2. On the other hand, the differential equation

dydx=x+y\frac{d y}{d x} = x+y

is not separable.

Solution method for separable equations.

To solve this equation divide by G(y(x))G(y(x)) to get

1G(y(x))dydx=F(x).(3)\frac{1}{ G(y(x))} \frac{d y}{d x} = F(x). \tag{3}

Next find a function H(y)H(y) whose derivative with respect to yy is

H(y)=1G(y)(solution: H(y)=dyG(y).)H'(y) = \frac{1}{G(y)} \quad\left(\text{solution: } H(y) = \int {\frac{dy}{G(y)}}.\right)

Then the chain rule implies that the left hand side in (3) can be written as

1G(y(x))dydx=H(y(x))dydx=dH(y(x))dx.\frac{1}{ G(y(x))} \frac{d y}{d x} = H'(y(x)) \frac{d y}{d x} = \frac{d H(y(x))}{d x}.

Thus (3) is equivalent with

dH(y(x))dx=F(x).\frac{d H(y(x))}{d x} = F(x).

In words: H(y(x))H(y(x)) is an antiderivative of F(x)F(x), which means we can find H(y(x))H(y(x)) by integrating F(x)F(x):

H(y(x))=F(x)dx+C.(3)H(y(x)) = \int F(x) dx +C. \tag{3}

Once we have found the integral of F(x)F(x) this gives us y(x)y(x) in implicit form: the equation (3) gives us y(x)y(x) as an implicit function of xx. To get y(x)y(x) itself we must solve the equation (3) for y(x)y(x).

Determining the constant. The solution we get from the above procedure contains an arbitrary constant CC. If the value of the solution is specified at some given x0x_0, i.e. if y(x0)y(x_0) is known then we can express CC in terms of y(x0)y(x_0) by using (3).

First Order Linear Equations

Important example: Exponential growth and decay.

The solution of

dudt=ku\frac{du}{dt} = ku

is

u(t)=u(0)ekt.u(t) = u(0)e^{kt}.

General case.

Differential equations of the form equation

dydx+a(x)y=k(x)(IL)\frac{d y}{d x}+a(x)y = k(x) \tag{IL}

are called first order linear.

The Integrating Factor.

Linear equations can always be solved by multiplying both sides of the equation with a specially chosen function m(x)m(x) called the integrating factor. It is defined by

m(x)=eA(x), where A(x)=a(x)dx.(IF)m (x) = e^{A (x)},\text{ where } A (x) = \int a(x)\,d x. \tag{IF}

If we multiply the equation (IL) with the integrating factor m(x)m(x) we get

m(x)dydx+a(x)m(x)y=m(x)k(x).m(x)\frac{d y}{d x}+a(x)m(x)y = m(x)k(x).

By the chain rule the integrating factor satisfies

dm(x)dx=deA(x)dx=A(x)=a(x) eA(x)=m(x)=a(x)m(x).\frac{d m(x)}{d x} = \frac{d\, e^{A(x)}} {d x} = \underbrace{A'(x)}_{=a(x)} ~\underbrace{e^{A(x)}_{}}_{=m(x)} = a(x)m(x).

Therefore one has

dm(x)ydx=m(x)dydx+a(x)m(x)y=m(x){dydx+a(x)y}=m(x)k(x).\begin{aligned} \frac{d\, m(x)y}{d x} &= m(x)\frac{d y}{d x}+a(x)m(x)y \\ &= m(x)\Bigl\{\frac{d y}{d x}+a(x)y \Bigr\}\\ &= m(x)k(x). \end{aligned}

Integrating and then dividing by the integrating factor gives the solution

y=1m(x)(m(x)k(x)dx+C).y=\frac1{m(x)}\left(\int m(x)k(x)\,d x+C\right).

In this derivation we have to divide by m(x)m(x), but since m(x)=eA(x)m(x)=e^{A (x)} and since exponentials never vanish we know that m(x)0m (x)\neq0, so we can always divide by m(x)m (x).

Oscillators

The solution of

d2udt2+ω2u=0\frac{d^2 u}{dt^2} + \omega^2 u = 0

is

u(t)=u(0)cosωt+u(0)ωsinωtu(t) = u(0)\cos \omega t + \frac{u'(0)}{\omega}\sin \omega t