# Solve for x if given

If given $$14^x + 23^{2x} = k$$

For all $k \in \mathbb{N}$. How to arrive at $x$?

• I doubt there is a clear algebraic way to handle this for general $k$. The function $f(x)=14^x+23^{2x}$ increases montonically so there is a unique solution for any natural number $k$ ...numerical methods will find it, but I doubt there will be a reasonable closed formula. Of course, I might have that wrong...but checking the form of the solution for modest $k$ doesn't suggest much. – lulu Jan 6 '17 at 14:33
• Alas, logs don't work well with sums. That is to say, $\log (a+b)$ isn't any sort of nice function of $\log a,\log b$. – lulu Jan 6 '17 at 14:38
• The answer to this question will be a set of values of $x$, and not just one value, right? – Shreyas S Jan 6 '17 at 14:38

I suggest using Newton-Raphson method. It's a numerical method, but very efficient.

The standard formulation is this:

To solve $f(x)=0$, start with an estimate $x_0$

Calculate $x_1=x_o-\dfrac {f(x_0)}{f'(x_0)}$

Continue to calculate $x_{n+1}=x_n-\dfrac {f(x_n)}{f'(x_n)}$

You should get a sequence of values $x_0, x_1, ... , x_n$ that converge to a root.

Note that this can not tell you how many roots there are - if you suspect that there more than one root, then you will have to take a number of different starting points.

In your case the equation $14^x+23^{2x}=k$ can be rewritten as $14^x+23^{2x}-k=0$, so $f(x)=14^x+23^{2x}-k$

This can be rewritten as $f(x)=e^{(\log 14)x}+e^{(2\log 23)x}-k$

Hence $f'(x)=(\log 14)e^{(\log 14)x}+(2\log 23)e^{(2\log 23)x}$

So $x_{n+1}=x_n-\dfrac {e^{(\log 14)x_n}+e^{(2\log 23)x_n}-k}{(\log 14)e^{(\log 14)x_n}+(2\log 23)e^{(2\log 23)x_n}}$

Fixed point iteration:

$$23^{2x}=k-14^x$$

$$2x=\log_{23}(k-14^x)$$

$$x=\frac12\log_{23}(k-14^x)$$

So for some $x_0\approx x$, we can use the following:

$$x_{n+1}=\frac12\log_{23}(k-14^{x_n})$$

For example, with $k=13$ and $x_0=0.3$,

$x_1=\frac12\log_{23}(13-14^{0.3})=0.3793470222$

$x_2=0.37156366654$

$x_3=0.372419725772$

etc. And $x=\lim_{n\to\infty}x_n$.

• Yes, but very slow convergence for small $k$ – tomi Jan 6 '17 at 17:46
• @tomi I agree, but the other answer took Newtons method, so... – Simply Beautiful Art Jan 6 '17 at 17:47

As already said in answers and comments, Newton method is probably the best and simplest way to find the zero of $$f(x)=14^x + 23^{2x} - k$$ From a practical point of view, I would suggest to use instead $$g(x)=\log \left(14^x+23^{2 x}\right)-\log(k)$$ which is much better conditioned (just by curiosity, plot $14^x + 23^{2x}$ and $\log \left(14^x+23^{2 x}\right)$).

As you said in a comment, using $f(x)$, the convergence is quite slow for small values of $k$.

For illustration purposes, let us use both functions for $k=0.001$ starting using $x_0=0$.

For $f(x)$, the iterates would be $$\left( \begin{array}{cc} n & x_n \\ 0 & 0 \\ 1 & -0.224353505 \\ 2 & -0.490433809 \\ 3 & -0.805641173 \\ 4 & -1.156949545 \\ 5 & -1.520584615 \\ 6 & -1.876683719 \\ 7 & -2.201538319 \\ 8 & -2.453972852 \\ 9 & -2.586800792 \\ 10 & -2.616322943 \\ 11 & -2.617534838 \\ 12 & -2.617536781 \\ \end{array} \right)$$

while, for $g(x)$, they would be $$\left( \begin{array}{cc} n & x_n \\ 0 & 0 \\ 1 & -1.706142182 \\ 2 & -2.615735506 \\ 3 & -2.617536780 \\ 4 & -2.617536781 \\ \end{array} \right)$$

The same would apply to large values of $k$.

For $k >0 \in \mathbb{N}$, the graph of $\log \left(14^x+23^{2 x}\right)$ is almost a straight line.