# how to solve this equation using logarithms

for the equation : $3^{x^2} + 3^x = 90$ my solution was : $3^{x^2} + 3 ^x = 3^{2^2} + 3^2$ so $x=2$ but i want to know if there is any solution by using logarithms ? when using wolframAlpha th solution was $x= -2.02356$ or $x = 2$ but How ?

• Are you sure the problem wasn't $(3^x)^2 + 3^x = 90$? – Ted Shifrin Dec 28 '17 at 2:20
• no it is $3^{x^2}$ – Hello World Dec 28 '17 at 2:23
• There's no way (that I can think of) to use basic algebra to solve this. It has to be done with a calculator/computer. – Ted Shifrin Dec 28 '17 at 2:25
• @TedShifrin it would be a lot easier if it was $(3^x)^2$ but it is $3^{x^2} + 3^x = 90$ – Hello World Dec 28 '17 at 2:25
• i think so . but i wanted to know if it is possible – Hello World Dec 28 '17 at 2:27

If we divide both sides by $3$ first, we get $$3^{x^2-1} + 3^{x-1} = 30$$ Then, we can write it as $$(3^{x-1})^{x+1}+3^{x-1} = 3^{x-1}(3^{x-1})^{x}+3^{x-1}= 30$$ Now, if we bracket $3^{x-1}$, we get $$3^{x-1}(3^{x^2-x}+1)=30$$

From here, if there exists an integer solution, $30$ must be factorized as $3 \cdot 10$ so that $3^{x-1}$ is an integer (Notice that in other factorizations of $30$, there is no term $3^k$ where $k \in \mathbb{Z^+}$). So we can try $3^{x-1} = 3 \implies x=2$ and we see that it is a solution of this equation since $3^{x^2-x}+1 = 10$ when $x=2$.

• Well, we know that it is a solution of the equation if we just plug the $2$ into the original equation. – Michael Rybkin Dec 28 '17 at 2:32
• We cannot always know it this easily so I wanted to share it. This is little different from directly plugging $x=2$ with intuition because I explained why $30$ should be factorized as $3 \cdot 10$ and why should $3^{x-1} = 3$. – ArsenBerk Dec 28 '17 at 2:34
• $(x^2-1)=(x-1)(x+1)=x(x-1)+x-1$...... – Aryadeva Dec 28 '17 at 2:46
• thanks a lot @AsBk3397 . but do you have any idea about the second value of x " $x= -2.02356$ " as wolframAlpha solved the equation ? – Hello World Dec 28 '17 at 2:49
• @HelloWorld Try searching the Lambert-W function. You can use it to solve problems like this, but I'm not sure if you can express it in this way. Otherwise, you can use Newton's method to approximate the other root. – Toby Mak Dec 28 '17 at 3:00

Consider the function $$f(x)=3^{x^2}+3^x-k$$ and its derivatives $$f'(x)=2\ 3^{x^2} x \log (3)+3^x \log (3)$$ $$f''(x)=4\ 3^{x^2} x^2 \log ^2(3)+2\ 3^{x^2} \log (3)+3^x \log ^2(3)$$ Since $3>e$, the second derivative is always positive.

On the other side $f(0)=2-k$; so, as soon as $k>2$, there will be two roots to equation $f(x)=0$.

If you consider large values of $k$, the dominant term is $3^{x^2}$ and then the roots of $3^{x^2}=k$ are given by $$x_{1,2}=\pm \frac{\sqrt{\log (k)}}{\sqrt{\log (3)}}$$ If $k=90$, this gives $x_{1,2}=\pm 2.02383$.

By inspection, you notice that $x=2$ is a root of the equation. But $f(-2)= -\frac{80}{9}$. Then, the second root is something like $x=-2+\epsilon$. So, consider now $$f(-2+ \epsilon)=3^{(\epsilon -2)^2}+3^{\epsilon -2}-90$$ and develop as a Taylor series built around $\epsilon=0$; this will give $$f(-2+ \epsilon)=-\frac{80}{9}-\frac{2915}{9} \epsilon \log (3)+O\left(\epsilon ^2\right)$$ Neglecting the higher order terms, this gives $$\epsilon =-\frac{16}{583 \log (3)}\approx -0.0249808$$ We could continue the expansion to $O\left(\epsilon ^3\right)$ and get $$f(-2+ \epsilon)=-\frac{80}{9}-\frac{2915}{9} \epsilon \log (3)+\epsilon ^2 \left(\frac{11665 \log ^2(3)}{18}+81 \log (3)\right)+O\left(\epsilon ^3\right)$$ SOlving the nasty quadratic will give $\epsilon \approx -0.0236155$ and you see that we become to be very close to the result Wolfram Alpha gave.

For sure, we can use Newton method for any accuracy starting with $x_0=-2$ and get the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & \color{red}{-2.0}000000000000000000 \\ 1 & \color{red}{-2.02}49808364082837021 \\ 2 & \color{red}{-2.02356}80473456910369 \\ 3 & \color{red}{-2.023563090}2293065747 \\ 4 & \color{red}{-2.0235630901685831789} \end{array} \right)$$ which is the solution for twenty significant figures.

Better then with Taylor series, we could use Padé approximants and the simplest would be $$f(-2+ \epsilon)=-\frac{\frac{80}{9}+\frac{ (11664+1792765 \log (3))}{5247}\epsilon} {1+ \frac{ (1458+11665 \log (3))}{5830}\epsilon }$$ giving, as an approximation $$\epsilon=-\frac{46640}{11664+1792765 \log (3)}\approx -0.0235411$$

• If you consider large values of $k$, the dominant term is $3^{x^2}$ and then the roots of $3^{x^2}=k$ are given by $$x_{1,2}=\pm \frac{\sqrt{\log (k)}}{\sqrt{\log (3)}}$$ If $k=90$, this gives $x_{1,2}=\pm 2.02383$. @ClaudeLeibovici please can you explain this more . and why the positive value isn't accurate as the negative value? – Hello World Dec 28 '17 at 13:40
• @HelloWorld. Compare $3^{x^2}$ to $3^x$ as soon as $|x]>1$. It is just an approximation : the function is not symmetric. – Claude Leibovici Dec 28 '17 at 13:48
• i mean that can i apply the method of getting the negative value in getting the positive one to get an approximation that approaches 2 Like $f(2+ \epsilon)$ and so on ? – Hello World Dec 28 '17 at 14:17
• And does it have comlplex roots ? – Hello World Dec 28 '17 at 14:35
• @HelloWorld. You asked why the positive value isn't accurate as the negative value?. Consider the two terms $3^{x^2}$ and $3^x$ : for $x=2$, they are in a ratio of $9:1$ but for $x=-2$ they are in a ratio of $729:1$ – Claude Leibovici Dec 29 '17 at 5:14