Andy's "DEs in a Day" page

From Norsemathology
Jump to navigation Jump to search

Intro for those who've never had DEs

Q: What is a DE?

A: A DE is a differential equation, tying a function to its derivative(s). An ODE is an ordinary DE: it links function f(x) to its ordinary derivative(s), not any partial derivative(s).

Classic Example of an ODE: Population Growth

Assume that the increase in a population over a given short (instantaneous would be nice!) interval is just proportional to the population itself: that is,

Then

.

In the limit as we let , we have

.

This is a classic and very important DE, which we now want to solve. When I asked my students how to solve this, they said "Separation of variables." I said "Don't be silly! Use the general method for solving DEs."

They said that they didn't know what that was, so I told them:

The general method for solving DEs is to stare at them until a solution comes to you. 

This is much faster than separation of variables: you simply ask yourself "Do I know a function which is essentially its own derivative, up to a constant?" To which I hope you reply to yourself "Of course! An exponential function."

.

We've found an infinite number of solutions. So now the question is, how do we choose between them? Well, we can't in the absence of more information. But if we have the initial value of the population, at time , then we can give the exact and unique solution,

.

We've solved the initial value problem.

Classic Example: the Simple Pendulum

You might visit this website, for a nice animation of this problem, along with several derivations. Mine is similar.

We'll derive this using a little vector calculus and a little bit of Newtonian physics. This image will do to give you the idea, but I actually think of it a little differently (thinking of the tension on the pendulum arm):

Pendulum.gif

If we take as our origin the point on the ceiling to which the pendulum is attached, then the vector position of the pendulum bob is

In the following, I'll suppress the dependence of on time, replacing with (for clarity).

or

Now we turn to the physics: Newton's second law is .

The forces on the pendulum bob are gravity, operating in the negative y direction (of size mg, where m is the mass and g the acceleration due to gravity), and the tension (of size T) on the bob from the pendulum arm. The unbalanced forces give rise to accelerations. If we take the bob at rest, and move it to the right, then we can write the following for the force:

where is the displacement in angle. We equate the force and mass times acceleration and simplify to get

Equating components, we get

and

Our objective is to eliminate the term from these two equations. We can do this by multiplying each by a trig function:

and

Adding these two equations leads to magical results: we get elimination of the tension, components, too, and the result is (almost) our lovely ODE:

or, invoking Pythagoras,

Strategies for Solution

The pendulum ODE is interesting, because our method of solution (staring) doesn't immediately give rise to a solution (at least I didn't stare one down). There are two approaches you can take (at least), when staring doesn't work (and so you give up on the exact solution):

  1. Replace the ODE with a related one that you like better, or
  2. Solve the one you've got numerically.

In either event, you're not actually solving the given ODE -- you're just hoping that your approximate method is giving you an estimate that is close enough for your purposes.

Linearize the ODE

As an example, using our pendulum problem, we could assume that is small, and hence that (using Taylor series) (with error ). Then our ODE

is approximately given by

which I can stare down: solutions are sines and cosines. In fact, the general solution is

,

where .

This is a linear combination of the solutions we know, and works because the equation is linear. One way to know that you have a linear equation is if the linear combination of known solutions is another solution!

We may hope will be a good approximation so long as is small (which means that you don't pull the bob too far from equilibrium -- its rest position).

The problem becomes an IVP, and we find a particular solution, when we know two things about our problem at (usually the position and velocity). Two constraints allow us to find the two unknown coefficients and (the general rule being that you need one constraint for each unknown).

Use Numerics

Alternatively we can use numerics. But in the process of approximating derivatives, etc., we're also not solving the given problem. On the other hand, we don't have to be nearly as clever as we were in using the Taylor series.

One additional problem in the pendulum problem is that we don't have a first-order problem (it's not about derivatives -- it's about second derivatives!). In this case, we can be clever and use a trick to turn the second-order ODE into a first-order system:

Let

Then

Hence we have a system

This type of non-linear first-order ODE will be the typical subject of our numerical attacks.

Elementary Theory of Initial-Value Problems

The Big Picture

First of all we need to say a little about what differential equations and initial-value problems are, and the conditions under which they have solutions, and when those solutions are unique (it's nice to know that what you're hunting for is out there, and that it's alone).

Then we need to realize that, because we're solving these problems numerically, we're not going to be solving the given initial-value problem, but rather one close to that given (we call that a "perturbed" problem -- it's been jiggled, but hopefully not too badly).

So here is a brief overview of conditions under which solutions (or approximate solutions) of a perturbed problem will give reasonable information about the real problem.

Definitions

  • differential equation: an equation linking a function and its derivatives and independent variables.
  • initial-value problem: with time as the independent variable, a differential equation as well as enough initial conditions to uniquely determine the solution.
  • well-posed initial-value problem: the initial-value problem

    is well-posed if

    • A unique solution exists, and
    • For any there exists a positive constant such that whenever and is continuous with on , a unique solution to

      exists with

      The problem (2) is called a perturbed problem associated with the given problem.

  • Lipschitz condition: A function satisfies a Lipschitz condition in on a set if a constant exists with
  • A set is said to be convex if whenever and belong to and is in , the point also belongs to .

Theorems/Formulas

Theorem 5.4: Suppose that and that is continuous on . If satisfies a Lipschitz condition on in the variable , then the initial value problem has a unique solution for .

Theorem 5.3: If is defined on a convex set . If a constant exists with

then satisfies a Lipschitz condition in on with Lipschitz constant .

Theorem 5.6: Suppose that and that is continuous on . If satisfies a Lipschitz condition in on , then the initial value problem (1) is well-posed.

Properties/Tricks/Hints/Etc.

So the up-shot is that our initial-value problem satisfies a Lipschitz condition, we're in good shape: we're going to be able to get an approximation numerically.