The four cases
Each case is just the master equation rearranged. The last one needs both y/a and x to be positive (real logs).
Why it matters
Power laws describe an enormous range of phenomena: kinetic energy ∝ v², drag at high speeds ∝ v², gravitational potential ∝ 1/r, animal metabolic rate ∝ mass^0.75. Once you fit a curve to a power law, the universal solver lets you cross-compute any of the variables without re-deriving the formula.
Worked example
A spring with stiffness k stores energy E = ½k·x², so this is a power law with a = ½k and n = 2. If E = 0.4 J at compression x = 0.1 m, find k:
- a = E / xⁿ = 0.4 / 0.1² = 0.4 / 0.01 = 40, so k = 80 N/m.
FAQ
What if x is negative when solving for n?
log(x) is undefined for x ≤ 0 in the reals. If your data has negative x, separate the sign first (write x = −|x| and solve over |x|) or use a complex-log treatment.
Does this handle y = 0 cases?
Only when xⁿ = 0 (i.e., x = 0 with n > 0). The "solve for n" branch can't recover an exponent if y/a = 0 — log(0) diverges.