How do i calculate the power x

  • Thread starter Thread starter chemart
  • Start date Start date
  • Tags Tags
    Power
AI Thread Summary
To solve the equation 2^x = 128, one can take the logarithm of both sides, leading to x = log_2(128). Alternatively, calculating the powers of 2 until reaching 128 shows that x equals 7, as 2^7 = 128. Some participants argue that using logarithms is not always necessary, especially for simple calculations. The discussion also highlights that for more complex equations, such as 2^(x+1) = 35, logarithms become essential. Ultimately, both methods can yield the same result, but the choice may depend on the context and available tools.
chemart
Messages
6
Reaction score
0
2^x=128
x=?

how do i calculate power x from 128 and 2?
 
Mathematics news on Phys.org
chemart said:
2^x=128
x=?

how do i calculate power x from 128 and 2?

You take the log of both sides:

log(2^X)=log(128)
Then you use the property
that log(a^b)=b log(a)

The remaining steps should be apparent.
 
Or quicker, just calculate 2*2*2... until you get 128!
 
mgb_phys said:
Or quicker, just calculate 2*2*2... until you get 128!

that's not quicker...
 
ice109 said:
that's not quicker...

Depends how far away your calculator is.
 
there are also other cases where you have to take logs of both parts, like it initially was suggested. Say you have:

2^{x+1}=35 you defenitely cannot express 35 as a power of 2, so in these cases you need to take the log of both parts, and choose a base that will be easier to work with.
log_a 2^{x+1}=log35=>(x+1)log_a 2=log_a35=>x+1=\frac{log_a35}{log_a2}
 
ice109 said:
that's not quicker...

Yes it is -
1, you can do it in your head in the time it takes to find the log button on the calculator

or if you happen to be an android
2, multiplying by 2 is a single shift instruction in a register which you can do in a single clock cycle, it would take at least 7 clock cycles to load the instruction into the FPU and get the answer back - especially if you have a long pipeline.
 
Too Simple! find the prime factorization of 128. Now, what is the exponent?

128 = 2 * 64 = 2 * 2*2*2 * 2*2*2

Count the factors of 2 in the factorization of 128.
 
mgb_phys way is definitely quicker. Note when we take logs of both sides, all we achieve is x= log_2 (128), and to actually evaluate that we must work out 2^7 = 128 anyway.
 
Back
Top