Initial value problems give us complete information at the starting point, while boundary value problems provide partial information at both ends — like knowing the departure and destination points without knowing the complete path in between. These problems are extremely common in engineering: beam deflection, steady-state heat conduction, and eigenstate problems in the Schr ö dinger equation. This chapter explores in depth the theory and numerical methods for solving boundary value problems.
What Are Boundary Value Problems?
From Initial Value Problems to Boundary Value Problems
Recall the Initial Value Problem (IVP):
Boundary Value Problem (BVP):
Why Are Boundary Value Problems Harder?
For initial value problems, the existence and uniqueness theorem (Picard's theorem) guarantees the existence and uniqueness of solutions. But boundary value problems may have:
- No solution: Incompatible conditions
- Infinitely many solutions: Conditions insufficient to determine a unique solution
- A unique solution: This is the case we hope for
Example 1: Consider
- BVP1:
, - Solution:
, any satisfies this, infinitely many solutions
- Solution:
- BVP2:
, - Need
, contradiction, no solution
- Need
- BVP3:
, - Unique solution
- Unique solution
Types of Boundary Conditions
First kind (Dirichlet): Given function values
Second kind (Neumann): Given derivative values
Third kind (Robin/Mixed): Given linear combinations
of function values and derivatives
Linear Boundary Value Problems
Standard Form
Second-order linear BVP:
Solution Structure
The solution of a linear BVP can be expressed as:
Superposition Method
Method:
- Solve two initial value problems:
- Problem A:
, , - Problem B:
, ,
- Problem A:
- Solution is
- Determine
from boundary condition :
(Requires
1 | import numpy as np |
Shooting Method
Basic Idea
The Shooting Method transforms a BVP into an IVP:
- Guess the missing initial condition
- Solve the initial value problem to the right boundary
- Check if the right boundary condition is satisfied
- If not, adjust the guess and repeat
Like shooting: adjust the gun's angle (initial slope) until hitting the target (satisfying the right boundary condition).
Shooting Method for Nonlinear BVPs
Consider:
Algorithm:
- Define residual function
- where is the solution of IVP with ,$y'(a) = s F(s) = 0$(using Newton's method or bisection)
1 | def shooting_method(f, a, b, alpha, beta, s_guess, tol=1e-8, max_iter=50): |
Sensitivity of the Shooting Method
The shooting method can sometimes be very sensitive: the solution's
dependence on initial slope can be exponential. Consider:
Small initial errors get amplified by about
Multiple Shooting Method
Idea: Divide the interval into multiple segments, shoot independently on each segment, then match at internal nodes.
This reduces exponential amplification of errors.
1 | def multiple_shooting(f, a, b, alpha, beta, n_segments=4): |
Finite Difference Method
Basic Idea
The Finite Difference Method directly discretizes the differential equation, transforming the BVP into a system of algebraic equations.
Discretizing derivatives:
Finite Differences for Linear BVPs
Consider:
Matrix Form
This is a tridiagonal linear system
1 | def finite_difference_linear(p, q, r, a, b, alpha, beta, N): |
Finite Differences for Nonlinear BVPs
For nonlinear equations
1 | def finite_difference_nonlinear(f, df_dy, df_ddy, a, b, alpha, beta, N, |
Eigenvalue Problems
Sturm-Liouville Problems
Standard form:
Finding Eigenvalues with Finite Differences
After discretization, we get a generalized eigenvalue problem
1 | def sturm_liouville_eigenvalues(p, q, w, a, b, N, num_eig=5): |
Practical Applications
Beam Deflection
The deflection
Boundary conditions (simply supported):
Steady-State Heat Conduction
One-dimensional steady-state heat conduction:
Quantum Mechanics: Schr ö dinger Equation
One-dimensional time-independent Schr ö dinger equation:
1 | def schrodinger_1d(V, x_min, x_max, N, num_states=5, hbar=1, m=1): |
Using SciPy to Solve BVPs
SciPy provides the solve_bvp function:
1 | from scipy.integrate import solve_bvp |
Summary
In this chapter, we learned various numerical methods for boundary value problems:
| Method | Advantages | Disadvantages | Suitable For |
|---|---|---|---|
| Superposition | Simple, uses existing IVP solvers | Linear problems only | Linear BVPs |
| Shooting | Flexible, handles nonlinear | Can be unstable | General BVPs |
| Multiple Shooting | More stable | Complex implementation | Sensitive BVPs |
| Finite Difference | Direct, easy to understand | Requires linear system solve | Regular domains |
| Finite Element | Handles complex geometry | Theoretically complex | Engineering problems |
Practical advice:
- First try
scipy.integrate.solve_bvp - If it fails, check your initial guess
- For sensitive problems, consider multiple shooting or finite differences
- For eigenvalue problems, finite differences are usually sufficient
In the next chapter, we will enter the world of partial differential equations— what happens when the unknown function depends on multiple variables?
- Post title:Ordinary Differential Equations (12): Boundary Value Problems
- Post author:Chen Kai
- Create time:2019-06-03 10:45:00
- Post link:https://www.chenk.top/ode-chapter-12-boundary-value-problems/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.