Universal problem solver

A four-way solver for the power-law relation y = a · xⁿ. Pick which variable is unknown, fill in the other three, and the calculator returns the missing value plus a curve of y against x.

Solve for

Solution
Unknown
y = 80
Equation
y = 5 · x⁴
Verification
5·2⁴ = 80 ✓
y = 5 · x⁴

The four cases

y = a · xⁿ
a = y / xⁿ
x = (y / a)^(1/n)
n = log(y / a) / log(x)

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.

Related calculators