How to solve for $x$ in the equation $y = (x + 25)^x$ where you know the value of $y$ I am trying to figure out how to solve for $x$ in the equation $y = (x + 25)^x$ for any known $y$.
For example, I know that in the example $2758547353515625 = (x + 25)^x$, the value of $x$ is 10.
Is there a way to solve for $x$ for any known $y$?
Making the problem more general, you want to find the zero of function
$$f(x)=(x+a)^x-y$$
I shall assume $a&gt;0$ and suppose that $y$ could be a huge positive number.
$f(x)$ varies very quickly and this is not good for any root-finding algorithm.
At the opposite, consider instead
$$g(x)=x \log(x+a)-\log(y)$$ which is much more linear.
I am very lazy and I shall expand as series to have
$$g(x)=x \log (a)+O\left(x^2\right)-\log(y)$$ which gives as an estimate
$$x_0=\frac{\log (y)}{\log (a)}$$ which will allow to start Newton method.
Let us take the case of $a=25$ and $y=1234567898765432123456789$. The iterates will be
$$\left(
\begin{array}{cc}
n &amp; x_n \\
 0 &amp; 17.233582865360804139 \\
 1 &amp; 15.056838056149540045 \\
 2 &amp; 15.034341020407527174 \\
 3 &amp; 15.034338495863187264 \\
 4 &amp; 15.034338495863155457
\end{array}
\right)$$
With $y\neq0$ (trivial), using logarithms
$$\ln(y)=x\ln(x+25)\implies \frac{\ln(y)}{\ln(x+25)}=x\implies\frac{1}{\ln(x+25)/\ln(y)}=x$$
and using a property of logarithms
$$\frac{1}{\log_y(x+25)}=x\implies \frac{1}{x}=\log_y(x+25)$$
which is a transcendental equation, therefore requires numerical solutions on most cases.
If you want to invert transcendental equations involving the exponential function, sometimes it useful to consider the Lambert function