1

Is there a way to solve equations of the form $y = x^N+z^N$ for N?

I've been looking and I don't think there is a way, but I'm not sure if there's some obscure algebra rule that will help me here.

3 Answers3

7

Generally, only numerically.

You can get a simple bound on $N$, which is useful to start a numeric search, like this:

Assume $x \le z$. Then $2x^N \le y \le 2z^N$, so $ N \log x \le \log (y/2) \le N \log z $ or $\frac{ \log (y/2)}{\log z} \ge N \ge \frac{ \log (y/2)}{\log x} $.

marty cohen
  • 107,799
4

As already said, there is no closed form for the solution (except for very specific cases) and only numerical methods would solve the problem.

Let us admit that $x,y,z$ are positive numbers and $N$ be a real number and consider Newton method which, starting from a reasonable guess $N_0$, will update it according to $$N_{k+1}=N_k-\frac{f(N_k)}{f'(N_k)}$$ So, if $$f(N)=x^N+z^N-y$$ $$f'(N)=x^N \log (x)+z^N \log (z)$$ Concerning $N_0$, you could look at the graph to get a rough estimate or, even simpler, start in the middle of the interval suggested by marty cohen.

For illustration purposes, let us use $x=2,z=5,y=100$. Using the bounds suggested by marty cohen, we find $$\frac{\log (50)}{\log (5)}<N<\frac{\log (50)}{\log (2)}$$ So, let us start at the middle point, that is to say $N_0=4$ and start iterating. The following iterates will then be generated : $3.46804$, $3.06212$, $2.85830$, $2.81737$, $2.81598$ which is the solution for six significant figures.

We can do better (obtaining a much more linear function) if instead we search for the root of $$g(N)=\log(x^N+z^N)-\log(y)$$ $$g'(N)=\frac{x^N \log (x)+z^N \log (z)}{x^N+z^N}$$ Starting again with $N_0=4$, the iterates are : $2.82901$, $2.81598$.

Function $g(N)$ is so close to linearity that computing its value at the bounds and assuming that a straight line joins the points gives a very good estimate of the solution. In the case used above for illustration purposes, this would give $N\approx 2.80472$ which is indead very close to the solution. So, if $N$ is supposed to be an integer, this could be a very fast method.

Doing the same using now $y=\frac{1}{100}$, the iterations would start at $N_0=-5.5$ and the iterates are $-6.64344$, $-6.64712$ which is the solution for six significant figures. Note that the estimate given by the above described secant would provide an estimate equal to $-6.66046$.

Edit

By the way, you could apply the same method for solving $$\sum_{i=1}^m a_i^N=y$$ for any number of terms. Admitting $a_1<a_2<\cdots<a_m$, The solution will be such that $$\frac{y}{m \log (a_m)}<N<\frac{y}{m \log (a_1)}$$ Let us try using $m=4,a_1=2,a_2=3,a_3=5,a_4=7,y=6000$. The secant gives an estimate which is $\approx 4.66956$ from where we can start Newton iterations for the function $$g(N)=\log\Big(\sum_{i=1}^m a_i^N\Big)-\log(y)$$ and obtain as iterates : $4.35247$, $4.35166$ which is the solution for six significant figures.

1

I think you can get an approximate solution by applying a multidimensional Newton-Raphson. You start by an initial guess, approximate the function by its tangent plane, get a better solution and iterate until reaching a solution within a reasonable interval of error. http://en.wikipedia.org/wiki/Newton%27s_method

rodrigo
  • 171