Checking is not proving, and that is fine

A proof establishes a statement. A check tests it. The two do different jobs, and both are needed. Checks are fast, they catch most errors, and a single failed check is decisive: if an answer fails a correct test, the answer is wrong. A passed check only raises confidence. The aim of this guide is to make your checks independent of one another, so that passing several of them means something.

Two results serve as running examples. The first is an antiderivative; the second is a Laplace transform pair with a region of convergence.

∫x2e−x dx=−(x2+2x+2)e−x+C\int x^2 e^{-x}\,dx = -\left(x^2 + 2x + 2\right)e^{-x} + C
(A)
L{e−atsin⁡bt}(s)=∫0∞e−ste−atsin⁡bt dt=b(s+a)2+b2,Re⁡s>−a\mathcal{L}\{e^{-at}\sin bt\}(s) = \int_0^\infty e^{-st}e^{-at}\sin bt\,dt = \frac{b}{(s+a)^2 + b^2}, \qquad \operatorname{Re} s > -a
(B)

Substitute back

The cheapest test of an antiderivative is to differentiate it. For (A), the product rule gives −(2x+2)e−x+(x2+2x+2)e−x=x2e−x-(2x+2)e^{-x} + (x^2+2x+2)e^{-x} = x^2 e^{-x}, which is the integrand. The check is complete and exact.

The same test shows why it is worth doing. A common slip in repeated integration by parts drops the last constant and produces the candidate −(x2+2x)e−x-(x^2 + 2x)e^{-x}. Its derivative is (x2−2)e−x(x^2 - 2)e^{-x}, not x2e−xx^2 e^{-x}, so the error is caught in one line. For equations, substitution plays the same role: put the proposed solution back into the original equation and every side condition.

Special cases and limiting behavior

A general formula must agree with every special case you already know. For (B), these are cheap and independent of one another:

  • No damping, a=0a = 0: the formula becomes b/(s2+b2)b/(s^2 + b^2), the standard transform of sin⁡bt\sin bt.
  • No oscillation, b=0b = 0: the function is identically zero and so is the formula.
  • Large ss: the initial value theorem says sF(s)→f(0)sF(s) \to f(0). Here sF(s)→0=sin⁡0sF(s) \to 0 = \sin 0. Going one order further, s2F(s)→bs^2F(s) \to b, which matches f′(0)=bf'(0) = b.
  • Small ss with a>0a > 0: sF(s)→0sF(s) \to 0, consistent with f(t)→0f(t) \to 0 as t→∞t \to \infty.
  • Region of convergence: the integrand behaves like e−(s+a)te^{-(s+a)t}, so for real ss the integral converges exactly when s>−as > -a, and the formula has its poles at s=−a±ibs = -a \pm ib, on the boundary of that region.

Notice that each special case tests a different part of the formula. The undamped case tests the denominator's structure, the large-s behavior tests the numerator, and the region of convergence tests the hypothesis attached to the formula. A formula that passes all of them is not proved, but an error would have to be unusually well hidden to survive.

Sign and dimension checks

If tt measures time, then ss, aa and bb all carry units of inverse time, and L{f}\mathcal{L}\{f\} carries the units of ff multiplied by time. The right side of (B) has units of (time)−1/(time)−2=time(\text{time})^{-1} / (\text{time})^{-2} = \text{time}, as it should. A formula such as b2/((s+a)2+b2)b^2/((s+a)^2+b^2) would fail this test immediately.

Signs give a second test. For large real ss the kernel e−ste^{-st} concentrates near t=0t = 0, where sin⁡bt\sin bt is positive when b>0b > 0, so the transform must be positive there. A sign slip in the shift, writing (s−a)2(s-a)^2 in place of (s+a)2(s+a)^2, passes the sign test but moves the pole to s=as = a, which would describe growth like eate^{at} instead of decay. The region-of-convergence check catches it.

Numerical spot checks

When an identity depends on parameters, evaluate both sides numerically at a few points chosen so that nothing special happens there.

Spot-checking both results numerically

Test (A) on [0,1][0, 1] and test (B) with a=1a = 1, b=2b = 2 at three values of ss.

  1. By (A), ∫01x2e−x dx=F(1)−F(0)=−5e−1+2=2−5/e≈0.160603\int_0^1 x^2e^{-x}\,dx = F(1) - F(0) = -5e^{-1} + 2 = 2 - 5/e \approx 0.160603. Simpson's rule with 20,000 subintervals gives the same value to twelve decimal places.
  2. A central difference of F(x)=−(x2+2x+2)e−xF(x) = -(x^2+2x+2)e^{-x} at x=0.7x = 0.7 with step 10−510^{-5} gives 0.2433270.243327, matching 0.72e−0.7≈0.2433270.7^2 e^{-0.7} \approx 0.243327.
  3. For (B), truncate the integral at T=40T = 40. The neglected tail is at most e−(s+a)T/(s+a)e^{-(s+a)T}/(s+a) in absolute value, which is far below rounding error for s≥0.5s \ge 0.5.
  4. Numerical integration gives 0.32000.3200, 0.25000.2500 and 0.10000.1000 at s=0.5s = 0.5, 11 and 33. The formula gives 2/6.25=0.322/6.25 = 0.32, 2/8=0.252/8 = 0.25 and 2/20=0.12/20 = 0.1.
  5. The incorrect variant b/((s−a)2+b2)b/((s-a)^2 + b^2) gives 0.50.5 at s=1s = 1, twice the numerical value, and is rejected.
Value of sNumerical integralFormula (B)
0.50.50.32000.32000.320.32
110.25000.25000.250.25
330.10000.10000.100.10
Spot check of (B) with a = 1 and b = 2, rounded to four decimals.

An independent second method

The strongest check is to reach the result by a route that does not share the step you doubt. For (B), write sin⁡bt=(eibt−e−ibt)/(2i)\sin bt = (e^{ibt} - e^{-ibt})/(2i) and use only L{ect}(s)=1/(s−c)\mathcal{L}\{e^{ct}\}(s) = 1/(s - c), valid for Re⁡s>Re⁡c\operatorname{Re} s > \operatorname{Re} c:

12i(1s+a−ib−1s+a+ib)=12i⋅2ib(s+a)2+b2=b(s+a)2+b2\frac{1}{2i}\left(\frac{1}{s+a-ib} - \frac{1}{s+a+ib}\right) = \frac{1}{2i}\cdot\frac{2ib}{(s+a)^2 + b^2} = \frac{b}{(s+a)^2+b^2}

This derivation never uses the shift theorem, so it independently confirms a result that is often obtained from it. For (A), an independent check comes from the Gamma integral ∫0∞xne−x dx=n!\int_0^\infty x^n e^{-x}\,dx = n!: the definite version of (A) on [0,∞)[0, \infty) must equal 2!=22! = 2, and indeed lim⁡x→∞F(x)−F(0)=0−(−2)=2\lim_{x\to\infty}F(x) - F(0) = 0 - (-2) = 2.

What labs can and cannot establish

Interactive tools, including the pages in the Math Lab, make numerical checks quick. Use them for what they are good at: catching errors, exploring how a result depends on its parameters, and building intuition about where it might fail.

  • A numerical match at finitely many points does not establish an identity for all parameters. Two different functions can agree at the points you happened to test.
  • Floating-point evaluation has limited precision, and improper integrals must be truncated. A good check states the truncation and its error bound, as in the example above.
  • Numerical evidence says nothing about hypotheses. A formula can match numerically inside its region of validity and be meaningless outside it.
  • A clear numerical mismatch, beyond the stated error, is strong evidence that something is wrong: the formula, the code, or the way the two were compared.

A practical rule follows. Use numerical checks freely while you work, and treat them as a filter: they decide which candidate results deserve the effort of a proof. Then, when a result matters, prove it, or cite a source that does, and keep the numerical check alongside as a record of how the statement was tested.

References

  1. George Pólya. How to Solve It. Princeton University Press, 1945. "Looking back": checking the result and the argument..
  2. Lokenath Debnath and Dambaru Bhatta. Integral Transforms and Their Applications, 3rd ed.. CRC Press, 2014. Standard Laplace transform pairs, shift theorem and initial value theorem..