Sunteți pe pagina 1din 3

The Difficult PDE Files

Part 2 : Numerical Methods I

It is a fact that some of the PDE models that we are learning will not be expressable in terms
of functions that can be found by classical methods. I am personally familiar with this idea since
such problems arrive in numerical weather models (numerical weather prediction for those not in
the atmospheric sciences). Such numerical techniques for approximating PDE solutions estimate
what the solution value distribution over space and time is without the need for an expression in
familiar functions. Such ideas call back to methods seen in ODE and also the background behind
differentiation.

The first step, ODEs and Euler’s Method

In ODE, we learned how those equations varied over on parameter. That single parameter would
be time. How the ODE in fact behaved, depended on two details. One is the initial condition or what
the function solution returned at t = 0 (this is similar to PDEs who also have initial conditions).
The other is how the slope behaves given from the ODE. ODEs manipulate slope because the single
derivative in the ODE is in fact an expression of slope itself (or more technically the slope at any
point along a function curve). When we solve for an ODE its general solution describes the slope
in terms of a slope field over the time and values that can be returned by an ODE solution curve.
The initial condition (or initial value) tells you where to begin drawing a specific solution curve in
that slope field and following that field yields to the solution of that specific ODE problem.

With function expressions that can go along with such problems, solutions can also be expressed
using a numerical method which returns a list of values that those solutions return. These values
can then be used to make graphical plots or perform other analyses of the ODE model. One of the
basic numerical methods is a strategy called Euler’s Method and comes from the calculus I concept
of the difference quotient. In that course we learned that the derivative of a continuous function
is :

f (x + h) − f (x)
F 0 (x) = lim ,h= b−a
h
h→∞ h

Where h is a value called the step size and b and a are aribtrary ends of an arbitrary domain.
This domain is a discrete interval where the difference quotient is used to estimate the derivative
of the function f (x). In Euler’s method, the rational part of this defintion (difference quotient)
without the limit, and the step size are used to estimate an exact solution to an ODE. This is done
by solving for the function value that has the step size as one of it’s inputs :

u(x + h) = u(x) + hu0 (x)


In order for a computer to therefore estimate this value, the equation must be descretized over
the interval in question. This is done by appyling an iterator to the equation above to describe the
formula in discrete parts :

ui = ui−1 + h ∗ ui−1
This formula is called Euler’s Method and is used for estimating ODE solutions.

Euler’s method above is derived by looking at how the function u is discretized. First take the
continuous equation (u(x + h)) from the difference quotient and expand the u0 (x) term into a
function that returns u0 (x) when 2 parameters are inputed :

u(x + h) = u(x) + hu0 (x)

hu0 (x) = hf (u(x), x)

∴ u(x + h) = u(x) + hf (u(x), x)

Now we can see how the difference quotient derivation is discretized. u(x) can be thought of as
the value returned at the iterator value and can now be denoted as xi . The u(x + h) can be thought
of as the iterator added by the unit value 1, (analogous to the value returned at a nearby reference
point on our analysis interval), therefore u(x + h) can be denoted as uxi +1 . Finally our step size h
doesn’t change and remains as a constant :

x → xi
x + h → xi+1

u(x + h) = u(x) + hf (u(x), x) ⇒ uxi +1 = u(xi ) + hf (u(xi ), xi )

For simplicity u(xi ) is denoted as ui since we know that a u function is a returned value.

uxi +1 = u(xi ) + hf (u(xi ), xi ) ⇒ uxi +1 = ui + hf (ui , xi )

Now the final step is to solve for ui which is the number returned at our iterator value. This value
is the is the numerical approximation of an ODE answer that we are looking for. So by subtracting
off a 1 from all the iterators will result in the expression that we are looking for :

uxi +1 = ui + hf (ui , xi ) ⇒ ui = ui−1 + hf (ui−1 , xi−1 )

∴ ui = ui−1 + hui−1
Since the formula calls upon itself (ui−1 ), this equation is recursive and can be put into a
computer program to estimate the numerical values returned by the solution of an ODE. This is a
numerical approach to following the slope field when drawing to a solution curve as per the lecture
notes.

The Second Derivative Approximation and the Taylor Series

Like the first derivative, the second derivative can also be expressed as a difference quotient
However, the anwswer isn’t as as easy to derive as the first derivative. Unlike the first, we know
have to use the Taylor Series approximation to estimate the second derivative over the interval :

h2 00 h3 000
u(x + h) = u(x) + hu0 (x) + 2 u (x) + 3! u (x) + ...

By substituting the step size h with −h and solving for the second derivative arrive at a conti-
nuous 2nd order approximation :

h2 00 h3 000
u(x − h) = u(x) − hu0 (x) + 2 u (x) + 3! u (x) + ...

u(x+h)−2u(x)+u(x−h)
⇒ u00 (x) = h2
+ O(h2 )

The O(h2 ) is called big ”o” error notation and denotes a part of the taylor series called the
error term. This error term comes from the rest of the series after truncating the taylor formula
at a certain degree (in this case 2). The definition for the big o function for the second derivative
approximation is below :

1 00
O(h2 ) = h! f (x)(x + h − x)h

This formula can tell you how good a taylor approximation is, but for the most part this term is
ignored. Now as before with Euler’s method we can discretize this second order difference quotient
approximation to a generalized function with defined inputs. This process results in the equality
below :

ui+1 −2ui +2ui−1


h2
= f (xi−1 , ui−1 , u1 −u
h
i−1
)

Due to the i iterator, this equality results in a set of functions that can be plugged into a computer
for analysis and plotting. As we’ll see in future lessons, this will lead to numerical methods that
involve linear algebra and ultimately be used in PDE solution approximations.

S-ar putea să vă placă și