Alphabeta Math
AlgorithmAlgorithm: Literature-sourcedProof: Not applicablePipeline-generatedprecheck pendingjudge pass (gpt-6-luna)
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Centered finite differences for the zero-Dirichlet boundary-value problem

Definition

The input is a real-valued continuous function g on [0,1] and a positive integer N. The procedure uses exact real arithmetic. Its admissible inputs have N≥1; an input that is not a positive integer returns invalid-mesh.

Set h=1/(N+1), xj=jh for 0≤j≤N+1, and gj=g(xj) for 1≤j≤N. The unknowns are the N interior values U1,…,UN; set the boundary values U0=UN+1=0. The finite-difference equations are

−Uj−1+2Uj−Uj+1h2=gj,1≤j≤N,

or AhU=gh, where Ah=h−2tridiag⁡(−1,2,−1), with the known zero boundary values moved to the right-hand side (they contribute zero here).

To solve, form bj=h2gj. Set p1=2 and s1=b1. For j=2,…,N, in increasing order, if pj−1=0 return linear-solve-failure; otherwise set

pj=2−1pj−1,sj=bj+sj−1pj−1.

If a formed pivot pj is zero, return linear-solve-failure. Otherwise set UN=sN/pN and, in decreasing order for j=N−1,…,1, set

Uj=sj+Uj+1pj.

Check the equations exactly. If any equation fails, return linear-solve-failure; otherwise return status success with the vector U and the boundary values U0=UN+1=0.

Remarks

This is an exact-arithmetic definition and makes no finite-precision accuracy claim. A numerical implementation that returns an approximate vector must report its residual separately; the assigned error theorem includes that residual as an independent term.

Used by

Dependency tree · 0 levels

Nothing. This result depends on no other item in the library.

Sources