Solving an exponential

I was practicing some exponential equations. I made up the following equation and cannot seem to solve it: $3^{2x}+5x=12$. I noticed most equations do not have the $x$ in the 5. I keep getting $x=\sqrt{\ln 12\over 2\ln 15}$. How is this type of equation solved. Thanks!

• Such equations are generally not solvable in elementary terms. One may write the answer using the Lambert W function, but that should signify only that this made-up example isn't something you can solve by hand. – Semiclassical Aug 5 '14 at 4:09
• Just to bounce off of @Semiclassical's comment, equations that are hard or impossible to solve in analytical terms can be solved numerically. Make guesses, test the answers until you get closer and closer to the answer. In this case you know that $x$ is positive, because when $x$ is negative, $3^{2x}+5x$ must be less than 1. Also, $3^{2x}$ is a very fast growing function, so we can surmise that adding $5x$ does not change the value much - the function reaches 12 very quickly. $\sqrt{\ln 12 \over 2\ln 15}\approx 0.6773$ which is not right but close. – Anthony Aug 5 '14 at 4:11
• If one has calculus available as a tool, one can also note that the slope of your LHS is positive, i.e. always increasing. So you can have at most one solution. – Semiclassical Aug 5 '14 at 4:13
• Try to plot the graphs $y=9^x$ and $y=12-5x.$ Fid the intersection points of them. – Bumblebee Aug 5 '14 at 4:52
• Also, Newton's method would be a good tool for this problem. In this case we might want to adjust the problem such that $9^x+5x-12=0$. – Anthony Aug 5 '14 at 4:59

Equations such as $$3^{2x}+5x=12$$ are in general not solvable in terms of elementary functions. However, any equation which can be written in the form $$A+Bx+C\log(D+Ex)=0$$ has solution in terms of the Lambert $W$ function. This is the case of your equation for which the solution is given by $$x=\frac{12}{5}-\frac{W\left(\frac{162}{5} 3^{4/5} \log (3)\right)}{\log (9)} \simeq 0.913046$$
Othermise, only numerical methods, such as Newton, could be used. Let us write $$f(x)= 3^{2x}+5x-12$$ By inspection, tou can notice that $f(0)=-11$ and $f(1)=2$. So, let us select an initial guess $x_0=1$ and apply Newton which will update according to $$x_{n+1}=x_n- \frac{f(x_n)}{f'(x_n)}$$ Using $$f'(x)=2\ 3^{2 x} \log (3)+5$$ the successive iterates will then be : $0.919274$, $0.913079$,$0.913046$ which is the solution for six significant figures.