2026 2NM4 Week 9 - Differential Equations - Boundary Value Problems
Overview
The lecture compares shooting, collocation, finite difference, and finite volume methods for boundary value problems, then connects spatial discretization to partial differential equations and time-stepping stability. It works through a projectile BVP, sparse finite-difference systems, flux balance for conservation laws, and explicit, implicit, and Crank–Nicolson schemes for heat diffusion.
Key takeaways
- Shooting converts a two-point BVP into repeated IVPs: integrate each trial initial condition with a solver such as RK45, then use a scalar root finder on the endpoint mismatch.
- Finite-difference BVP discretization produces sparse systems because each node couples mainly to nearby nodes; a one-dimensional second-derivative stencil yields a tridiagonal matrix.
- Boundary formulas can lower the overall finite-difference order: a first-order one-sided derivative at a Neumann boundary can undermine second-order interior stencils, while a ghost node can preserve a central stencil.
- Finite volume enforces conservation by balancing fluxes across control-volume faces, making it especially suitable for mass, momentum, and energy transport in computational fluid dynamics.
- For one-dimensional explicit Euler heat diffusion on a uniform grid, stability requires Δt ≤ Δx²/(2α), where α is thermal diffusivity; implicit Euler avoids that explicit stability restriction at the cost of solving a coupled system.
- Two-point Gauss–Legendre quadrature integrates polynomials through degree three exactly on its reference interval, offering high accuracy with only two function evaluations.
Chapters
- An IVP specifies conditions at the start of a domain, such as initial position and slope for a second-order ODE.
- A BVP specifies information at both ends, leaving the solution between those boundaries unknown.
- The lecture introduces shooting, collocation, finite difference, and finite volume as approaches to BVPs.
- The cannon analogy treats the unknown initial velocity as the adjustable parameter needed to reach a target boundary.
- Each trial velocity is integrated across the domain, and the endpoint error becomes a scalar residual.
- Bracketed methods, secant, or Newton's method can find the velocity that makes the endpoint residual zero.
- Collocation starts with an interpolating or fitted function whose parameters represent an approximate solution.
- The candidate function and its derivatives are substituted into the differential equation at selected points.
- A root finder or optimizer adjusts the unknown parameters until the equation residuals are small.
- Radial basis functions depend on distance, so they can represent functions in many dimensions without relying on multivariate polynomials.
- RBF collocation can place more basis centers near regions where the solution changes rapidly.
- Centers placed too close together can make the interpolation matrix ill-conditioned, limiting the method's practical accuracy.
- Finite difference lays down domain points and replaces derivatives with formulas involving neighboring solution values.
- The central first-derivative formula gains second-order accuracy when the left and right step sizes are equal.
- On an uneven grid, the familiar central-difference cancellation no longer applies without modified formulas.
- A conservation equation tracks the net flux into or out of a control volume, like students entering and leaving a room.
- The divergence operator describes local net outflow, while a boundary integral accounts for flux crossing the control surface.
- Finite volume is especially useful for conservation problems common in computational fluid dynamics.
- The shooting method turns a two-point BVP into repeated IVPs by guessing a missing initial condition.
- An existing solver such as RK45 integrates each trial, and a root finder updates the guess based on the endpoint mismatch.
- Shooting is direct and effective for low-dimensional problems, particularly linear ones, but can be sensitive to poor guesses and stiffness.
- The example sets vertical acceleration to negative gravity and requires the projectile to reach 50 metres at a horizontal coordinate of 5.
- Reduction of order represents the second-order height equation using velocity and acceleration state variables.
- The endpoint height minus 50 becomes the root-finding residual, yielding a launch velocity of about 34.5 in the example.
- Collocation can use piecewise splines, radial basis functions, or global basis functions such as Fourier and Chebyshev expansions.
- Spectral methods can provide smooth, highly accurate approximations across the full domain.
- Piecewise polynomials avoid the large oscillations that can arise when fitting one high-degree polynomial across many points.
- RBF systems can become numerically unstable when centers are clustered too closely, even when an analytical solution exists.
- Interpolation choices and point placement affect whether the resulting equations can be solved robustly.
- The lecture contrasts these conditioning concerns with the sparse systems commonly produced by finite differences.
- The demonstrated SciPy BVP workflow supplies the differential equation, boundary conditions, a mesh, and an initial solution estimate.
- An initial guess is needed because the solver iterates on a generally nonlinear system of equations.
- The mesh can contain selected points across the domain, while the solver adjusts the solution values to satisfy the BVP.
- Forward and backward first-derivative formulas are first-order accurate, while the equal-spacing central formula is second-order accurate.
- Central second differences approximate the second derivative using the previous, current, and next solution values.
- Boundary points lack neighbors on one side, so boundary formulas or special treatments are required.
- For constant vertical acceleration, the second-derivative stencil produces coefficients proportional to 1, negative 2, and 1.
- Applying the stencil at each interior point and inserting fixed endpoint values forms a linear system for the unknown heights.
- The resulting matrix is tridiagonal and sparse, reducing storage and solve costs compared with a dense matrix.
- The lecture reviews Newton–Cotes formulas, including the trapezoid rule and Simpson's rules, as ways to integrate sampled values.
- For unevenly spaced data, the trapezoid rule is a straightforward option because it uses each adjacent pair of points.
- When additional function evaluations are available, Gaussian quadrature can achieve high accuracy with relatively few evaluations.
- Romberg integration combines results from successively refined, evenly spaced grids to cancel leading error terms.
- The method depends on the function being sufficiently smooth for its error behavior to remain consistent across step sizes.
- For arbitrary sampled data, Simpson-based approaches are often more practical; Romberg is most attractive when its smoothness assumptions hold.
- Two-point Gauss–Legendre quadrature on the standard interval from negative one to one is exact for polynomials through degree three.
- The interval can be transformed to a different range, with corresponding changes to the evaluation points and weights.
- The key practical advantage is high accuracy from a small number of function calls.
- The lecture wraps up the integration review by comparing fixed sampled data with cases where a function can be evaluated on demand.
- It returns to the main BVP theme: shooting adjusts an initial condition, while collocation adjusts a function representation.
- Finite difference is introduced as the method that directly applies derivative stencils across a mesh.
- A Dirichlet condition specifies the solution value at a boundary, while a Neumann condition specifies its slope or derivative.
- A Robin condition combines solution and derivative information at the boundary.
- Finite-difference meshes apply the governing ODE at interior nodes and enforce the supplied boundary conditions at the ends.
- A first-order backward formula at a Neumann boundary can reduce the overall method's order even if interior central differences are second-order accurate.
- A ghost node adds an imaginary point beyond the boundary so a central-difference stencil can be used.
- The boundary derivative condition determines the ghost value, allowing the higher-order stencil to be retained.
- Substituting finite-difference formulas into a nonlinear ODE creates a nonlinear residual system for the grid values.
- A nonlinear root finder can solve that system; linear BVPs instead reduce to a linear solve.
- In multiple dimensions, neighboring stencils form a banded system, and array operations such as NumPy ravel and reshape help map grids to solver vectors.
- Finite volume assigns a control volume to each mesh location and balances the fluxes crossing its faces.
- The divergence theorem converts a volume integral of divergence into a surface integral of boundary flux.
- This formulation directly enforces conservation of quantities such as mass, momentum, energy, and electric charge.
- For steady heat conduction, the example sums heat fluxes through the faces of a control volume, including faces with unequal spacing.
- Fourier's law relates heat flux to thermal conductivity and temperature differences across neighboring locations.
- Constant conductivity produces a linear system for temperatures; temperature-dependent conductivity produces a nonlinear system that can be solved with Newton's method or another root finder.
- Finite volume supports irregular and curved control surfaces when the mesh geometry and face connectivity are available.
- Its flux balance enforces conservation directly, while finite-difference accuracy is tied more directly to local derivative approximations.
- PDEs combine spatial boundary conditions with time-dependent initial conditions, extending the BVP and IVP ideas.
- For second-order PDEs, classification depends on the coefficients of the highest-order spatial derivatives.
- The discriminant distinguishes elliptic, parabolic, and hyperbolic behavior, associated in the lecture with zero, one, or two real characteristic directions.
- Characteristic directions describe how information propagates through the equation.
- Elliptic equations describe spatial boundary-value problems such as steady heat transport, where second derivatives appear in space but not time.
- Parabolic equations, such as heat diffusion, are first-order in time and second-order in space, so they are advanced by time marching.
- Hyperbolic equations describe wave-like propagation, with second-order time and space derivatives and information traveling along characteristic directions.
- A time-dependent PDE typically combines a spatial discretization, such as finite difference, with a time-stepping method.
- The lecture uses subscript indices for spatial locations and superscripts for time levels.
- The same time-marching structure can be paired with finite difference, finite element, or finite volume spatial solvers.
- Explicit Euler computes the next temperature field from the current field and neighboring spatial values.
- For one-dimensional heat diffusion with uniform spacing, stability requires the time step to be no greater than the spatial step squared divided by twice the thermal diffusivity.
- Reducing the spatial step without also reducing the time step can destabilize the solution, illustrating the explicit method's stability constraint.
- Implicit Euler evaluates spatial terms at the next time level, coupling unknown temperatures into a system that must be solved each step.
- The lecture presents implicit Euler as unconditionally stable for the diffusion example, with additional computational cost from solving the coupled system.
- Crank–Nicolson averages the explicit and implicit spatial contributions and is second-order accurate in time.
- PDE time integrators encounter stiffness much like IVP solvers, which can make implicit methods worthwhile despite their linear or nonlinear solves.
- Explicit methods are easier to parallelize and can suit fast transient simulations, but may require many small time steps.
- Implicit methods can take larger steps for stiff physics, while large two- or three-dimensional meshes make repeated system factorizations expensive.
Transcript excerpt
0:00 Uh so last week we talked about initial value problems. IVPs are when you have information about the beginning of your domain. So typically you would have something like your your initial position, your initial function value. Hopefully you would have some kind of a slope. Sometimes you have uh just an initial value. Anybody have any idea when that would be? Every single time. Every single time. Typically you would have uninitial condition that is your boundary at a single domain. The domain is time in that case. Um sometimes if you have anything that has a second derivative like this guy you would have ideally uh a position and a slope at your initial time right second order differential equation. Two pieces of information you
0:49 can find your solution. Boundary value problems are problems where you have information at both sides of your domain. So the idea there is that um you know where you are here, you know where you are over there, and you're worried about what's happening in the middle there. Um typically they are are a bit I would say more robust than initial value problems because you've anchored your domain, right? When you're going for IVPs, your your error is accumulating up and up and up and up and up and at the end you're just kind of there and whatever error you've accumulated along the way, you have to treat with like RK45. These are the mesh refinement techniques. With a boundary value problem, you know what it is over here, you know what it is over there, and you can fix those two in
1:38 which case you don't have this the same nature of propagation of error as your time stepping up and up and up or stepping through your domain.
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Numerical Methods for Engineering.