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

  • Thread starter rhenretta
  • Start date
  • Tags
    Algebra
In summary, the speaker is seeking help with solving for i in the equation a^{i}=b, where a is based on the interval in the musical scale and is equal to 2^{\frac{1}{12}}, and b is a variable. They mention that they need to solve this in Objective C, but the language does not allow for logarithms except for bases 2, 10, and e. The other person in the conversation explains that this type of problem involves logarithms and provides the formula for solving for i using the natural logarithm function.
  • #1
rhenretta
66
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:
[itex]a^{i}=b[/itex]

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

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
  • #2
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:
[itex]a^{i}=b[/itex]

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

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:

[itex]log_a(a^{i}) = log_a(b)[/itex] gives us
[itex]i = log_a(b) = \frac{ln(b)}{ln(a)}[/itex]

where ln(x) is the natural logarithm function.
 
  • #3
Thanks chiro :)
 

1. What is the purpose of solving a^i=b in Objective C?

The purpose of solving a^i=b in Objective C is to find the value of the variable "a" that, when raised to the power of the imaginary unit "i", will result in the value of "b". This is a common problem in mathematical and scientific computations, and Objective C provides a programming language to easily solve it.

2. How do I represent the imaginary unit "i" in Objective C?

In Objective C, the imaginary unit "i" can be represented by using the "I" or "i" suffix after a number. For example, to represent the number 3i, you can use the syntax "3i" or "3I".

3. What is the syntax for raising a number to the power of an imaginary unit in Objective C?

The syntax for raising a number to the power of an imaginary unit in Objective C is using the "pow()" function with the base number and the exponent as the arguments. For example, to raise the number 2 to the power of 3i, you would use the syntax "pow(2, 3i)".

4. Can I solve a^i=b for complex numbers in Objective C?

Yes, you can solve a^i=b for complex numbers in Objective C. The language allows for complex arithmetic operations, including raising a complex number to the power of an imaginary unit.

5. Are there any special cases to consider when solving a^i=b in Objective C?

One special case to consider when solving a^i=b in Objective C is when the base number "a" is equal to zero. In this case, the solution is undefined as any number raised to the power of zero is equal to 1, and there is no solution for 0^i=b. Additionally, if the value of "b" is a complex number, there may be multiple solutions depending on the value of "a".

Similar threads

Replies
5
Views
1K
Replies
2
Views
1K
Replies
11
Views
987
  • General Math
Replies
2
Views
769
Replies
4
Views
1K
  • General Math
Replies
1
Views
1K
  • General Math
Replies
4
Views
859
Replies
66
Views
4K
  • General Math
Replies
4
Views
828
Replies
1
Views
982
Back
Top