previous up next print clean
Next: The Crank-Nicolson method Up: FINITE DIFFERENCING Previous: The explicit heat-flow equation

The leapfrog method

The difficulty with the given program is that it doesn't work for all possible numerical values of $\alpha$.You can see that when $\alpha$ is too large (when $ \Delta x $ is too small) the solution in the interior region of the data table contains growing oscillations. What is happening is that the low-frequency part of the solution is OK (for a while), but the high-frequency part is diverging. The precise reason the divergence occurs is the subject of some mathematical analysis that will be postponed till page  [*]. At wavelengths long compared to $ \Delta x $ or $\Delta t$, we expect the difference approximation to agree with the true heat-flow equation, smoothing out irregularities in temperature. At short wavelengths the wild oscillation shows that the difference equation can behave in a way almost opposite to the way the differential equation behaves. The short wavelength discrepancy arises because difference operators become equal to differential operators only at long wavelengths. The divergence of the solution is a fatal problem because the subsequent round-off error will eventually destroy the low frequencies too.

By supposing that the instability arises because the time derivative is centered at a slightly different time t+1/2 than the second x-derivative at time t, we are led to the so-called leapfrog method, in which the time derivative is taken as a difference between t-1 and t+1:  
 \begin{displaymath}
{ \partial q \over \partial t } \quad \approx \quad
{ q_{{t+1}}\ -\ q_{{t-1}} \over 2\ \Delta t }\end{displaymath} (33)
The resulting leapfrog differencing star is

    3rx    
    3c    
    1c|   1|c
    1c| -1 1|c
    1c|   1|c
    1|c|    
    1|c| $-2\alpha$ 4$\alpha$ $-2\alpha$
    1|c|    
    1c|   1|c
    1c| +1 1|c
    1c|   1|c
t 4c      
Here the result is even worse. A later analysis shows that the solution is now divergent for all real numerical values of $\alpha$.Although it was a good idea to center both derivatives in the same place, it turns out that it was a bad idea to express a first derivative over a span of more mesh points. The enlarged operator has two solutions in time instead of just the familiar one. The numerical solution is the sum of the two theoretical solutions, one of which, unfortunately (in this case), grows and oscillates for all real values of $\alpha$.

To avoid all these problems (and get more accurate answers as well), we now turn to some slightly more complicated solution methods known as implicit methods.


previous up next print clean
Next: The Crank-Nicolson method Up: FINITE DIFFERENCING Previous: The explicit heat-flow equation
Stanford Exploration Project
10/31/1997