Loading
Solve with by replacing the derivatives with central differences. The result is a tridiagonal system, solved by the Thomas algorithm.
, , with . Find y at 0.25, 0.5, 0.75.
| finite difference | exact | error | |
|---|---|---|---|
| 0.25 | 0.215115 | 0.214952 | 0.000162 |
| 0.5 | 0.443674 | 0.443409 | 0.000265 |
| 0.75 | 0.699963 | 0.699724 | 0.000239 |
The calculator below opens on this example.
Forgetting h² on the right-hand side.
Treating y₀ and yₙ as unknowns.
Using forward differences.
Write the equation as y'' + p(x) y' + q(x) y = r(x).
Add this calculator to a new note, next to your own working. It stays live: change the numbers there any time.