§5.1–5.1.5
Space, combination, span
A linear space of functions is closed under addition and scalar multiplication: . It is not required to be closed under products: in , needs .
The set alone is not a linear space; its span is.
Lab 05 · Chapter 5
Can an integral, a Laplace transform or a linear ODE be solved by one small linear system instead of repeated integration by parts?
What the book proves
§5.1–5.1.5
A linear space of functions is closed under addition and scalar multiplication: . It is not required to be closed under products: in , needs .
The set alone is not a linear space; its span is.
§5.1.6–5.1.9
A basis spans and is independent; is its size: , . All polynomials form an infinite-dimensional space.
§5.1.10
is closed; is not, since . On a closed space, is a linear map of the space into itself — the key to everything below.
§5.2.1–5.2.2
Book example: gives , so .
§5.2.3–5.2.7
For try . Since ,
Linear independence of the basis makes the matching condition also necessary.
§5.2.7
If ,
§5.2.8, Steps 1–4
For , the integrating factor gives the causal solution with :
The causal inverse generally does not map the finite-dimensional space V back into V.
§5.2.8, Steps 5–8
So is the algebraic map to a particular solution on , not by itself the causal inverse; the boundary subtraction in the MBM formula supplies the endpoint condition. Book example on , : algebraic , causal .
§5.2.9
Linearity: if , , then .
§5.2.10 Canonical bases and ready matrices, p. 144. Every entry below is reproduced exactly by the calculators (step 5 of the integral mode).
| Basis Φ(x) | Ω (Φ′ = ΩΦ) | M(b) = (bI + Ωᵀ)⁻¹ | Singular when |
|---|---|---|---|
| (never for a basis) | |||
| (Remark 13) | |||
| (Example 5.4) | |||
| (§5.3.3) | block triangular, Remark 14 |
§5.2.11
For the exp–trig basis this is , and likewise for exp–hyp with .
Remark 14
Used to read selected components of for the -trig blocks.
after Example 5.4
For , is upper triangular with
No further factorial: the of is cancelled by the .
§5.3.1
If , , , :
Since , the joint matrix is — the same transpose rule as for one basis. In practice solve .
§5.3.2, §5.3.4
Non-closed functions (e.g. sinc) must first be expanded into a closed basis.
Remark 15, §5.3.5
Prop. 5.3.1, §5.3.6
For and :
using with .
Remark 16, Examples 5.3.2–5.4
If is large enough that (i.e. ):
, (), (). The vector is the boundary vector.
§5.3.7, eq. (5.1)
Second- and higher-order equations are handled via state-space form (or kernel splitting) with the same boundary principle.
§5.3.8
Compute
Loading the Matrix Boundary Method calculators… It runs entirely in your browser and needs JavaScript.
From the book
Every value in the tables below is recomputed by this page's engine (exact rational matrices, then floating-point boundary evaluation) and compared with the book's closed form or with adaptive quadrature.
§5.2.11
via . Check at :
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| integral | −7.048682675078 | −7.048682675078 (book closed form) | Agree · 1.6 × 10⁻¹⁵ |
| integral | −7.048682675078 | −7.048682675078 (quadrature) | Agree · 1.3 × 10⁻¹⁵ |
§5.2.11
Valid for every (sympy confirms the identity symbolically). At : . The earlier edition's final line agreed with this only at .
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| −1.281718171541 | −1.281718171541 (e − 4) | Agree · 0 | |
| −7.432751680944 | −7.432751680945 (corrected formula) | Agree · 2.5 × 10⁻¹⁵ | |
| −0.502042860334 | −0.502042860334 (corrected formula) | Agree · 0 |
§5.2.11
Reading note: the book's “Example 2 (Exp–Trig base)” writes next to a basis containing ; the displayed boundary formula integrates , which is how it is used here.
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| 2.252467273987 | 2.252467273987 (quadrature) | Agree · 2 × 10⁻¹⁶ | |
| 3.330707044549 | 3.330707044549 (quadrature) | Agree · 0 |
§5.3.3
, , : gives and
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| −0.3916581181052 | −0.3916581181052 (book closed form) | Agree · 0 |
§5.3.3
Six-state basis, , :
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| 0.07488579633485 | 0.07488579633485 (book closed form) | Agree · 5.6 × 10⁻¹⁷ |
§5.3.3
The book names the first constant a; it is written a₀ here to avoid a clash with the upper limit a.
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| −0.8347757315093 | −0.8347757315093 (book closed form) | Agree · 2.2 × 10⁻¹⁶ |
Examples 5.3.2, 5.3, 5.4
, computed symbolically by the lab:
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| 0.1538461538462 | 0.1538461538462 (s/(s²+ω²)) | Agree · 2.8 × 10⁻¹⁷ | |
| 0.2307692307692 | 0.2307692307692 (ω/(s²+ω²)) | Agree · 2.8 × 10⁻¹⁷ | |
| 0.4 | 0.4 (1/(s−α)) | Agree · 5.6 × 10⁻¹⁷ |
after Example 5.4
Reproduced exactly (and checked against the rational inverse of tI + Ωᵀ) in the “Polynomial diagonal rule” mode.
§5.2.8
(i.e. ): algebraic particular solution (inside V), causal solution (outside V).
| Quantity | Lab (MBM) | Reference | Verdict |
|---|---|---|---|
| 0.5 | 0.5 (1/b) | Agree · 0 | |
| 0.3767015180292 | 0.3767015180292 ((1 − e^{−bx})/b) | Agree · 0 |
| Equation, y(0) = 0 | Book solution | Lab solution (exact coefficients) | y(0.9): lab vs book vs quadrature |
|---|---|---|---|
| Example 1 (trig forcing) | 3.63603820927 · Agree · 2.4 × 10⁻¹⁶ · Agree · 0 | ||
| Example 2 (exp–trig forcing) | 0.840168825352 · Agree · 1.1 × 10⁻¹⁶ · Agree · 0 | ||
| Example 3 (polynomial forcing) | 0.407411866103 · Agree · 0 · Agree · 1.1 × 10⁻¹⁶ | ||
| Example 6 (exponential forcing) | 8.83008426046 · Agree · 0 · Agree · 4 × 10⁻¹⁶ | ||
| Exercise 1 | 4.43189600945 · Agree · 2 × 10⁻¹⁶ · Agree · 0 |
Independent checks
Reference values were computed independently with sympy and mpmath (30-digit quadrature, sympy dsolve, sympy laplace_transform) by scratch/ch5/sympy_check.py and stored as a fixture; the lab's TypeScript engine is compared with them below and in the automated tests. The tables are computed on the server when this page is rendered.
| Basis | Dimension | max relative |Φ′ − ΩΦ| (Taylor-mode AD, 3 points) |
|---|---|---|
| {1, …, x⁸} | 9 | 1.8 × 10⁻¹⁶ Agree · 1.8 × 10⁻¹⁶ |
| {cos 2x, sin 2x} | 2 | 0 Agree · 0 |
| {e^(x/2) cos 3x, e^(x/2) sin 3x} | 2 | 1.3 × 10⁻¹⁶ Agree · 1.3 × 10⁻¹⁶ |
| {e^(−x) cosh 2x, e^(−x) sinh 2x} | 2 | 0 Agree · 0 |
| x³-trig block, ω = 1/3 | 8 | 1.9 × 10⁻¹⁶ Agree · 1.9 × 10⁻¹⁶ |
| {cos x, sin x} ⊗ {1, x, x²} | 6 | 0 Agree · 0 |
| Case | MBM (exact z) | sympy / mpmath | vs sympy | vs quadrature | vs block exponential | AD residual of F |
|---|---|---|---|---|---|---|
| poly-x2-2x-b1-a1 | −1.281718171541 | −1.281718171541 | Agree · 1.7 × 10⁻¹⁶ | Agree · 0 | Agree · 3.1 × 10⁻¹⁵ | 5.1 × 10⁻¹⁶ |
| poly-x2-2x-b3/2-a2 | −7.432751680944 | −7.432751680944 | Agree · 1.3 × 10⁻¹⁵ | Agree · 1.3 × 10⁻¹⁵ | Agree · 2.4 × 10⁻¹⁵ | 1.8 × 10⁻¹⁴ |
| poly-deg5 | −0.2514796288676 | −0.2514796288676 | Agree · 2 × 10⁻¹⁴ | Agree · 2 × 10⁻¹⁴ | Agree · 2.4 × 10⁻¹⁴ | 6.7 × 10⁻¹⁴ |
| trig-ex521 | −7.048682675078 | −7.048682675078 | Agree · 1 × 10⁻¹⁵ | Agree · 2.5 × 10⁻¹⁶ | Agree · 6 × 10⁻¹⁵ | 3.8 × 10⁻¹⁶ |
| trig-negative-b | −0.07697053225685 | −0.07697053225685 | Agree · 1.4 × 10⁻¹⁷ | Agree · 1.4 × 10⁻¹⁷ | Agree · 3.6 × 10⁻¹⁶ | 2.2 × 10⁻¹⁶ |
| exptrig | 2.252467273987 | 2.252467273987 | Agree · 0 | Agree · 2 × 10⁻¹⁶ | Agree · 3.2 × 10⁻¹⁵ | 3.3 × 10⁻¹⁶ |
| exphyp | 3.330707044549 | 3.330707044549 | Agree · 0 | Agree · 0 | Agree · 4.4 × 10⁻¹⁵ | 1.5 × 10⁻¹⁶ |
| xcos-weighted | −0.8347757315093 | −0.8347757315093 | Agree · 1.1 × 10⁻¹⁶ | Agree · 1.1 × 10⁻¹⁶ | Agree · 5.6 × 10⁻¹⁶ | 1.1 × 10⁻¹⁶ |
| xcos-b0 | 0.1006120042761 | 0.1006120042761 | Agree · 1.4 × 10⁻¹⁷ | Agree · 2.8 × 10⁻¹⁷ | Agree · 8.3 × 10⁻¹⁷ | 5.6 × 10⁻¹⁷ |
| x2cos-b0 | 0.07488579633485 | 0.07488579633485 | Agree · 4.2 × 10⁻¹⁷ | Agree · 5.6 × 10⁻¹⁷ | Agree · 2 × 10⁻¹⁵ | 2.2 × 10⁻¹⁶ |
| x3sin | 4.270197730877 | 4.270197730877 | Agree · 0 | Agree · 0 | Agree · 2.1 × 10⁻¹⁶ | 9.1 × 10⁻¹⁶ |
| prod-x-cos2x | −0.493818600802 | −0.493818600802 | Agree · 0 | Agree · 5.6 × 10⁻¹⁷ | Agree · 2.3 × 10⁻¹⁵ | 1.1 × 10⁻¹⁶ |
| prod-exptrig-x2 | 0.3829151495545 | 0.3829151495545 | Agree · 0 | Agree · 5.6 × 10⁻¹⁷ | Agree · 5.6 × 10⁻¹⁷ | 2.2 × 10⁻¹⁶ |
| prod-trig-trig | 0.3641954052156 | 0.3641954052156 | Agree · 1.7 × 10⁻¹⁶ | Agree · 1.1 × 10⁻¹⁶ | Agree · 5 × 10⁻¹⁵ | 2.9 × 10⁻¹⁶ |
| res-poly-b0 (resonant: limit value) | −0.6666666666667 | −0.6666666666667 | Agree · 1.1 × 10⁻¹⁶ | Agree · 0 | Agree · 1.1 × 10⁻¹⁶ | n/a (enlarged space) |
| res-exp (resonant: limit value) | 7.5 | 7.5 | Agree · 0 | Agree · 0 | Agree · 0 | n/a (enlarged space) |
| res-exphyp (resonant: limit value) | 7.199768754143 | 7.199768754143 | Agree · 3.7 × 10⁻¹⁶ | Agree · 3.7 × 10⁻¹⁶ | Agree · 1.1 × 10⁻¹⁴ | n/a (enlarged space) |
| res-cos-cos-b0 (resonant: limit value) | 0.810799376173 | 0.810799376173 | Agree · 1.1 × 10⁻¹⁶ | Agree · 0 | Agree · 2.2 × 10⁻¹⁶ | n/a (enlarged space) |
| res-cos-sin-b0 (resonant: limit value) | 0.4134109052159 | 0.4134109052159 | Agree · 0 | Agree · 5.6 × 10⁻¹⁷ | Agree · 1.2 × 10⁻¹⁵ | n/a (enlarged space) |
| Case | sympy L(s) | Lab uᵀ(sI − Ω)⁻¹Φ(0) | sympy value | Verdict |
|---|---|---|---|---|
| L-cos3 | s/(s**2 + 9) | 0.1538461538462 | 0.1538461538462 | Agree · 2.8 × 10⁻¹⁷ |
| L-sin2 | 2/(s**2 + 4) | 0.4705882352941 | 0.4705882352941 | Agree · 0 |
| L-exp | 2/(2*s - 3) | 0.4 | 0.4 | Agree · 5.6 × 10⁻¹⁷ |
| L-x2 | 2/s**3 | 0.128 | 0.128 | Agree · 2.8 × 10⁻¹⁷ |
| L-exptrig-sin | 8/(4*s**2 - 4*s + 17) | 0.1951219512195 | 0.1951219512195 | Agree · 2.8 × 10⁻¹⁷ |
| L-xcos | (s**2 - 4)/(s**4 + 8*s**2 + 16) | 0.02958579881657 | 0.02958579881657 | Agree · 6.9 × 10⁻¹⁸ |
| L-exphyp | (s - 1)/(s**2 - 2*s - 3) | 0.6 | 0.6 | Agree · 0 |
| L-mix | (2*s - 3)/(s**2 + 1) | −2.1 | −2.1 | Agree · 0 |
| Case | Order | Lab y(x) | sympy dsolve | vs sympy | vs RK4 |
|---|---|---|---|---|---|
| O-ex1 | 1 | 4.871049702527 | 4.871049702527 | Agree · 1.8 × 10⁻¹⁶ | Agree · 1.7 × 10⁻¹⁴ |
| O-ex2 | 1 | 1.327059576517 | 1.327059576517 | Agree · 0 | Agree · 2 × 10⁻¹⁴ |
| O-ex3 | 1 | 0.1687999917112 | 0.1687999917112 | Agree · 2.8 × 10⁻¹⁷ | Agree · 3.9 × 10⁻¹⁵ |
| O-ex6 | 1 | 1.763407241879 | 1.763407241879 | Agree · 1.3 × 10⁻¹⁶ | Agree · 5 × 10⁻¹⁴ |
| O-exercise1 | 1 | 0.4017547066355 | 0.4017547066355 | Agree · 5.6 × 10⁻¹⁷ | Agree · 7.2 × 10⁻¹⁵ |
| O-y0 | 1 | 45.0421235489 | 45.0421235489 | Agree · 0 | Agree · 3.8 × 10⁻¹⁵ |
| O-res-exp (resonant) | 1 | 8.915458363911 | 8.915458363911 | Agree · 2 × 10⁻¹⁶ | Agree · 1.5 × 10⁻¹⁴ |
| O-res-poly (resonant) | 1 | 2.125 | 2.125 | Agree · 0 | Agree · 2.7 × 10⁻¹⁴ |
| O-res-trig | 1 | 0.9092974268257 | 0.9092974268257 | Agree · 0 | Agree · 1.2 × 10⁻¹³ |
| N-osc | 2 | 0.4243137677571 | 0.4243137677571 | Agree · 5.6 × 10⁻¹⁷ | Agree · 1.4 × 10⁻¹⁴ |
| N-poly | 2 | 0.6009279875968 | 0.6009279875968 | Agree · 1.8 × 10⁻¹⁵ | Agree · 7 × 10⁻¹⁴ |
| N-res-sin (resonant) | 2 | 0.87079554996 | 0.87079554996 | Agree · 0 | Agree · 1.6 × 10⁻¹⁴ |
| N-third | 3 | 0.1807587873697 | 0.1807587873697 | Agree · 1.3 × 10⁻¹⁵ | Agree · 1.3 × 10⁻¹⁵ |
| N-double-res (resonant) | 2 | 2.39048418437 | 2.39048418437 | Agree · 1.9 × 10⁻¹⁶ | Agree · 5.8 × 10⁻¹⁵ |
| N-fourth | 4 | 0.3470221492595 | 0.3470221492595 | Agree · 1.3 × 10⁻¹⁵ | Agree · 3 × 10⁻¹⁵ |
The automated tests (node --test "lib/math/ch5/*.test.ts") additionally check every exact vector z against sympy rationals, the book's ready matrices and worked examples entry by entry, the corrected diagonal rule against the exact inverse for n up to 10, and that the untransposed Kronecker system gives a wrong value.
When the formulas hold
book §5.2.7, §5.3.2
Remark 13, §5.3.4
Remark 16
§5.2.8, §5.3.7
Implementation
Scope
Where this comes from
Analytical Methods for Higher-Order Derivatives, Integral Transforms, and Matrix-Based Techniques (corrected edition). Section numbers and printed pages below are generated from the corrected PDF.
The interactive cases on this page are ported from the author's open-source lab. Where the repository and the corrected book disagree, the book is followed and the difference is listed below.
mbm-calculator on GitHub (opens in a new tab)
https://github.com/rida313jamal-source/mbm-calculator
| Item | Earlier text (GitHub / old site) | Corrected book (used here) |
|---|---|---|
| Joint resolvent of the Kronecker-state MBM §5.3.1 | Repository (“Generalization: MBM for Products”): — no transposes. | , solve . The untransposed form gives wrong values whenever is not symmetric (shown live in the Products mode). |
| Polynomial diagonal–Laplace rule §5.3.6 | Repository (dashboard section “Canonical Bases and Ready Matrices”, 5.5, its matrix expander and its diagonal-matrix helper): — an extra . | , equal to entry by entry (book matrix: , , , …). The repository's entries are wrong for every . |
| Meaning of §5.2.8 | Repository (4.2) and the previous site's MBM texts: , i.e. the matrix “is the finite-dimensional representation of the inverse operator ”, with defined causally. | is the algebraic map to a particular solution in ; the causal solution is and need not lie in (on : versus ). The boundary subtraction supplies the endpoint condition. |
| Final line of the polynomial example §5.2.11 | An earlier manuscript of this example: the final closed form agreed with the integral only at b = 1. | for every ; at it equals . Verified symbolically with sympy and numerically in the lab. |
| Singular (resonant) systems §5.3.4 | Repository calculators call np.linalg.solve with no check: its own default input (, ) raises a LinAlgError; ODE resonance is likewise unhandled. | is detected exactly and explained per basis (Remark 13: for exp–hyp; §5.3.2: product resonances). The limiting value is shown, as the book prescribes (“take limits”, §5.3.4), with three independent routes. |
| Laplace calculator: region of convergence §5.3.6 | Repository Laplace calculator accepts any and prints as “the Laplace value” (e.g. ). | The integral equals only when , i.e. (Remark 16, Example 5.4: ). The region is shown beside every result; outside it the value is labelled as an analytic continuation. |
| Polynomial generator in the repository helper §5.2.10 | Repository helper that builds the polynomial basis from an expression: , which is (it would encode ). The helper is not used by the repository's calculators, which use the correct matrix. | For : , so is the upper bidiagonal matrix of the book ( for ). |
| First-order ODE initial value (previous site lab) §5.3.7 | Previous lab: only with ; products, the exponential-matrix variant and higher orders listed as unsupported. | Book eq. (5.1) in full: , with the algebraic/causal split of §5.2.8; products, Prop. 5.3.1 and higher orders are now implemented. |
Every section of mbm_dashboard_v3.py is covered: the theory sections (linear spaces, MBM representation, operator interpretation, canonical bases, worked examples, products, exponential-matrix variant, Laplace connection, linear ODEs) are in Theory and Worked examples; its integral calculator (five families), Laplace calculator (nine families) and the polynomial diagonal matrix expander are interactive modes above. The sidebar's “ODE Calculator” had no implementation in the repository; it is implemented here for orders 1–4. The product, exponential-matrix and resonance tools are additions grounded in the book.