Mathematics / Finite Difference BVPs
FREE TO EXPLORE
LABORATORY 35 · MATHEMATICS

Finite Difference BVPs lab report

A worked finite difference bvps lab report with iteration data tables, logarithmic graphs, calculations, uncertainty and conclusions.

WORKED EXAMPLE · BENCHMARK OBSERVATIONS

A complete example laboratory report.

Simulated demonstration data.

This report illustrates formal numerical analysis, iteration tracking, and convergence rate extraction. Replace its observations with your own computational telemetry when preparing a practical submission.

Student: __________________Student ID: __________________Course: __________________Date: __________________Partner: __________________Instructor: __________________

1. Title and aim

Finite Difference Methods for Two-Point Boundary Value Problems. Discretize second-order linear two-point boundary value problems using central finite difference stencils, assemble the tridiagonal stiffness-mass system, enforce Dirichlet and Neumann boundary conditions, and verify the second-order O(h²) global error convergence.

2. Abstract

Six computational trials were executed across standardized inputs Step = 1.0 to Step = 6.0 for Finite Difference Methods for Two-Point Boundary Value Problems. An ordinary least-squares regression yielded an empirical BVP Central Difference Order (α) of 2.000 order (difference from theoretical reference = 0.0000%). The empirical telemetry conclusively validates the theoretical model and complexity scaling with R² = 1.000000.

3. Apparatus and fixed settings

4. Theory and graph choice

In engineering and physics, equilibrium states—such as temperature distributions along a conducting cooling fin, electrostatic potentials between capacitor plates, or the bending deflections of a loaded structural beam—are governed by Boundary Value Problems (BVPs). Unlike initial value problems where the state evolves forward from a single initial instant, BVPs enforce constraints at two or more distant spatial boundaries simultaneously. The finite difference method discretizes the continuous spatial domain into a discrete grid of nodes, replacing continuous differential operators with localized central difference algebraic stencils. The resulting matrix system is sparse, banded, and tridiagonal, enabling direct solution in linear O(N) time via the Thomas algorithm. In this laboratory, we formulate the central difference equations for a two-point BVP, examine tridiagonal diagonal dominance, and verify the second-order O(h²) global error convergence rate.

ln(E_max) = α · ln(h) + ln(C)

The mathematical regression linearizes the relationship into the form y = mx + b. Here, the independent variable x represents Logarithmic Mesh Spacing ln(h), and the dependent variable y represents Logarithmic Maximum Error ln(E_max). The slope m directly extracts BVP Central Difference Order (α), while the intercept b accounts for residual baseline offsets.

5. Method

  1. Set up -y'' + 4y = 16x on [0, 1] with boundary conditions y(0) = 0 and y(1) = 4, verifying the analytic solution y(x) = 4x.
  2. For refinement levels k = 1 to 6, set grid intervals N = 5 · 2^{k-1} with spacing h = 1.0 / N.
  3. Set interior matrix rows: -y_{i-1}/h² + (2/h² + 4) y_i - y_{i+1}/h² = 16 x_i for i = 1, ..., N-1.
  4. Substitute known boundary values y_0 = 0 and y_N = 4 into the first and last equations, transferring knowns to vector b.
  5. Execute TDMA forward sweep and back substitution to obtain nodal vector y, computing maximum error E_max = ||y - y_exact||_∞.
  6. Plot ln(E_max) versus ln(h) and compute the linear regression slope to verify α = 2.000 with R² = 1.000000.

6. Observations and calculation table

All iterative observations use strictly controlled 64-bit IEEE 754 precision buffers. Residuals are computed relative to the ordinary least-squares regression line.

Table 1. Six simulated observations; x and y represent transformed mathematical metrics.
No.Grid Refinement Level (k) (step)Maximum BVP Grid Error ||y - y_num||_∞ (error norm)Logarithmic Mesh Spacing ln(h)Logarithmic Maximum Error ln(E_max)Fitted yResidual
11.00.008926-1.6094-4.7188-4.71880.0000
22.00.002231-2.3026-6.1052-6.10520.0000
33.00.000558-2.9957-7.4914-7.49140.0000
44.00.000139-3.6889-8.8778-8.87780.0000
55.03.5e-05-4.3820-10.2640-10.26400.0000
66.09e-06-5.0752-11.6504-11.65040.0000

Download the sample observations (CSV) ↓

7. Worked calculation for one observation

For step k = 1.0: Logarithmic mesh coordinate x = ln(h) = -1.6094. Logarithmic error y = ln(E) = α · ln(h) + ln(C) = -4.7188. Empirical error: 0.008926.

8. Graph, gradient and final calculation

-12.69-5.49-10.44-4.42-8.18-3.34-5.93-2.27-3.68-1.19Logarithmic Mesh Spacing ln(h)Logarithmic Maximum Error ln(E_max)

Circular markers represent empirical computational observations. The solid line represents the ordinary least-squares linear fit.

x̄ = -3.34230; ȳ = -8.18460
Σ(x − x̄)² = 8.40810
Σ(x − x̄)(y − ȳ) = 16.81620
m = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)² = 2.00000000
b = ȳ − mx̄ = -1.50000000
ln(E) = 2.0000 · ln(h) + -1.5000 ⟹ α = 2.000 (theoretical α = 2.0)

9. Uncertainty and comparison

Percentage difference = |estimate − theoretical value| / |theoretical value| × 100 = 0.0000%.

For n = 6 observations, Σresidual² = 0.00000; s² = Σresidual²/(n − 2). Gradient standard error = √[s²/Σ(x − x̄)²] = 0.00000. Intercept standard error = √[s²(1/n + x̄²/Σ(x − x̄)²)] = 0.00000.

Propagating the fit parameters yields a fit standard error of 1.0000e-04 order, with an ideal coefficient of determination R² = 1.000000.

In computational mathematics and numerical analysis, errors arise from algorithmic discretization, finite precision IEEE 754 floating-point arithmetic (machine epsilon ε_mach ≈ 2.22 × 10⁻¹⁶ for 64-bit double precision), and condition number propagation. The ordinary least-squares fit across n = 6 standardized observations provides standard errors for the gradient and intercept. Because the mathematical recurrence is evaluated with high numerical precision, the residual sum of squares is vanishingly small, yielding a coefficient of determination R² ≥ 0.999999 and confirming the theoretical mathematical model.

10. Result and discussion

BVP Central Difference Order (α) = 2.000 order
Theoretical reference value: 2.000 order

The empirical benchmark observations provide rigorous quantitative verification of Finite Difference Methods for Two-Point Boundary Value Problems. In numerical analysis, scientific computing, and computational mathematics, algorithms are characterized by their asymptotic operational scaling, stability, and convergence rates. Across all six observations, the empirical slope m = 2.0000 confirms the theoretical model with near-zero residual variance. Furthermore, comparison with alternative algorithmic paradigms underscores critical trade-offs between memory footprint, condition number sensitivity, and operational throughput. The algorithm's behavior confirms the mathematical predictions established by numerical analysis literature.

11. Precautions and limitations

Finite difference methods are naturally suited for simple rectangular or tensor-product geometries; complex curved boundaries require finite elements or coordinate mappings. The simulation solves the two-point BVP -y'' + 4y = 16x on [0, 1] with Dirichlet boundary conditions across grid spacings h = 0.20 / 2^{k-1}. The maximum nodal error is measured against the exact analytic solution. The logarithmic regression ln(E) = α·ln(h) + ln(C) extracts the asymptotic order α = 2.000 with R² = 1.000000.

12. Conclusion

This computational laboratory investigation quantitatively verified the mathematical formulation and asymptotic scaling of Finite Difference Methods for Two-Point Boundary Value Problems. Through rigorous tracking across six observation points, we confirmed an empirical BVP Central Difference Order (α) of 2.000 order matching the theoretical reference 2.000 order within 0.0000% error. The investigation demonstrates why this method serves as an indispensable tool in modern computational science.