So last week, we learned that many of the physical phenomena are

described by partial differential equations and we would like to solve those,

simulate them, visualize the results,

and understand the physics of them.

The partial differential equations contain derivatives that we

do not know in general and cannot solve analytically in the general case.

So, what if we could replace

these partial derivatives by something else that we can calculate,

and then simulate our physical system.

That's going to be the topic of this week,

and this leads us to the finite difference method,

the first numerical method that we will encounter, that is basically

a grid method, is based on a discretization on grids or grid points.

So, we know the fields that we're interested in at some set of points,

and we actually replace the partial derivatives by finite difference approximations where

we make use of some points defined

around the point where we actually would like to know the derivatives.

Let me show you first an example of how powerful the finite difference method can be.

You see here, a simulation of an earthquake happening north of Los Angeles,

and the waves propagate down south,

they also propagate north but you see the propagation down

south towards the Los Angeles area through a 3-dimensional medium,

there would be no possibility of actually calculating something like this analytically.

So, what you see is, because Los Angeles is located above a sedimentary basin,

there are small velocities and those actually lead to

a very long shaking of the seismic waves inside that basin,

which is of course hazardous for those who

live there and the infrastructures and the tall buildings there.

So, that's just an example from

seismology, a simulation based on the finite difference approximation of

the wave equation that can be used to

understand how 3-dimensional media affect seismic wave propagation.

Now, before we start doing some maths,

let me tell you some general points about the finite difference method.

It's often considered a brute force approach,

partly because the mass is relatively simple and it's often

actually used with very low order implementations.

But on the other hand because it's relatively easy,

it can be quickly adapted to specific problems,

you can very quickly take a partial differential equation at least

in the one-dimensional case and come up with a numerical solution.

So, that's very powerful,

it is actually lots of fun.

On the other hand, the method itself has progressed so

fast that actually today you can develop very very powerful,

very efficient finite difference

methods that can compete with the more modern methods that are around today,

but we will talk about this later.

So, let's do some maths now and let's

start with the fundamental definitions of finite differences,

and at the end of this week,

you will understand how these finite difference approximations work,

you will understand the connection to Taylor series,

and that prepares us basically then to start applying

this method to our first simple partial differential equation.