# How do you solve x+2=e^(x) ?

Oct 11, 2016

Use Newton's Method

$x = 1.146193$ and $x = - 1.84141$

#### Explanation:

You cannot solve the equation using algebraic methods. For this type of equation, I use a numerical analysis technique called Newton's Method.

Here is a reference to Newton's method

Let $f \left(x\right) = {e}^{x} - x - 2 = 0$

$f ' \left(x\right) = {e}^{x} - 1$

You start with a guess for ${x}_{0}$ and then do the following computation to move closer to the solution:

${x}_{n + 1} = {x}_{n} - f \frac{{x}_{n}}{f ' \left({x}_{n}\right)}$

You do computation, feeding each step back into the equation, until the number that you get doesn't change from the previous number.

Because Newton's Method is computationally intensive, I use an Excel Spreadsheet.

Into cell A1 enter your guess for ${x}_{0}$. I entered 1 into cell A1.

Into cell A2 enter the following expression:

=A1 - (EXP(A1) - A1 - 2)/(EXP(A1) - 1)

Copy the contents of cell A2 into the clipboard and then paste it into cell A3 through A10.

You will see that the number quickly converges on $x = 1.146193$

Edit: After reading a very nice comment from Shell. I decided to find the second root by changing the value of cell A1 from 1 to -1. The spreadsheet quickly converges on the value $x = - 1.84141$

Oct 11, 2016

This question cannot be solved algebraically. Graphing gives $x = - 1.841$ and $x = 1.146$.

#### Explanation:

The left side of the equation $x + 2$ is algebraic.

The right side of the equation ${e}^{x}$ is transcendental (it can't be expressed as a polynomial e.g. exponentials, logs, trig functions).

This equation cannot be solved algebraically but it can be solved graphically.

To solve, plot both $\textcolor{red}{y = x + 2}$ and $\textcolor{b l u e}{y = {e}^{x}}$ in a graphing utility or graphing calculator. The solutions are the $x$ coordinates of the intersections.