1-D Poisson Equation Solver
Solve a one-dimensional Poisson boundary-value problem on 0≤x≤1. Select a source function, choose grid density and solve the second-order finite-difference tridiagonal system directly.
How this tool works
At each interior point, −u″≈(2uᵢ−uᵢ₋₁−uᵢ₊₁)/Δx²=fᵢ. With fixed endpoint values, the interior equations form a symmetric tridiagonal linear system.
Example
Choose f(x)=π²sin(πx). With zero endpoints, the exact solution is sin(πx), making it a convenient grid-convergence check.
Common questions
What boundary conditions are used?
This calculator uses homogeneous Dirichlet conditions u(0)=u(1)=0.
What is the expected spatial order?
The centered second derivative is second-order accurate in Δx for smooth solutions.