# Solving $2^x + 3^x = 12$

I need to solve $$2^x + 3^x = 12$$ for real $$x$$. I tried the following: $$2^x + 3^x = 3\times 2^2 \\ 1+(3/2)^x= 3\times 2^{2-x}$$ But from here on I don't know how to apply logarithms.

• I don't believe this has a convenient closed form. You'll want a numerical method...Newton, for instance. – lulu Oct 7 at 16:24
• Oh, this I didn't know. What I know is that $f(x) = 3^x + 2^x$ is continuous and has image $(0,+\infty )$ so it must attain $f(x) = 12$ for some $x$. How do I know when I can have a closed form in terms of elementary functions? – AnalyticHarmony Oct 7 at 16:31
• $3.2^2 = 12$???? – fleablood Oct 7 at 16:42
• There's no easy way to know if there is a convenient closed form or not. I don't see any way to attack the problem algebraically...and I've done enough of these sort of things to be pretty sure there isn't one. In this case, there are independence theorems for things like the functions $2^x, 3^x$ which I expect can be used to show that $x$ is transcendental. Though, of course, in principle it could still be the value of a familiar transcendental function at an simple algebraic number. – lulu Oct 7 at 16:55
• Setting $y=e^x$ “reduces” this to the form $y^{log 2} + y^{log 3} = 12$, but this is arguably even less amenable to a closed form solution. – Danny Stoll Oct 7 at 17:21

As stated in the comments, this equation cannot be solved by algebraic means, but we can use the Newton-Raphson method to get arbitrarily close to the root.

The Newton-Raphson iteration, used to solve equations of the form $$f(x)=0$$, is as follows: $$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$

To find the root of your equation, re-arrange it so that the $$RHS$$ is 0, and then define $$f(x)=LHS$$.

$$\therefore f(x)= 2^x + 3^x -12$$

$$\implies f'(x)= ln(2)·2^x + ln(3)·3^x$$

A good guess for our first value of $$x$$ is $$2$$, as when $$x=2, f(x)=1$$. I'll aim to get the root to $$18$$ decimal places.

$$\therefore$$ Let $$x_1=2$$.

$$\therefore$$ Via Newton-Raphson: $$x_2 = 2-\frac{2^2 + 3^2 -12}{ln(2)·2^2 + ln(3)·3^2}=1.921011678131129049981...$$, which is the value of $$x_2$$.

Since I decided to aim for $$18$$ decimal places, I must apply the algorithm repeatedly until I get the same result to $$18$$ decimal places in two successive iterations. My values for $$x_3$$, $$x_4$$, $$x_5$$ and $$x_6$$ are:

$$x_3=1.917691510628841444604$$

$$x_4=1.917685944904149110065$$

$$x_5=1.917685944888544576369$$

$$x_6=1.917685944888544576368$$

Hence the root of the equation $$2^x + 3^x = 12$$ is:

$$x=1.917685944888544576$$

Value of $$x=1.917685944888545$$ (15 digits round off)

• Why did I get downvote? – Avinash N Oct 7 at 17:08
• I don't see how this counts as solving the problem. – Ennar Oct 7 at 17:12
• @Ennar Yes. Thank you. But I tried. Finally I used the graphing calculator. – Avinash N Oct 7 at 17:16