How can I solve a^i=b in Objective C?

  • Thread starter Thread starter rhenretta
  • Start date Start date
  • Tags Tags
    Algebra
AI Thread Summary
To solve the equation a^i = b in Objective C, where a = 2^(1/12), logarithms are needed. The solution involves using the formula i = log_a(b), which can be expressed as i = ln(b) / ln(a) using natural logarithms. Since Objective C only supports logarithms for bases 2, 10, and e, the natural logarithm can be calculated using the log function. This approach allows for the computation of i effectively. Understanding the relationship between logarithms and exponentials is crucial for solving this problem.
rhenretta
Messages
65
Reaction score
0
My math skills are failing me, and I was hoping one of you could help me with this real quick..

I need to solve for i:
a^{i}=b

a in this case is based on the interval in the musical scale, so
a = 2^{\frac{1}{12}}

I have to solve this in objective c, and apparently it doesn't let me solve logarithms except for bases 2, 10, and e
 
Mathematics news on Phys.org
rhenretta said:
My math skills are failing me, and I was hoping one of you could help me with this real quick..

I need to solve for i:
a^{i}=b

a in this case is based on the interval in the musical scale, so
a = 2^{\frac{1}{12}}

I have to solve this in objective c, and apparently it doesn't let me solve logarithms except for bases 2, 10, and e

Hey rhenretta.

This kind of problems what is called logarithms. Basically logs and exponentials are inverses in that log(e^x) = x and e(log(x)) = x for valid x's. So we have:

log_a(a^{i}) = log_a(b) gives us
i = log_a(b) = \frac{ln(b)}{ln(a)}

where ln(x) is the natural logarithm function.
 
Thanks chiro :)
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Back
Top