Re: explicit versus implicit method for the heat equation



Chris wrote:
Dear Helmut,

thanks for your answer, it is quite in line with what I already suspected. However, only one thing is not yet fully clear to me. If I am correct, for the specific case of the diffusion equation, the global error of both the forward and backward euler scheme is

e=O( C1 * d^2u/dt^2 * dt - C2 * d^4u/dx^4 * dx^2 )

Using the PDE itself, this can be rewritten as

e=O( (C1*dt+C2*dx^2) * d^4u/dx^4).

As far as I know, the constants C1 and C2 are now independent of the solution itself (but they depend on, e.g., the end time of the integration).

If the above is correct, it is in line with what you are saying:

1)if we are integrating over _short times_, C1 will be of the same magnitude of C2, and dt must be of the same magnitude as dx^2.

2)if we want to integrate over _longer times_ (to find, e.g., a state near a steady-state), then I can understand that the error due to the time integration becomes smaller and smaller, until we only have the spatial discretisation error left in the steady-state. My intuitive explanation for this is that if the scheme is stable, then the errors also go to zero as time goes to infinity (or is this too simplistic?). Hence in that case the constant C1 would probably be substantially smaller than C2, and we may take larger time steps (with the implicit scheme).


The only thing that I do not understand is why you are speaking about "rough" initial values: the roughness (or derivatives) appear in both the time and space discretization (for my specific model problem), and according to the formula above they should hence not matter (right?).
So the roughness or derivatives determine the actual size of the error e, but not how dt whould be chosen compared to dx.


Do you agree with my reformulation of your answer? Or is there still something wrong with my reasoning?

Let's assume we have a Fourier series of u(t,.) in space (for a fixed t).
The (discrete) Laplacian (in space) has only real, negative eigenvalues
which spread out to -infinity as dx->0 . Each Fourier mode will be
multiplied by exp(lambda*t), where lambda is the corresponding eigenvalue.
If lambda is positive, nothing helps, we have to make dt so small, that
we can follow this exploding exponential.
If on the other hand lambda is (strongly) negative and that's the case
for the Laplacian alone, we would have to follow an rapidly vanishing
exponential. An explicit scheme (in time) approximates the exponential
by a polynomial, an implicit scheme does it with rational functions.
If you have a stable implicit scheme and a large time step, there is
an error when e.g. exp(-100*t) is replaced by 1/(100*t)^2, but that's
no problem.

The error estimates you've cited are not helpful here since they
don't distinguish between a large positive eigenvalue and a
large negative one, they just use the standard Lipschitz number
which amounts to the modulus of the eigenvalue.
Since the modulus of the eigenvalues are unbounded as dx->0
there are misleading here.

Now, what did I mean by 'rough'. If the coefficients of the Fourier series of
u(t,.) at any given time t (especially at the initial time) don't decay
very rapidly, the function u(t,.) is rough.
Now, the higher terms decay very rapidly when time proceeds and
you get the well known smoothing effect of parabolic pdes.
Unless you really want to approximate this rapid decay correctly,
you can take large time steps with a stable implicit scheme.
If you want to follow this decay closely you can use an explicit
scheme with a tiny (i.e. small enough) time step. After some
time, the high frequencies of u(t,.) are died out and you
would like to switch to (much) larger time steps without
suffering bad approximation.
But now, even if there are no high frequencies at all, you
get tiny ones all the time, e.g. by rounding errors, nonlinearities
and source terms.
Now the implicit scheme is robust, it will damp these out so they are
kept tiny. On the other hand, an explicit scheme with a too large a
time step will blow them up (it's really like an explosion, they get
magnified several orders of magnitude in each time time.)

So, theoretical error estimates don't always tell the full truth
in practice.

Helmut.


--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
.