Ma · Mathematics

How to Solve an Equation with Exponential and Polynomial Terms

Published By the 9to5Science editorial team

At a glance

  1. 1. Isolate the equation

    Write it as F(x) = 0, with all terms on one side.

  2. 2. Check for exact methods

    Look for a substitution or a form that can be rearranged using the Lambert W function.

  3. 3. Locate the roots

    Use signs, derivatives, or a graph to find intervals containing solutions.

  4. 4. Compute and verify

    Apply a numerical method within each interval, then substitute the approximations back.

An equation that contains both a polynomial and an exponential term, such as ex=x+2e^x=x+2 or x2+3x=e2xx^2+3x=e^{2x}, usually cannot be solved by ordinary algebraic operations. The right method depends on the particular equation: some can be rewritten using the Lambert WW function, while others require numerical approximation.

A reliable approach is to move everything to one side, study the resulting function to determine how many real roots are possible, and then approximate each root. This article works through that process for ex=x+2e^x=x+2.

Why there is no universal algebraic method

A nonzero polynomial equation has finitely many roots, and formulas exist for degrees one through four. Exponential terms change the situation: an equation such as

P(x)=eax+bP(x)=e^{ax+b}

may have no real roots, one root, or several. Its roots generally do not have expressions in terms of ordinary arithmetic and radicals. Even when an exact expression exists, it may require a special function.

The Lambert WW function is defined by W(z)eW(z)=zW(z)e^{W(z)}=z. If you can transform an equation into this form, it can give an exact representation. If not, numerical root-finding is the usual route.

A practical method

For a given equation, define a function FF by putting all terms on one side. For example, ex=x+2e^x=x+2 becomes F(x)=ex−x−2F(x)=e^x-x-2. Then proceed as follows:

  1. Check for an exact rearrangement. Try simple substitutions or factorization. If the transformed equation has the form ueu=cu e^u=c, use u=W(c)u=W(c), checking which branches of WW are real.
  2. Locate possible roots. Evaluate FF at useful points and look for sign changes. A sign change from positive to negative or vice versa guarantees at least one root in that interval, by continuity.
  3. Check whether roots may be missing. Study F′(x)F'(x) and, if needed, higher derivatives. Monotonic intervals help establish whether each interval contains one root or more.
  4. Approximate each root. Bisection is dependable once you have an interval whose endpoints give opposite signs. Newton’s method can converge faster, but it may fail if the starting guess is poor or the derivative is near zero.
  5. Verify the result. Substitute the approximation into the original equation and check the residual, the difference between its two sides.

Worked example: solve ex=x+2e^x=x+2

Set

F(x)=ex−x−2.F(x)=e^x-x-2.

At the endpoints of two intervals,

F(−2)=e−2>0, F(−1)=e−1−1<0,F(-2)=e^{-2}>0,\ F(-1)=e^{-1}-1<0,

and

F(1)=e−3<0, F(2)=e2−4>0.F(1)=e-3<0,\ F(2)=e^2-4>0.

So there is at least one root in (−2,−1)(-2,-1) and at least one in (1,2)(1,2).

To see that these are the only real roots, differentiate:

F′(x)=ex−1.F'(x)=e^x-1.

This derivative is negative for x<0x<0 and positive for x>0x>0. Thus FF decreases up to x=0x=0 and increases after x=0x=0. Since F(0)=−1F(0)=-1 and F(x)F(x) tends to positive infinity at both ends of the real line, there is exactly one root on each side of zero: two real roots in total.

Bisection, or Newton’s method started within each bracket, gives

x≈−1.8414andx≈1.1462.x\approx -1.8414 \qquad\text{and}\qquad x\approx 1.1462.

An exact representation is also possible. Let y=x+2y=x+2. Then ey−2=ye^{y-2}=y, so (−y)e−y=−e−2(-y)e^{-y}=-e^{-2}. Therefore

x=−Wk(−e−2)−2,x=-W_k(-e^{-2})-2,

where the two real branches k=0k=0 and k=−1k=-1 give the two roots. The numerical values above are usually more useful in applications.

Choosing a numerical method

Bisection is a good default when you can find an interval [a,b][a,b] with F(a)F(b)<0F(a)F(b)<0. Each iteration halves the interval, so after nn steps its width is (b−a)/2n(b-a)/2^n. It is slower than Newton’s method but does not depend on a delicate initial guess.

Newton’s method updates an estimate using

xn+1=xn−F(xn)F′(xn).x_{n+1}=x_n-\frac{F(x_n)}{F'(x_n)}.

For this example, the update is xn+1=xn−(exn−xn−2)/(exn−1)x_{n+1}=x_n-(e^{x_n}-x_n-2)/(e^{x_n}-1). Newton’s method is often fast near a simple root, but it can jump away from the root. A practical safeguard is to maintain a sign-changing interval and use bisection whenever a Newton step leaves it.

Common mistakes

  • Assuming every equation has one root. Exponential-polynomial equations can have multiple real roots. Check intervals and turning points before stopping.
  • Treating a numerical answer as an exact one. A decimal approximation is not a proof that all roots have been found; use calculus or another root-counting argument.
  • Using Newton’s method without checking its derivative. If F′(x)F'(x) is zero or very small, the update may be undefined or unstable.
  • Taking logarithms without checking the sign and domain. Logarithms apply only to positive quantities, and rearranging before taking them can change which solutions are valid.

For a particular equation, the best next step is to define F(x)F(x) explicitly and inspect its derivatives. That reveals whether an exact special-function solution is available and how many real roots a numerical method must find.

References

  1. Numerical Analysis, Richard L. Burden, J. Douglas Faires, and Annette M. Burden

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.