MathsAdvanced Equations

Exponential & Logarithmic Equation
solver.

Find x when it sits in an exponent or inside a log, with the steps and a graph.

How it's worked out

The key move is to take a logarithm of both sides. A log turns a power into a product, so the x in the exponent comes down to the main line, where ordinary algebra can reach it.

ln⁡(bx)\displaystyle \ln\left(b^{x}\right)=xln⁡b\displaystyle {}= x \ln b

For a times b to the x equals c, divide by a first, then take logs. Here a is the starting amount, b is the growth factor per step, and c is the target. The base b must be above 0 and not 1.

x\displaystyle x=ln⁡(c/a)ln⁡b\displaystyle {}= \frac{\ln (c / a)}{\ln b}

Same base on both sides. If both sides can be written as powers of one base, the one-to-one property says the exponents must match. That turns 4 to the x equals 8 to the x − 1 into a plain linear equation.

Quadratic in disguise. An equation such as e to the 2x minus e to the x minus 6 equals 0 is a quadratic in u, where u is e to the x. Solve for u, then keep only the values above 0, because a power of a positive base is never 0 or negative.

Logs on the x side. Rewrite log base n of (ax + b) = c as ax + b = n to the c, then solve for x. Check that what is inside the log comes out above 0.

Anything else. In 2 to the x equals x + 2, x is both in an exponent and outside it, and log rules cannot pull it out. The search form scans the range you give for places where the two sides cross and pins each one down. Here it finds −1.6901 and 2.

Worked examples

Dana works out when her savings double

Dana has 1,000 dollars in an account that grows continuously at 5% a year, and she wants to know when it reaches 2,000. Continuous growth means the balance is 1,000 times e to the 0.05t after t years.

1000e0.05x\displaystyle 1000 \, e^{0.05 x}=2000\displaystyle {}= 2000

Divide both sides by 1,000, then take the natural log of both sides. So x = ln 2 over 0.05, which is about 13.8629 years. The starting amount drops out, so 10 dollars or 10,000 dollars take just as long to double.

If the 5% were added once a year instead, the equation becomes 1.05 to the x = 2, and the answer is about 14.2067 years. Compounding once a year is a little slower.

Open this example in the tool

A pharmacist counts half-lives

A 100 mg dose halves in the body once per half-life. The question is how many half-lives pass before 12.5 mg is left. Each half-life multiplies the amount by 0.5.

100⋅0.5x\displaystyle 100 \cdot 0.5^{x}=12.5\displaystyle {}= 12.5

Divide by 100 and take logs. The solver gives x = 3, a whole number, because 12.5 is 100 halved three times. To get down to 10 mg takes about 3.3219 half-lives, which is not a whole number, so the log step is needed.

Open this example in the tool

Sam solves a two-base problem from a worksheet

Sam's worksheet asks for x in 4 to the x = 8 to the x − 1. Both bases are powers of 2: 4 is 2 squared and 8 is 2 cubed.

22x\displaystyle 2^{2x}=23x−3\displaystyle {}= 2^{3x - 3}

Matching exponents gives 2x = 3x − 3, so x = 3. The solver gets the same answer by taking natural logs, which also works when no common base exists. The check puts x back in: both sides come to 64.

Open this example in the tool

Reading your result

A single crossing. Most forms have one answer, because a·bˣ only rises or only falls. In 2 · 3ˣ = 18 the root is x = 2, and the graph shows the curve passing the flat line once.

No real solution. A power of a positive base is always above 0, so 2ˣ = −5 has no answer among real numbers. The solver says so: 2ˣ is always positive, so it cannot equal −5.

Two crossings. A quadratic in aˣ can give two positive values of u, and so two answers. The search form can find two or more as well, as long as they sit inside your range.

Years to double, solved by the engine
RateContinuousOnce a year
2%34.6635
4%17.3317.67
7%9.910.24
10%6.937.27

Common mistakes

  • Keeping the negative u. In e to the 2x − e to the x − 6 = 0, the quadratic gives u = −2 or u = 3. Only the positive one works, so x = 1.0986. Writing ln(−2) as a second answer is the most common slip with this form.
  • Taking logs before dividing. In 2 · 3ˣ = 18, the log of the left side is ln 2 + x ln 3, not x ln 6. Divide by 2 first and the step is clean.
  • Skipping the domain check. With ln(2x + 1) = 3, the answer x = 9.5428 makes 2x + 1 positive, so it stands. When an answer makes the inside of a log 0 or negative, throw it out.
  • Searching too small a range. The search form finds only the crossings between your start and end. If the curves look like they meet off the edge of the graph, widen the range.

Questions people ask

A positive base raised to any real power gives a positive number, so 2 to the x can never be 0 or negative. The graph of 2 to the x stays above the x-axis for every x. Over the complex numbers there are answers, but not among real numbers.

Sources