The primary difference between explicit and implicit finite difference methods lies in how they calculate the solution at a future time step. Explicit methods directly compute the new state based solely on the current state, while implicit methods require solving a system of equations involving both the current and future states.
Detailed Explanation
To understand the difference, consider a time-dependent differential equation. We discretize time into steps, and we want to find the solution at time n+1 given the solution at time n.
Explicit Finite Difference Methods
- Calculation: Explicit methods directly calculate the value at time n+1 using only the known values at time n.
- Formula: The general form is often something like: un+1 = F(un), where un is the solution at time step n, and F is some function.
- Implementation: Easier to implement as it involves direct calculation.
- Stability: Conditionally stable. The size of the time step is limited by a stability condition (e.g., the Courant-Friedrichs-Lewy (CFL) condition). If the time step is too large, the solution may become unstable and oscillate wildly or diverge.
- Computational Cost: Lower computational cost per time step because they don't require solving systems of equations.
Implicit Finite Difference Methods
- Calculation: Implicit methods calculate the value at time n+1 by solving an equation that involves both the values at time n+1 and the values at time n.
- Formula: The general form is often something like: G(un+1) = H(un), where G and H are functions, and G depends on un+1.
- Implementation: More complex to implement because it requires solving a system of algebraic equations at each time step.
- Stability: Generally unconditionally stable or have larger stability regions, allowing for larger time steps without instability.
- Computational Cost: Higher computational cost per time step because they require solving systems of equations (often linear or nonlinear).
Table Summarizing the Key Differences
Feature | Explicit Method | Implicit Method |
---|---|---|
Calculation | Direct calculation of un+1 | Solve an equation involving un+1 |
Implementation | Simpler | More complex |
Stability | Conditionally stable | Generally unconditionally stable |
Computational Cost | Lower per time step | Higher per time step |
Time Step Size | Limited by stability condition | Less restricted, can use larger time steps |
Example
Consider the heat equation: ∂u/∂t = ∂2u/∂x2
-
Explicit: A forward-time centered-space (FTCS) explicit scheme approximates this as:
(uin+1 - uin)/Δt = (ui+1n - 2uin + ui-1n)/Δx2
Solving for uin+1 gives a direct calculation. -
Implicit: A backward-time centered-space implicit scheme approximates this as:
(uin+1 - uin)/Δt = (ui+1n+1 - 2uin+1 + ui-1n+1)/Δx2
Solving for uin+1 requires solving a system of linear equations (tridiagonal system).
Choosing Between Explicit and Implicit Methods
The choice between explicit and implicit methods depends on the specific problem and the desired accuracy and computational cost.
- If stability is a major concern and you need to use a large time step, implicit methods are generally preferred, despite their higher computational cost per step.
- If the computational cost per step is a primary concern and you can use a small enough time step to satisfy the stability condition of an explicit method, then explicit methods can be more efficient.
- For nonlinear problems, implicit methods often require iterative solvers (e.g., Newton-Raphson), further increasing their complexity.