How can I solve this exponential equation with variables in the exponent?

  • Thread starter Thread starter chiako
  • Start date Start date
chiako
Messages
11
Reaction score
0
Hello. This problem was presented to me and I can't figure out for the life of me how to solve it.

2^x + 3^x = 50

I know the answer is approximately 3.35, thanks to WolframAlpha, but I don't know of any steps to arrive at this.

ln(2^x + 3^x) = ln(50)

How do you solve for ln(a+b) in this regard when a and b have a variable as their exponent?

Using ln(a+b) = ln(a((b/a)+1) = ln(a) + ln((b/a)+1) just gets me running in circles.
 
Mathematics news on Phys.org
You might simplify the problem by doing

3^x=2^{\log_2(3)x}=(2^x)^{\log_2(3)}

Put in a dummy variable y=2^x, then your equation becomes

y+y^{\log_2(3)}=50

Sadly, I see no way of solving this equation algebraically. I think you'll be forced to apply numerical methods here...
 
try the identity a^x = e^[x*ln(a)] perhaps? would get everything to the same base.
 
It can not be solved explicitly

use Newtons approximation method where x_0 = 3
 
Nebuchadnezza said:
It can not be solved explicitly

use Newtons approximation method where x_0 = 3

I have been trying to solve this all day on paper, going through step-by-step, but I am obviously doing it wrong.

f(x) = 2^x + 3^x - 50
f'(x) = 2^x \log(2) + 3^x \log(3)
x_0 = 3

x_{n+1} = x_0 - \frac{f(x_0)}{f'(x_0)}
x_1 = 3 - \frac{2^3 + 3^3 - 50}{2^3 \log(2) + 3^3 \log(3)} \approx 3.9810WRONG
x_2 = 3.9810 - \frac{2^{3.9810} + 3^{3.9810} - 50}{2^{3.9810} \log(2) + 3^{3.9810} \log(3)} \approx 2.9220 WRONG
x_3 = 2.9220 - \frac{2^{2.9220} + 3^{2.9220} - 50}{2^{2.9220} \log(2) + 3^{2.9220} \log(3)} \approx 4.1724 WRONG

As you can see, all I manage to do is get further and further AWAY from the approximate answer of 3.35. What did I do wrong when setting this up?

I have been using http://www.math.sc.edu/cgi-bin/sumcgi/Newton.pl to check my answers.

X[1] = 3.42075400369499
X[2] = 3.35520839663614
X[3] = 3.3528278249362

EDIT, with fixed calculator:
x_{n+1} = x_0 - \frac{f(x_0)}{f'(x_0)}
x_1 = 3 - \frac{2^3 + 3^3 - 50}{2^3 \log(2) + 3^3 \log(3)} \approx 3.4260
x_2 = 3.4260 - \frac{2^{3.4260} + 3^{3.4260} - 50}{2^{3.4260} \log(2) + 3^{3.4260} \log(3)} \approx 3.3555
x_3 = 3.3555 - \frac{2^{3.3555} + 3^{3.3555} - 50}{2^{3.3555} \log(2) + 3^{3.3555} \log(3)} \approx 3.3528
 
Last edited by a moderator:
Seems like you need to check your calculator because I get that

x_0 = 3 and x_1 \, \approx \, 3.4260

I just tried this and got a good approximation after just two iterations

Regards.
 
Nebuchadnezza said:
Seems like you need to check your calculator because I get that

x_0 = 3 and x_1 \, \approx \, 3.4260

I just tried this and got a good approximation after just two iterations

Regards.

Derp. That was it. It was my calculator. Thank you! Then, I was doing it right all along. I just popped the corrected answer into each of those and came out with the proper answer. :)
 
chiako said:
x_1 = 3 - \frac{2^3 + 3^3 - 50}{2^3 \log(2) + 3^3 \log(3)} \approx 3.9810

You've been using log base 10, you need to use the natural logarithm, probably ln on your calculator.
 
Al3ks said:
You've been using log base 10, you need to use the natural logarithm, probably ln on your calculator.

It was actually a formatting error in my entry into the calculator. Thank you, though.
 
  • #10
Fixed point iteration is sometimes useful when all you have at hand is a basic calculator scientific calculator. All you require is one that has an "ans" button (or equiv) and the ability to repeat the previous calculation (for example in my case each time I press "equals").

For example, on my cheap Casio (very basic scientific calc) the following key presses gets me the answer to 10 significant digits in about 20 seconds.

3.5 =
ln(50 - 2^ans)/ln 3 =
= = = = = = = = = =

Gives the answer : 3.352823623
 
Last edited:
  • #11
uart said:
Fixed point iteration is sometimes useful when all you have at hand is a basic calculator scientific calculator. All you require is one that has an "ans" button (or equiv) and the ability to repeat the previous calculation (for example in my case each time I press "equals").

For example, on my cheap Casio (very basic scientific calc) the following key presses gets me the answer to 10 significant digits in about 20 seconds.

3.5 =
ln(50 - 2^ans)/ln 3 =
= = = = = = = = = =

Gives the answer : 3.352823623

I wasn't so much concerned with doing the answer on the calculator, as to figuring out how the calculator arrived at that answer. I wanted to know the process behind it, which was arrived at with Netwon's Method. Thank you for the post, though.
 
  • #12
chiako said:
I wasn't so much concerned with doing the answer on the calculator, as to figuring out how the calculator arrived at that answer. I wanted to know the process behind it, which was arrived at with Netwon's Method. Thank you for the post, though.

Yeah it's all about recognizing that the equation requires a numerical solution and then using an appropriate numerical method. Newtons method was a good choice for a function like that which is easy to differentiate.

I only mentioned the "fixed point method" as a matter of passing interest. In general it's not a very good algorithm, slower to converge than Newtons method and doesn't always even converge (converges only when the abs value local gradient is less then one). It's one redeeming feature however is that the "programming" of the algorithm requires nothing more than repeating a single calculation and thus can be "programmed" on most non-programmable (that is, basic scientific) calculators.So just to make it clear what the calculator "keypresses" were doing in my previous post it was the following algorithm, with each iteration just involving pressing the calculator equals button.

Iterate x = \log_3(50 - 2^x) starting with x0 = 3.5.
x1 = \log_3(50 - 2^{3.5}) = 3.327
x2 = \log_3(50 - 2^{3.327}) = 3.357
x3 = \log_3(50 - 2^{3.357}) = 3.352
x4 = \log_3(50 - 2^{3.352}) = 3.353

and so on.
 
Back
Top