The acid dissociation constant quantifies the chemical equilibrium for loss of one proton from a chemical acid. In water, write the actual proton transfer as . Its full dimensionless equilibrium constant is
The usual aqueous acid dissociation constant uses the solvent convention with water thermodynamic activity approximated by one:
Here hydrated hydrogen ions are understood; is shorthand, not an isolated bare proton in the chemical solution. All thermodynamic activities and are dimensionless quantities, using consistent standard states. If water thermodynamic activity differs appreciably from one, retain it in the full equilibrium constant instead of silently mixing conventions.
With activity coefficients and reference concentration , put for each solute. Then
The last expression is the dilute ideal concentration approximation, not the definition in a nonideal chemical solution. Omitting instead produces a quotient with units of concentration; its numerical value depends on the chosen units. Do not take a logarithm of that dimensional quotient. Conditional concentration quotients can change with ionic strength even at fixed temperature, whereas the thermodynamic acid dissociation constant retains the activity coefficient corrections. The acid dissociation constant entry distinguishes these conventions.
At the same temperature, solvent and standard states, a larger acid dissociation constant, equivalently a smaller pKa, indicates a stronger tendency to donate a proton. It does not specify an analytical concentration, a pH, or a reaction rate. Composition and the weak acid mass and charge balances are needed to predict pH; chemical kinetics addresses how quickly the chemical equilibrium is approached.
Adiabatic expansion Created 2026-10-05 Updated 2026-10-14
Adiabatic expansion increases the accessible volume without heat transfer. In a loaded piston expansion of the fixed-composition ideal gas considered in adiabatic process, positive outward work comes from internal energy, so the final temperature decreases. This provides a cooling mechanism without removing heat during the stroke. In the Carnot cycle, reversible adiabatic expansion connects two different temperatures between its isothermal processes.[ref]
For the same constant- reversible ideal-gas adiabat, put . The scaling and first law of thermodynamics give
With the figure's stipulated , and , the final ratios are and . Outward work is and . Reversing this particular path from its cooled endpoint would require the same work input; the figure's separate compression starts at the original state, so its input is different. Endpoint entropy supplies another independent check:
The two logarithm terms cancel using , confirming the reversible path is an isentropic process. [ref]
PASCO's expansion demonstration first compresses trapped air and waits for thermal equilibrium before the rapid expansion. Its manual warns that friction-warmed cylinder regions contact the gas during expansion, compromising quantitative comparison. [ref] The hold separates cooling caused by expansion from simply undoing the earlier hot compression. As proposed controls, observe the temperature dip and subsequent warming, compare rapid and slow strokes from matched initial states, and assess wall heat transfer and probe lag before fitting a reversible model.
Cooling is not a universal consequence of adiabatic expansion: free expansion of an ideal gas has no outward work and returns to the same equilibrium temperature. Its entropy increases, so the reversible power laws do not describe it. Reuse free expansion, Joule's free-expansion experiment and temperature sensitivity of a free-expansion experiment for that apparatus, its energy budget and the real-gas qualifications. The useful distinction is the load: expansion cools this ideal gas when it must spend internal energy doing work.
Let be an open subset of the real line, and let be antiderivatives of the same function on . Each connected component is an open interval. On that component, , so the mean value theorem gives . The constants on different components are independent: there is no subinterval inside joining them. Conversely, adding any chosen constant on each component preserves the derivative everywhere on .
For example, the domain of is . Every antiderivative on this domain has the form
with arbitrary real . The logarithm of the absolute value differentiates to on each side. The function with and is therefore a valid antiderivative, although it cannot be written as with one global constant.
Figure 1.
Two disconnected intervals allow independent constants while the derivative stays the same
. Details.
An initial condition at fixes and leaves free. Fixing both constants requires one reference value in each connected component, or additional conditions that couple the components. The locally constant function captures this remaining freedom.
Apparent magnitude Created 2026-09-28 Updated 2026-10-13
Apparent magnitude is a calibrated description of the observed radiative flux received from an astronomical source. It answers how bright the source appears in a specified photometric passband, rather than how much luminosity the source emits. Define as the measurement assigned zero apparent magnitude by the chosen magnitude zero point. Then
Here is the positive passband measurement, with the same units and response convention as . For an energy-weighted detector this measures received radiative flux through its response; for a photon-counting detector use the corresponding calibrated count rate for both quantities. Actual photometric passbands include the instrument's response across wavelength, so naming the photometric system is part of reporting an apparent magnitude. [ref]. [ref].
As toy examples in one photometric passband, gives , gives , and gives . A negative apparent magnitude therefore means more received radiative flux than the reference; it is physically allowed. Zero apparent magnitude does not mean zero radiative flux. The ordinary logarithm formula requires .
A small apparent magnitude alone cannot distinguish a nearby faint source from a distant source with large luminosity: this is the flux-distance degeneracy. Stellar parallax supplies independent distance information, while a calibrated standard candle supplies intrinsic brightness. Interstellar extinction also changes the received radiative flux and hence the measured apparent magnitude.
Asymptotic expansion Created 2026-09-24 Updated 2026-10-14
An asymptotic expansion describes a function near a specified limit by successively smaller scales. Each fixed finite truncation has a remainder smaller than its last retained scale. The central question is how the approximation improves as the parameter approaches the limit; convergence of the entire infinite series at a fixed parameter is a separate question. For the inverse-power scale ,
means that, for every fixed nonnegative integer ,
The little o notation makes the accuracy requirement precise. With expansions to all orders, this is also equivalent to an remainder after the th term; the implied bound may depend on .[ref]
For a quick convergent example, the finite geometric series identity gives
For , both the asymptotic expansion as and the ordinary convergent geometric series describe this function. The exact remainder displays the required extra inverse power.
The more surprising example under a divergent factorial series can approximate a convergent integral has a convergent integral but a divergent series at every fixed positive :
A few terms can estimate well, even though adding sufficiently many terms eventually destroys the approximation. Optimal truncation explains where to stop.
This makes asymptotic expansions useful when an exact expression is a complicated integral or differential equation solution, but a parameter is very large or very small. The leading term reveals the scale; corrections reveal which effects matter next. The asymptotic sequence must be specified: integer powers, fractional powers, logarithms, and exponential functions can encode different kinds of behavior. A good finite approximation includes a remainder estimate or an independently checked range of use.
Benford law Created 2026-10-05 Updated 2026-10-14
For a positive random variable , let be its first nonzero base-ten digit. The Benford law is the discrete probability distribution with probability mass function
Here need not be an integer: , and all have . Multiplication by an integer power of ten changes the decimal point's position and leaves the first nonzero digit unchanged. Zero has no first nonzero digit, so exclude it. For negative inputs one may explicitly use their absolute values, still excluding zero; that convention must be stated rather than applying a logarithm to a negative number.
The Benford law favors small digits: , whereas . Thus the model assigns about to digit one and to digit nine. The masses are positive and their normalization is a finite telescoping series:
Figure 1.
Benford probabilities compared with equal leading-digit probabilities in two constructed laws
. Details.
Why can digit one be so common? In a decimal significand interval , the digit-one region occupies a larger fraction of the logarithmic scale than the digit-nine region . The precise assumption is that the fractional part of the base-ten logarithm is distributed uniformly on ; Benford law from logarithmic uniformity turns those unequal interval lengths into probabilities. This makes a surprising digit pattern into a simple geometry of multiplicative size. The logarithmic explanation is also presented in Peter Sheridan Dodds, Benford's Law, essential story.
The Benford law is useful as a proposed model for leading digits when the mechanism supports logarithmic uniformity or an appropriate limiting argument, such as Benford frequencies for powers of an integer. Merely spanning many powers of ten does not establish that assumption. A discrepancy from the Benford law can prompt investigation of the model and data collection; by itself it does not establish fraud, and agreement does not establish authenticity.
Simon Newcomb's 1881 paper, Note on the Frequency of Use of the Different Digits in Natural Numbers, appeared in the American Journal of Mathematics 4, pp. 39–40. Its opening connects unequal leading-digit frequencies with the faster wear of early pages in logarithm tables. The publication metadata and original opening excerpt are available in Newcomb (1881), original publication record and [ref]. Frank Benford's The Law of Anomalous Numbers, Proceedings of the American Philosophical Society 78 (1938), pp. 551–572, likewise discusses worn logarithm tables on p. 551 and tabulates observations on p. 553. See Benford (1938), transcription of the original paper with page numbers and publication metadata. These observations motivated study of the digit pattern; they do not make the Benford law universal.
Benford law from logarithmic uniformity Created 2026-10-07 Updated 2026-10-14
For a positive random variable , write its base-ten logarithm as an integer part plus a fractional part:
The floor function handles values below one as well: for , and the decimal significand is . Since , the first nonzero decimal digit is . The monotonicity of the logarithm gives the exact event equivalence
If has the uniform distribution on , the probability of this interval is its length. Consequently , proving the Benford law. This argument assumes uniformity of the fractional part of the logarithm, rather than uniformity of itself. See the logarithmic-coordinate explanation in Peter Sheridan Dodds, Benford's Law, essential story.
Figure 1.
Leading-digit intervals have unequal lengths in the fractional logarithm and equal lengths in the original number
. Details.
An exact constructed example is the log-uniform distribution on , with probability density function there and zero elsewhere. Its total mass is . The change of variables formula with gives for . Equivalently, integrating directly gives
For example, the probability of first digit four is . By contrast, an ordinary uniform distribution for on has probability density function there, so for every digit. This is a concrete counterexample to any claim that the Benford law holds for every positive random variable.
More generally, a log-uniform distribution on with has uniform on . If its logarithmic span is a positive integer, reduction to the fractional part wraps an interval of length around the unit interval exactly times, making uniform even when is not a power of ten. Arbitrary partial-decade truncations generally do not have this property: for a log-uniform distribution on , the first digit is always one.
Under the uniform fractional-logarithm assumption, multiplication by any constant replaces by . This is a rotation modulo one, which preserves the uniform distribution and therefore preserves the Benford law; see scale invariance of decimal significands. For the constructed example, multiplying by gives a log-uniform distribution on with the same digit probabilities. The claim concerns the decimal significand law: there is no proper probability density function proportional to over all of , since its integral diverges. The existing scale-invariant prior describes that unnormalizable measure, while a finite log-uniform distribution is normalizable.
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 gives
Multiplying the Bernoulli differential equation by yields the first-order linear differential equation
This 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 are
The 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]
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.
Take independent steps, each with probability and with probability . Reverse a step sequence by reading it backward and changing each sign; use the same biased law for both experiments. With positive steps, the forward sequence weight is and its reversed weight is . Their logarithm ratio is
Here is dimensionless entropy production, not an entropy in joules per kelvin. A Markov chain on a three-state ring gives a state-space realization: start uniformly, take a clockwise step with probability and a counterclockwise step with probability . The uniform stationary distribution makes endpoint weights cancel. A physical interpretation as exchanged heat requires local detailed balance with bath entropy per directed step; the abstract model alone specifies path probabilities.
For an allowed value , the binomial distribution gives
This is an exact same-law finite fluctuation theorem, with no long-time approximation. For , and , and . The positive mean is , although the all-negative path has nonzero probability . Directly, .
Figure 1.
Exact biased-step model: discrete entropy-production probabilities and their log ratio at nine steps
. Details.
The left panel shows exact probability masses for , with negative values highlighted; the right panel tests the logarithm ratio against . These are model values, without experimental measurements or simulated measurement noise.
Binary cross-entropy 2026-10-14
Let follow a Bernoulli distribution with true event probability , and let the model report event probability . The binary cross-entropy is its expected logarithmic loss:
For , it is minimized at , where the value is binary entropy . An individual outcome has loss when and when ; the binary cross-entropy averages those two cases using the true probabilities.
For , truthful reporting gives bits. Reporting gives one bit. Reporting gives
Both and select zero if one predicts only the more likely binary outcome. Their predicted probabilities are very different, however, and cross-entropy reveals the cost of underestimating the event that occurs a quarter of the time. Endpoint losses are computed using the realized outcome rather than multiplying zero by an undefined logarithm.
Figure 1.
The expected logarithmic loss is minimized by reporting the true event probability
. The true Bernoulli distribution has parameter . The blue curve averages the orange event loss and gray nonevent loss with weights and . Its minimum is at , while both endpoint limits diverge because both outcomes have positive probability. These are calculated expectations, rather than measurements. Details.
Binary heap 2026-10-13
A binary heap represents a priority queue as a complete binary tree obeying a heap order. We use the minimum convention: the priority of every parent in a rooted tree is no greater than the priorities of its children in a rooted tree. Equal priorities are allowed. Each stored entry may be a record carrying a priority key; the numerical example below displays only keys. Reversing the inequalities gives the maximum convention.
The complete binary tree can be stored directly in a zero-indexed array : read its levels from top to bottom, left to right. The root of a tree is at index . The possible children in a rooted tree of index are at and , and an index denotes a present entry only when it is less than . For , its parent in a rooted tree is at , using the floor function. Thus the links of the complete binary tree are determined by arithmetic rather than separately stored pointers.
Consider
The children in a rooted tree of index have keys ; those of index have keys ; those of index have keys . The six comparisons , , , , , establish the heap order. At index , the parent in a rooted tree is index , carrying key .
Figure 1. . Matching indices identify the same entries in both representations. The heap order compares each parent in a rooted tree with its children in a rooted tree; it does not make a sorted array. Details.
The array is visibly not a sorted array: precedes , and precedes . Nor is the last entry a maximum: it is , whereas the maximum is at index . The heap order compares ancestors and descendants, without imposing an order between separate branches. Nevertheless, following the graph path from the root of a tree to any entry gives a chain of nondecreasing priorities. This short argument proves that peek can return , a minimum, without inspecting the other entries.
Insertion appends an entry to the array, preserving the shape of the complete binary tree, then uses sift up to repair the heap order. Insert key into the displayed binary heap. It is appended at index , and exchanges with indices , , then :
The moving key follows ; the keys each move down one level. Only this chain needs repair.
Now apply extract-min. Save key , move the last key to the root of a tree, and shorten the array to length . Use sift down, always choosing the smaller of the present children in a rooted tree:
First exchanges with key at index , since ; then with key at index , since . At index , the possible children in a rooted tree would be indices , both outside the shortened array, so the process stops. The returned key is , and the remaining binary heap is exactly the original one.
Figure 2.
Sift up inserts 1, then sift down restores the original binary heap after removing 1
. The four panels show the start and end of each repair. Colored arrows mark the moving key's graph path. The extraction panels contain seven entries: index 3 has no children in a rooted tree. Details.
For a nonempty binary heap with entries, the deepest level is , using the floor function and logarithm. Each exchange moves one level and uses only a bounded number of comparisons. The resulting time complexity bounds, expressed in Big O notation, are:
OperationTime complexityReason
peekRead the root of a tree.
Insert for Append, then sift up through at most the levels of the complete binary tree.
extract-min for Move the last entry, then sift down through at most those levels.
Build from an arbitrary arrayApply sift down from the last index with children in a rooted tree back to index .
These bounds assume constant-cost indexed access, key comparisons and exchanges, and available array capacity for insertion. Allocating and copying a larger array is a separate cost. Empty and one-entry cases take constant work.
To build a binary heap, begin at index and work backwards. Entries without children in a rooted tree already obey the heap order. Each sift down, also called heapify down, starts with every present smaller rooted tree below it already repaired. Most entries are close to the bottom and can move very little; successively longer repair distances occur for geometrically fewer entries. Summing these distances gives work, rather than charging to every entry. MIT's notes give this bottom-up construction and contrast it with repeated insertion.[ref]
The Dijkstra algorithm additionally needs to decrease the priority of an existing vertex when its tentative distance improves. Given its current index, lowering the key followed by sift up takes time for . An indexed binary heap maintains a separate map from item identity to its current index and updates that map after every exchange. For vertices numbered in a fixed range, the map can be another array, giving constant-time index lookup. An ordinary unindexed binary heap supplies no such guarantee: locating an arbitrary item can require scanning entries. Item identity and priority must remain distinct, especially when several vertices have equal tentative distances.
The attractive compromise is local organization with global usefulness. A binary heap maintains only the heap order, yet every extract-min gives the next smallest key. Repeated extraction of the original example gives , so a priority queue also supplies a sorting algorithm without storing a sorted array between extractions.
For , the branching survival probability satisfies . If , comparison with a Poisson branching process and expansion of the logarithm give
For the upper bound use and retain its first nonnegative term. For fixed , the leading term is instead . In particular gives , showing that the uncorrected exact bound is false for small positive .
For and , the uncorrected exact upper bound does hold for the binomial branching process. Here and , so at the first two terms of the nonnegative series give . Monotonicity of that series yields . This recovers the intended large- bracket without claiming it for every finite reproduction law.
The union bound gives . Using on the distinct-label product gives
The 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 yields
On 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 .
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 is
The 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]