Adaptive Euler step doubling for exponential decay Created 2026-10-14 Updated 2026-10-14
Consider the nonstiff scalar initial value problem , , on . Its exact solution is the exponential decay . Use step-doubling error estimation with the explicit Euler method: from the same numerical starting value , form one coarse step and two half steps giving :Accept when the absolute and relative error tolerances test passes, with . There is no Richardson extrapolation in the accepted value. Both approximations have order of a numerical method one, while this local error estimator has step exponent . Consequently the adaptive step-size controller uses a square root, not a cube root:Start with . A rejected trial retains both and , caps at one, and retries. A zero estimate uses . Before every trial, cap at . Stop with a failure if floating-point arithmetic gives , or after 100000 trials. These rules specify the example completely; they are not a prescription for every ordinary differential equation solver.
Adaptive two-half-step Euler decay: exact and numerical trajectories, accepted step sizes and rejected trials
. Details. The first two trials, and , have and and are rejected. The next trial has and and is accepted. For positive decreasing numerical values, , so the local error estimator givesWhen the relative term dominates, this suggests nearly constant accepted steps, approximately . When falls below the crossover size , the absolute term increasingly permits longer steps. The sharp final decrease in only lands on ; it does not indicate a sudden loss of smoothness.
The actual signed local defect from the same numerical input isHere is Big O notation, obtained from Taylor's theorem for the exponential function. Thus agrees with the leading term as , but is not identical to . At , , the estimate is while the actual local defect is . Their closeness improves for the smaller accepted steps. Had we added using Richardson extrapolation, the accepted formula would instead be , of order of a numerical method two; the same raw difference would still scale as and would not estimate that improved value's leading defect.
Estimated versus actual local Euler defects, rejected trials, and actual accumulated global error scaled by the local tolerance
. Details. The global error obeys an exact recurrence relation involving the actual local defects:Each previous global error contracts, yet the local defects keep adding. In the plotted run, 101 steps are accepted and two trials are rejected. Every accepted is at most approximately , while the largest is approximately . At , the numerical value is approximately , compared with the exact , giving absolute error approximately . The right-hand plot deliberately scales actual global error by the same used for local acceptance; it is not a new global error tolerance test.
Tightening both absolute and relative error tolerances by a factor ten gives 315 accepted steps and endpoint absolute error approximately ; tightening both by a factor one hundred gives 991 accepted steps and endpoint absolute error approximately . This is a convergence comparison for this particular initial value problem. The endpoint error decreases by about a factor three per tenfold tightening, rather than by ten: a first-order Euler method accumulates defects across many steps, while its local error estimator varies quadratically with . A variable-step global ODE error bound needs propagation information as well as accepted local tests.
The absolute stability boundary remains a separate constraint. On the Dahlquist test equation with , the accepted two-half-step formula has stability function . It strictly damps perturbations only for . Its local error estimator is , which can pass an absolute-tolerance test at tiny even outside this damping interval. In a stiff two-mode linear system, a fast mode can therefore constrain the step long after its visible amplitude has become small. An adaptive step-size controller does not turn an explicit Euler method into an A-stable method. Official solver documentation likewise distinguishes explicit Runge-Kutta methods for nonstiff problems from implicit Runge-Kutta methods and backward differentiation formulas for stiff equations.[ref]
scipy.integrate.solve_ivp. solve_ivp, method parameter: explicit versus implicit methods and stiffness
Amplitude spectral density Created 2026-10-18 Updated 2026-10-25
An amplitude spectral density is the square root of a power spectral density. For an electric potential difference expressed in volts and frequency in hertz, its units are .
The direct divisor summatory function formula evaluates floor divisions. Its balanced Dirichlet hyperbola method formula evaluates floor divisions and reuses their sum for the other strip, followed by doubling and square-overlap subtraction. Thus it uses arithmetic operations, with big O notation, in a model that counts each division, addition and multiplication as one operation. At , the division counts for these two formulas are and .
The balanced Dirichlet hyperbola method reduces floor divisions from to ; for , two sequences of partial sums reach the same exact answer 35
. Details. For a general Dirichlet convolution, the asymmetric formula has outer terms; evaluating and has an additional cost. Under , equal thresholds minimize , but an asymmetric split can be useful if the two partial sums have different evaluation costs. The balanced divisor summatory function gains the further reuse because its two arithmetic functions are identical.
These are arithmetic operation counts, rather than counts of elementary operations on binary digits: the integers grow with , and division of longer integers costs more in that model of computational complexity theory. Computing also requires an exact integer square root, or checking and correcting a numerical square root until holds.
Bernoulli power substitution Created 2026-10-14 Updated 2026-10-25
For arbitrary real , work first on an interval where . Define exponentiation by , using the real logarithm. The change of variable is differentiable and invertible there, and the chain rule givesMultiplying the Bernoulli differential equation by yields the first-order linear differential equationThis is an exact transformation of nonzero solutions of a differential equation on the chosen branch; it is valid far from any reference state and does not discard higher powers as a local linearization would.
Given the initial condition , the integrating factor and transformed solution of a differential equation areThe product rule verifies . Recover only on the connected component of containing , inside the original coefficient interval. The first-order linear differential equation can have a longer existence interval than this inverse transformation allows.[ref]
1.4 Linear equations and the integrating factor. Notes on Diffy Qs, §1.4 Linear equations and the integrating factor: product derivative, formula (1.4), and Remark 1.4.1 on existence throughout a coefficient-continuity interval
Negative values need a separately justified real branch. For integer , the required powers are real and differentiable for too, but the inverse must retain the sign selected by the initial condition. For , represents either or ; both square roots are taken of positive . For , retains the sign directly. For a general noninteger exponent, use the positive branch unless a specific differentiable real negative branch has been established. Never evaluate a real fractional power of a negative value merely because the linear formula has become negative.
Division by excludes . When and the original real power is defined at zero, is an additional solution of a differential equation and must be checked in the original equation. When , the equation as written is undefined at zero. On a positive branch the right-hand side is locally Lipschitz in , so the Picard-Lindelöf theorem gives local uniqueness. At zero, the same hypothesis needs a fresh check: it holds for the polynomial example, whereas for a nonzero power coefficient prevents local Lipschitz continuity there. If , the inverse sends for , but sends for . The latter endpoint can lead to finite-time extinction in a sublinear Bernoulli equation, where the original equation determines how to join to zero.
Birthday square-root scale 2026-10-14
The union bound gives . Using on the distinct-label product givesThe lower bound reaches at least one half when . The simple approximation predicts a group size near 23 for . It is the quadratic number of pairs that makes the square root appear.
For a precise limiting statement, let and . Expanding the logarithm of the complement yieldsOn this scale the remainder tends to zero. Thus a fixed substantial collision probability appears after order draws. For uniform output labels, the corresponding scale is order ; matching one specified birthday instead involves a number of draws of order .
Bisection error bound Created 2026-10-14 Updated 2026-10-31
In exact arithmetic, after completed halvings the retained root bracket has width and midpoint , whereThe absolute value bound holds for every zero of a function in the current root bracket, including the one approached by continued bisection method updates. A zero of a function discarded with an earlier half need not satisfy later bounds. Before update , the evaluated candidate is , whose corresponding guarantee is . After update , the new midpoint has the smaller guarantee , even without evaluating .
Bisection widths, midpoint error bounds, and actual square-root errors after zero to fifteen halvings
. Details. The guaranteed error halves at every step; the actual absolute value error need not decrease at every step or have successive ratio . In the square root example it increases from to , while both errors remain below their guarantees. An exact midpoint zero of a function instead gives zero error and immediate termination. For this example is an irrational number, so no finite exact halving can produce it as a midpoint.
For a brief proof outline, each retained half has half the previous width and contains a zero of a function by the intermediate value theorem. Every point in the retained root bracket is at most half its width from its midpoint. If the process does not stop at a zero of a function, the nested interval theorem gives one common point as the widths tend to zero; continuity and the opposite endpoint signs force its function value to be zero. Uniqueness in the initial root bracket is unnecessary.
Bisection method Created 2026-10-14 Updated 2026-10-20
The bisection method finds a zero of a function by repeatedly halving a root bracket. Let be a real-valued continuous function on the closed interval , with . First check for endpoint zeros of a function; otherwise require strictly opposite signs at the endpoints. Evaluate the midpoint and retain the half with strictly opposite endpoint signs, stopping immediately if the midpoint is a zero of a function. The intermediate value theorem ensures that every retained root bracket still contains a zero of a function. This is the construction in MIT's root-finding notes.[ref]
https://ocw.mit.edu/courses/18-330-introduction-to-numerical-analysis-spring-2012/5b325bfa56a599794c7196de926844b0_MIT18_330S12_Chapter4.pdf. Laurent Demanet, MIT 18.330, Chapter 4, §4.1, pp. 1–2, 2012
For a worked square root calculation, use the polynomial on . Write for the root bracket after halvings, with . The candidate evaluated during update is the old midpoint :The initial midpoint is . After four halvings the new midpoint is , and the bisection error bound is . Its actual error is approximately . The last tested candidate and the reported midpoint are different points.
The useful feature of the bisection method is that the retained width halves on every update, independently of the shape of the function graph. The bisection error bound therefore supplies an accuracy guarantee before the zero of a function is known. No derivative is needed, and a valid initial root bracket gives convergence without a close initial guess. This makes the bisection method a dependable fallback for the faster Newton root-finding iteration.
Bisection stopping criterion 2026-10-14
For a requested absolute tolerance , stop when the retained root bracket has width at most , and report its midpoint. The bisection error bound then guarantees in exact arithmetic. Using the ceiling function and the base-two logarithm, the required number of halvings isThe zero allows stopping before any update when the initial root bracket is already sufficiently narrow. For the polynomial on with , . After nine halvings,Thus the reported midpoint meets the tolerance; its actual error from the square root is approximately . After eight halvings the bound is , so eight do not give this worst-case guarantee.
Cache the endpoint values. Each update of the bisection method needs just one new function evaluation, at the old midpoint. With no early zero of a function, updates therefore cost function evaluations, including the two initial endpoints. Returning the new midpoint requires no additional function evaluation; requesting its value would add one. The nine-update example needs eleven evaluations for the guarantee.
A small function value alone does not guarantee a small position error: rescaling changes those values without changing its zeros of a function. In a practical implementation, use an explicit width test and an iteration limit. With floating-point arithmetic, also stop if the computed midpoint equals either endpoint: the root bracket can no longer shrink, so repeating the update would loop forever. Report this precision limit separately if the requested tolerance remains unmet. Reliable sign evaluations are needed to preserve the root bracket; compare signs directly rather than multiplying endpoint values, which can suffer overflow or underflow in floating-point arithmetic.
For a rounded midpoint still inside a valid root bracket, the geometric error bound is ; it need not equal because of roundoff error. A rigorous computed enclosure also needs conservative arithmetic for that bound and reliable endpoint signs. The exact-arithmetic bisection error bound should not be claimed unchanged after precision prevents further halving.
For practical tolerance conventions, SciPy's
bisect combines absolute and relative tolerances through , and provides a maximum iteration count and convergence status. These differ from the purely absolute width test above.[ref]https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.bisect.html. SciPy, scipy.optimize.bisect documentation
The sequence is bounded and by the mean value theorem. Nevertheless, along the integer parts of its terms tend to one, and along the integer parts of they tend to minus one. The square root rounding error is . Thus a bounded sequence with vanishing successive increments need not be a convergent sequence.
Cholesky decomposition Created 2026-09-28 Updated 2026-10-25
Every real symmetric matrix that is a positive-definite matrix has a unique Cholesky decomposition , where is a lower triangular matrix with positive diagonal entries.[ref]
DPOTRF (LAPACK 3.12.1) by LAPACK project. DPOTRF, LAPACK 3.12.1: Purpose, lower-triangular factorization; UPLO and INFO argument documentation
For a complex Hermitian positive-definite matrix, the corresponding factorization is , with the conjugate transpose and the diagonal of positive and real.[ref]ZPOTRF (LAPACK 3.12.1) by LAPACK project. ZPOTRF, LAPACK 3.12.1: Purpose, Hermitian factorization with conjugate transpose
The factorization turns a linear system into two triangular systems.For example, matching entries in givesChoose the positive square roots in order: , and . ThereforeThe second radicand, , is the scalar Schur complement remaining after eliminating the first variable. A positive diagonal of alone would not guarantee that this quantity is positive; Sylvester's criterion explains the relevant leading principal minors.
For that right-hand side, first use forward substitution to solve : and , so . Then use backward substitution in a triangular system to solve : and , giving . No matrix inverse is required. For several right-hand sides with the same , keep the same factor and repeat only these triangular solves.
Completeness of the real numbers Created 2026-09-24 Updated 2026-10-14
Every Cauchy sequence of real numbers converges to a real number. Explicitly, the conditionimplies the existence of with . The hypothesis compares approximations with one another, without requiring a candidate answer. This makes completeness of the real numbers an existence principle: sufficiently consistent approximations cannot approach a missing destination. [ref]
https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/mit18_100af20_lec102.pdf. MIT 18.100A, Lecture 10, theorem 7
.The equivalent least-upper-bound property says that every nonempty set bounded above has a supremum . Precisely, every satisfies , and for every some satisfies . The second condition excludes any smaller upper bound. No largest element of is required.
The rational numbers lack this property. The set contains one and has upper bound two, but has no supremum in . A proposed rational supremum would have to satisfy : if , a sufficiently small rational increase still lies in ; if , a sufficiently small rational decrease remains an upper bound. The irrationality of the square root of two excludes equality. In , its supremum is . [ref]
https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/mit18_100af20_lec32.pdf. MIT 18.100A, Lecture 3, theorems 14–15
.Construct this square root by the bisection method, starting with rational bounds . At each step square the midpoint and retain the half whose endpoints bracket two after squaring. The first four resulting intervals are , , , and . After steps, and . Both endpoint sequences are Cauchy sequences because every later endpoint remains in the current interval. Completeness of the real numbers gives a common limit of a sequence ; continuity of squaring gives . The midpoint approximates with error at most . Thus exact rational arithmetic produces certified accuracy while completeness of the real numbers supplies the exact answer.
Richard Dedekind approached completeness of the real numbers by filling gaps in the rational numbers with Dedekind cuts. In the preface to his 1872 Continuity and Irrational Numbers, he traced the problem to teaching differential calculus in 1858 and wanting arithmetic foundations for limits. His construction makes a missing boundary, such as , into a number defined by the separation it produces among rational numbers. [ref]
https://www.gutenberg.org/files/21016/21016-pdf.pdf. Dedekind, Continuity and Irrational Numbers, preface and §§III–IV; Beman's 1901 translation
. Composite number Created 2026-09-24 Updated 2026-10-20
A composite number is an integer greater than one that is not a prime number. Equivalently, it has a factorization with integers . Thus , , and are composite numbers; one is neither a composite number nor a prime number.
Every composite number has a prime factor at most its square root. In , seven is the smaller factor and lies below ; in , equality occurs. This square-root bound makes trial division finite and lets the sieve of Eratosthenes stop marking with prime numbers beyond when listing prime numbers up to .
Computing Legendre symbols by quadratic reciprocity Created 2026-10-14 Updated 2026-10-31
The practical reward of quadratic reciprocity is a smaller modulus: swap a pair of distinct odd primes, record the required sign, then reduce the numerator by modular arithmetic. Use multiplicativity of the Legendre symbol and the second supplementary law for quadratic reciprocity to handle a factor of two. For example,Here are both modulo , so the first swap changes sign; gives ; the swap involving five has no sign change. An independent square check is . The method determines existence of a square root without itself finding that root.
A composite numerator is allowed in a Legendre symbol; a composite denominator instead calls for a Jacobi symbol. Its Jacobi reciprocity law supports repeated swaps and remainder reductions, in the spirit of the Euclidean algorithm.[ref]
Quadratic Reciprocity by Ben Lynn. Ben Lynn, Quadratic Reciprocity, “The Jacobi Symbol”: product definition and reciprocity for computing symbols without factoring
A final Jacobi symbol of one is not a square-existence certificate for a composite number modulus. For example,yet is impossible: reducing it modulo three would require a square congruent to two, and squares modulo three are only zero or one. The product has hidden two local failures. By contrast, for a prime denominator, a Legendre symbol of one does certify a quadratic residue.
Critical angle for total internal reflection Created 2026-09-29 Updated 2026-10-25
For refractive indices , the critical angle for total internal reflection satisfies . Above it, the transmitted normal wavenumber is imaginary and the transmitted field is an evanescent wave.
The critical angle for total internal reflection is the boundary between outgoing refraction and an evanescent wave, rather than an angle at which the external electric field abruptly disappears. Write and . At the threshold, Snell law for electromagnetic waves has , henceHere inverse sine selects . For and , and . The threshold is independent of polarization of an electromagnetic wave under the stated assumptions.
A short proof using phase matching at a planar wave interface reveals all three cases at once. Choose a Cartesian coordinate system with boundary , incident medium , and transmitted medium . With vacuum wavenumber , the shared tangential wavevector component is . The dispersion relation in medium two givesBelow , choose the positive real square root for an outgoing plane electromagnetic wave. At , : there is a grazing wave, with zero normal average power but no exponential confinement in . Above , choose with , so the wave amplitude decays into the second half-space.
If , no nongrazing angle of incidence produces this threshold. As from below, ; as that ratio tends to zero, . These limits explain why a larger refractive index contrast permits confinement over a wider range of internal angles.
Delayed solutions of a square-root differential equation Created 2026-10-14 Updated 2026-10-20
This initial value problem uses a square root and absolute value to define a continuous function on all of . For every finite waiting time , a forward solution of a differential equation on isThe constant solution of a differential equation is another choice. For example, at , waits give values . These are dimensionless mathematical trajectories; no measured physical waiting time is being supplied.
Verification uses the original ordinary differential equation, including the join. Before departure, both and vanish. For , their common value is . For , the difference quotient at the join isThus the derivative exists at , equals the rate law there, and is continuous across the join. For the same computation gives the right derivative at the starting endpoint. For , the left and right second derivatives at departure are and : these forward solutions of a differential equation are continuously differentiable functions, without being twice differentiable at departure. The local two-sided statement of the Peano existence theorem is separate from this explicitly forward family.
The rate law tends to zero as , but its secant slopes from zero are unbounded:No finite local Lipschitz constant exists at zero. At the quotient is , even though the rates are shrinking to zero. Continuity controls the rate itself; Lipschitz continuity would control its change relative to the state displacement.
There is also a numerical lesson. The forward Euler method starting exactly at zero gives at every step. It reproduces the constant solution of a differential equation for every positive step size, while the moving trajectories remain equally valid. A computation producing one trajectory cannot establish uniqueness. Likewise, the separable differential equation calculation that divides by only describes the moving pieces: checking the original equation recovers the zero pieces and their joins.
Derivative of a local inverse map 2026-10-14
For the continuously differentiable inverse function supplied by the inverse function theorem, the chain rule applied to givesHere is the identity matrix. The matrix inverse is taken at the recovered input , not at the output . In one dimension this is the inverse function rule .
The formula also describes sensitivity. For a small output perturbation , differentiability gives . A large operator norm of permits large amplification in some directions. In the square root example, grows without bound as positive approaches zero. Existence of a local inverse function therefore does not imply that recovery is insensitive to measurement error.
Dirichlet hyperbola method Created 2026-09-24 Updated 2026-10-14
The Dirichlet hyperbola method turns a long summation over a Dirichlet convolution into two short ones by covering the lattice points below a hyperbola with two overlapping strips. Its simplest application is an exact count: for a positive integer , every positive integer divisor of corresponds to the ordered pair . Thus the divisor summatory function counts precisely the ordered pairs of positive integers with :Here is the divisor function, and the floor function gives the number of allowed values of for each . The axes are excluded, while points on are included.
Set , using the floor function and the positive square root. Every counted pair has or . Otherwise . The first strip contains points; swapping the two coordinates gives the same count for the second. Their overlap contains all pairs with , since . The inclusion-exclusion principle therefore gives the exact identityThe subtraction is for the whole overlap square, rather than only the diagonal. The same Dirichlet hyperbola method identity holds for real , with and . [ref]
Multiplicative number theory: The pretentious approach by Andrew Granville and K. Soundararajan. Andrew Granville and K. Soundararajan, Multiplicative number theory: The pretentious approach, §1.1.4, pp. 7–8: divisor pairing and the hyperbola split
The Dirichlet hyperbola method counts 35 positive lattice points with : two strips of 22 points overlap in a square of nine points
. Details. Discharge measurement in a draining tank 2026-10-18
James F. Price's Draining a Tank, an appendix to Dimensional Analysis of Models and Data Sets, describes an actual tabletop experiment in sections 2.1–2.3. Tap water filled a semitransparent polypropylene beaker with a marked volume scale and drilled side openings. Some trials added horizontal outlet tubes. Temperature was measured, and dye checked that the water had settled before uncovering the outlet. The readout was elapsed time at successive volume marks. Opening diameter and tube length varied between trials. Reported repeatability was checked; tube bores were measured with feeler gauges rather than accepted from nominal sizes.[ref]
For tank area and volume at outlet level, the observations give and interval volumetric flow rate . Price compared across heads to infer a discharge coefficient where that ratio was nearly constant. At small head, drainage could stop with a protruding water cap; surface tension mattered. Outlet tubes introduced viscosity effects. This experiment tests a useful operating range, rather than proving ideal drainage down to zero head.[ref]
A useful independent test of the constant-coefficient model avoids numerical derivatives of noisy head readings. Its exact square root relation predictsFit a straight line to against time over a chosen positive-head interval; the negative slope determines . Repeat from the same initial head and compare slopes, then vary the head interval to test constancy of . This is a proposed diagnostic derived from the draining tank with constant cross-sectional area, not an additional procedure or measured fit attributed to Price. Startup transients, uncertain outlet level, a changing jet shape and terminal low-head data can spoil the straight line. Independent collection of discharged volume provides a check on the tank-scale readout.
Divisor Created 2026-10-03 Updated 2026-10-14
A divisor of an integer is an integer satisfying the divisibility relation . Equivalently, for some integer . The word positive matters when listing or counting divisors: unless signs are restricted, both and qualify.
The positive divisors of areTheir negatives are also divisors of , giving twelve integer divisors altogether. The same list of positive divisors works for . One has only the positive divisor , while zero has every integer as a divisor, including zero under our divisibility convention. A nonzero integer never has zero as a divisor.
For a positive integer , the positive divisors come in pairs whose product is . For , the pairs are , and . Each pair contains a divisor at most , so searching through candidate divisors up to the square root suffices to find all pairs. A pair repeats its own member only when is a perfect square; for , the middle pair is . Consequently a positive integer has an odd number of positive divisors exactly when it is a perfect square.
The prime factorization gives another complete description. Since , its positive divisors are precisely with and . These independent choices give positive divisors, the value of the divisor function . A prime factor is one particular kind of divisor; , and show that divisors need not be prime numbers.
Thinking in pairs connects exact grouping with integer factorization: twelve objects can form three groups of four or four groups of three. Thinking in shared divisors gives the greatest common divisor; for and , the positive common divisors are , and the largest is .
Ellipse Created 2026-09-24 Updated 2026-10-18
An ellipse is the locus of points whose Euclidean distances from two fixed foci of a conic have constant sum . If the distance between the foci of a conic is , the semi-major and semi-minor axes are and . Writing gives the conventional relation .[ref]
10.1 The Ellipse. Precalculus 2e, §10.1, ellipse definition and Deriving the Equation of an Ellipse Centered at the Origin, Figure 5
For an original calculation, choose , , and hence . The ellipsehas foci of a conic and . The point lies on it since . Its focal distances areIts eccentricity of a conic is . The matching directrix of a conic for is , and the perpendicular distance from to that straight line is . Therefore the ratio of focal distance to directrix distance is , agreeing with .
The constant sum can be turned into a construction. Fix a pin at each focus of a conic and pull a closed string loop taut with a pencil. In this example the segment between the pins has length , so a loop of length leaves for the two pencil-to-pin segments. Moving the pencil while keeping that loop taut traces the ellipse. This is a geometric prediction from the length constraint, not an assertion about a measured drawing.
The parametrization , maps the unit circle onto this ellipse. It makes plotting easy, but is an affine map rather than an isometry: horizontal and vertical lengths have different scale factors. An ellipse is not a circle under the original Euclidean metric merely because this map exists. Its two semiaxes and eccentricity of a conic retain the metric information lost by that equivalence.
A useful proof outline begins with . Isolate one square root, square, and then repeat; the resulting quadratic equation is . Since , the quantities isolated before squaring have the required signs, so the reverse implication introduces no extra branch. The condition is essential: at equality the focal-distance locus becomes the line segment between the foci of a conic.








