How Do You Compute (-1)^i in MATLAB?

aks_sky
Messages
53
Reaction score
0
Calculate (-1) ^ i

I tried using the formula x^ni = cos (ln (x)^n) + i sin (ln (x)^n)

but i cannot solve it. i used MATLAB to get this answer 0.0432139182637723 + 0i

but i don't know how to solve it with steps.. can i get some assistance please.

thank you.
 
Physics news on Phys.org
aks_sky said:
Calculate (-1) ^ i

I tried using the formula x^ni = cos (ln (x)^n) + i sin (ln (x)^n)

but i cannot solve it. i used MATLAB to get this answer 0.0432139182637723 + 0i

but i don't know how to solve it with steps.. can i get some assistance please.

thank you.

Do you know how to write -1 in polar form?
 
yup the polar form will just be cos (theta) + i sin (theta) and the modulus here is 1.. correct?
 
aks_sky said:
yup the polar form will just be cos (theta) + i sin (theta) and the modulus here is 1.. correct?

Well, that's a particular complex number, but it's actually expressed in rectangular form x + iy, where x = cos(theta) and y = sin(theta).

Do you know how to write -1 in terms of "e", i.e., do you know what a complex exponential is? It would help to know what background can be assumed for this exercise.
 
well what i did was... x = ln (-1)^i
which is.. i ln (-1)
then in terms of "e" i will get... e ^ i ln (-1)

which gives me cos (ln (-1)) + i sin (ln (-1))
but i can't go any further to get the answer
 
aks_sky said:
well what i did was... x = ln (-1)^i
which is.. i ln (-1)
then in terms of "e" i will get... e ^ i ln (-1)

which gives me cos (ln (-1)) + i sin (ln (-1))
but i can't go any further to get the answer

What I was trying to get at is, have you been exposed to Euler's famous formula:

e^{i\pi} = -1

If so, then you can easily use this to get the answer you want.
 
yup i know that formula.. but how do i use it here?.. i tried to use that formula too but dint work.. maybe i did something wrong?
 
aks_sky said:
yup i know that formula.. but how do i use it here?.. i tried to use that formula too but dint work.. maybe i did something wrong?

Well, you're trying to find (-1)^i, right? So what is the natural thing do to both sides of Euler's formula?
 
um not sure exactly.
 
  • #10
aks_sky said:
um not sure exactly.

Oh, come on!

What operation do you do to -1 to obtain (-1)^i? (This isn't a trick question!) Just do that operation to both sides of Euler!
 
  • #11
What jbunnii is trying to say is:

(-1) = (e^{i\pi})
(-1)^i = ...

Use basic algebra here.
 
  • #12
we take logs of both sides
 
  • #13
ohhh yup i get what you asking
 
Back
Top