Ordinary Differential Equations

George E. Hrabovsky

MAST

Introduction

I am now going to assume that you have solved some equations of motion, or at least you have seen it done. From this it is easy to get the idea that the subject of solving such equations has been laid out in a systematic way and you can start at the beginning and work your way through it. Indeed, there are literally hundreds of books on the subject. It is a huge body of work, most of it assigning classifications and proving that solutions exist. The sad truth is that the collection of solution methods for such equations is an unfinished art-form. The best we can do is show off some of the methods that have been developed and hope we can exploit these ideas to stumble upon our own methods.

Ordinary Differential Equations

So the central problem is to find one or more functions y(x) that solve an equation having derivatives of y with respect to x..

We denote an m-order derivative of a function, retreat2-1_1.png, with special notation for first- and second-order derivatives, respectively, y'(x) and y''(x). If n is the highest order of m, then we say the corresponding differential equation is of order n.

If there is only one independent variable, then we call the equation an ordinary differential equation (ODE). If there is more than one independent variable, we call the equation a partial differential equation (PDE).

If an ODE can be written so that there are specific terms for each order of derivatives, we call it an explicit ODE. If we cannot do this, then we have an implicit ODE.

A linear ODE is explicit,

retreat2-1_2.png

We can write an operator

retreat2-1_3.png

which allows us to write the equation in a much more compact form,

retreat2-1_4.png

The f(x) in (ODE.1) is called the inhomogeneity of the ODE. If f(x)=0, then there is no inhomogeneity and the equation is said to be homogeneous.

If we have a set of solutions of an ODE, we can form a linear combination of them, just like we did with vectors. Such a linear combination is also a solution of the ODE. If the linear combination is zero when all coefficients are not also zero, then the solutions are linearly dependent, otherwise they are linearly independent. This will become important later.

Theorem ODE-1 For  a homogeneous ODE of nth order, there will be n linearly independent solutions.

If we have a set of n solutions for an nth-order ODE, we will call the linear combination of the solutions a general solution.

Theorem ODE-2: The general solution of a homogeneous ODE of the form retreat2-1_5.png will then have the form retreat2-1_6.png.

Theorem ODE-3: The general solution of a inhomogeneous ODE of the form retreat2-1_7.png will then have the form retreat2-1_8.png where retreat2-1_9.png is some specific solution.

As an example, we examine the equation describing the harmonic oscillator

retreat2-1_10.png

which has the generic form

retreat2-1_11.png

this has the operator

retreat2-1_12.png

The general solution is

retreat2-1_13.png

These parts are linearly independent.

Often we need to associate an nth-order ODE with n initial conditions to find a suitable solution. In general, given the function y(x) we will have the following set of initial conditions

retreat2-1_14.png

It is easy to show that this fulfills our three theorems above.

There are cases where nonlinear ODEs have solutions that do not appear in the general solution, these are called singular solutions.

What is an Ansatz?

We will introduce something called an ansatz. The word ansatz is German for the phrase, "An initial placement of a tool that works." This is another way of saying that it is a tool that works, but there is no formal justification for it with what we have on hand. We will see this idea used a lot.

Separation of Variables

Say that we have a function of an independent variable f(x) and a function of a dependent variable g(y). For an ODE of the form

retreat2-1_15.png

we will rewrite derivative as

retreat2-1_16.png

The process of separation, a kind of ansatz for simplifying the ODE, is where we move all like terms to the same side of the equals sign.

retreat2-1_17.png

You then integrate both sides.

retreat2-1_18.png

The Linear ODE with Constant Coefficients

Let’s take a look at the equation of motion for a one-dimensional damped harmonic oscillator. This is, of course, based on Newton’s equation of motion,

retreat2-1_19.png

The difficulty of Newtonian mechanics is tracking down the expression for all of the Fs. This will be a sum, since forces add like vectors. There is the linear restoring force -k x(t) and then there is the damping force -β x'(t), so we have the second-order linear ODE

retreat2-1_20.png

We need to figure out what k is, in the absence of friction we could write the initial angular frequency retreat2-1_21.png, so retreat2-1_22.png, we can also write β=γ m. This gives us the operator equation

retreat2-1_23.png

We introduce another ansatz, here we make the substitution retreat2-1_24.png. From this we can apply this to our operator equation

retreat2-1_25.png

retreat2-1_26.png

where the derivatives are,

retreat2-1_27.png

retreat2-1_28.png

so our differential equation becomes the algebraic equation,

retreat2-1_29.png

this is often called the characteristic equation, or the auxiliary equation. We can then write the solution using the traditional quadratic equation solution

retreat2-1_30.png

where δ is the discriminant, retreat2-1_31.png, it is a nice exercise in algebra to figure out why it has this form.

According to ODE Theorem 2, the general solution will have the form

retreat2-1_32.png

We have been examining the case where retreat2-1_33.png, this is called the aperiodic case (overdamped). It is so-called because the damping is so great that there are no oscillations any more. If retreat2-1_34.png then ω=-γ±iδ and we have the underdamped case (here we have an ever deceasing oscillation). We can use Euler’s formula for any choice of δ, and for new constants

retreat2-1_35.png

So, what about the case where retreat2-1_36.png, what we call the critically damped case? Can this result ever really be measured? Probably not precisely. Let’s take this as a limit instead. For this situation we have δ=0, so the roots of our algebraic equation are ω=-γ±0, so we have two equal roots, ω=-γ,-γ. For k repeated roots there is a well-known result,

retreat2-1_37.png

Thus we have the general solution for this case as

retreat2-1_38.png

Euler’s Equation 1

This is an equation where each term has a factor of an nth power of the independent variable and a nth order derivative. For example

retreat2-1_39.png

Euler’s equation has the general form

retreat2-1_40.png

Since this is homogeneous we can make a substitution,  another ansatz,retreat2-1_41.png,

retreat2-1_42.png

retreat2-1_43.png

so

retreat2-1_44.png

retreat2-1_45.png

retreat2-1_46.png

retreat2-1_47.png

this leaves us with the requirement

retreat2-1_48.png

retreat2-1_49.png

retreat2-1_50.png

There are two roots for this equation.

retreat2-1_51.png

retreat2-1_52.png

so we have retreat2-1_53.png and retreat2-1_54.png. By Theorem ODE-2 we then have the general solution

retreat2-1_55.png

This is called, by some, the power ansatz.

Euler’s and Legendre’s Equation

We will use the same equation as that in the previous section.

retreat2-1_56.png

Legendre’s equation has a general form

retreat2-1_57.png

it is easy to see that if k=1 and m=0 that this becomes the Euler equation.

Here we make the substitution retreat2-1_58.png. Thus, retreat2-1_59.png, we can make a change of variables to simplify our notation, retreat2-1_60.png,

retreat2-1_61.png

where we make the definition

retreat2-1_62.png

So,

retreat2-1_63.png

and

retreat2-1_64.png

where

retreat2-1_65.png

retreat2-1_66.png

so

retreat2-1_67.png

then

retreat2-1_68.png

so we have the operator equation

retreat2-1_69.png

retreat2-1_70.png

retreat2-1_71.png

retreat2-1_72.png

retreat2-1_73.png

retreat2-1_74.png

or adopting the change of variables

retreat2-1_75.png

This is a linear ODE with constant coefficients, which we have already discussed, it has the general solution

retreat2-1_76.png

Inhomogeneous Linear Equations and Integrating Factors

Given the fact that we know to functions A(x) and B(x), and assuming we have the ODE

retreat2-1_77.png

We need not specify either of the auxiliary functions. We will need a number of retreat2-1_78.png’s up to the order of our ODE, in this case we need retreat2-1_79.png and retreat2-1_80.png. To specify retreat2-1_81.png it suffices to treat the equation as homogeneous. We thus convert our equation to

retreat2-1_82.png

divide through by y(x)

retreat2-1_83.png

rearrange this a little,

retreat2-1_84.png

We realize, after staring at this long enough that retreat2-1_85.png is a derivative, in this case it is retreat2-1_86.png, so we now have,

retreat2-1_87.png

We can integrate this

retreat2-1_88.png

or,

retreat2-1_89.png

or, since this is a one-parameter, first-order equation,

retreat2-1_90.png

This is called an integrating factor.

To return to the inhomogeneous case we guess at a new function, we say that retreat2-1_91.png. This transforms our equation,

retreat2-1_92.png

retreat2-1_93.png

where

retreat2-1_94.png

retreat2-1_95.png

or

retreat2-1_96.png

so

retreat2-1_97.png

or

retreat2-1_98.png

we can rearrange this,

retreat2-1_99.png

We integrate this

retreat2-1_100.png

Placing this into our new function we get

retreat2-1_101.png

According to ODE Theorem 3, the solution is then

retreat2-1_102.png

retreat2-1_103.png

retreat2-1_104.png

Closing Thoughts

There are many ways to derive and to solve ODEs. There is no systematic way to do this. The more experience you have with various approaches, the more likely you will be to recognize any way to convert your equation into a form to apply a specific method.

Created with the Wolfram Language