# Difference Quotient and 2nd Order PDEs

1. Jan 28, 2005

### egsmith

I am trying to match a result in one of my textbooks. To assist with one of their arguments they are approximating a 2nd order PDE by using a difference quotient and they show the approximation as follows:

(d^2u[x,t])/(dx^2) =~ (1/h^2)(u[x+h,t]-2u[x,t]+u[x-h,t])

When I actually use the equation it makes sense, i.e. it is positive when u[x] is concave up and negative when u[x] is concave down. However when I try to derive it I get to a part that doesn't make sense to me geometrically (I am an engineer by trade so geometric arguments appeal to me).

I'll change the function so there is only one independent variable and start with the first order difference quotient.

f[x,h,t] = du[x,t]/dx =~ (u[x+h,t] - u[x,t])/h

This makes sense because it is the slope of the secant (which approaches the tangent as h gets small) at u[x,t]. I am going to rename this result to f so future equations look less cluttered.

I was hoping I could just use recursion like this:

d^2u[x,t]/dx^2 = f[f[x,h,t],h,t]

But you need to know a lot about u[x,t] to have this result be as useful as the equation presented by the book.

Using a slightly different approach, +/- h in a hope to get things to cancel, I can almost match the approximation from the book.

d^2u[x,t]/dx^2 =~ (f[x,h,t] - f[x,-h,t])/2h =
1/(2h^2)(u[x+h,t]-2u[x,t]+u[x-h,t])

So I am half their result. However it seems, to me anyway, that the denominator should be 2h because I use the points at x+/-h to form the base of the triangle with the secant as the hypo. (This makes no difference in the textbook argument since all they are concerned with is sign and the 2 in question only scales.)

After some though I got even more confused because I am not really using the points at (x+/-h,t). I am not even using the point at (x,t). I am using the slope of the secants in front of and behind u[x,t]. From here my geometric intuition died and I came up with some bizarre stuff which really just simplified back to the recursion approach.

Can someone explain to me, or point me to a reference on, the proper way of deriving the approximation of a second order partial derivative using the difference equation? Perhaps the result from the book is some sort of average?

2. Jan 28, 2005

### mathman

If you use central differences, it is a little easier. I'll ignore t, since, for this part, it has no role.

(1) du(x)/dx=~(u(x+h/2)-u(x-h/2))/h
(2) du(x+h/2)/dx=~(u(x+h)-u(x))/h
(3) du(x-h/2)/dx=~(u(x)-u(x-h))/h

Insert (2) and (3) into (1) and get

d/dx(du(x)/dx) (=d2u/dx2) =~ (u(x+h)-2u(x)+u(x-h))/h2

3. Jan 28, 2005