Message Boards Message Boards

0
|
6492 Views
|
4 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Integer "n" for which Z^n is a real number?

Posted 3 years ago

Hi!

I'm having difficulties solving a certain problem in Mathematica.

The task is the find the smallest positive integer "n" for which Z^n is a real number where Z = cos(pi/3) + i*sin(pi/3)

The problem I have is I don't even know where to begin. I've done quite a bit of Mathematica problems before, but this is completely new to me.

Thanks!

POSTED BY: Adam Norell
4 Replies

I like the following result.

 a = Cos[Pi/3] + I*Sin[Pi/3];
a^Range[3, 99, 3] // FullSimplify

(* {-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 
-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1}*)
POSTED BY: Marvin Ray Burns

Rohits approach is really cool. But there is a more "analytical" way:

a = Cos[Pi/3] + I*Sin[Pi/3]
b = Exp[I*Pi/3]
a - b // FullSimplify
b^n // FullSimplify

Here you can see that n= 3 is a solution, and for sure the smallest one.

POSTED BY: Hans Dolhaine
Posted 3 years ago

Thanks for the help! That's quite a bit of unfamiliar code for me, but I think I get it.

POSTED BY: Adam Norell
Posted 3 years ago

Hi Adam,

There is probably a much better way to do this

z = Cos[Pi/3] + I*Sin[Pi/3]

FindInstance[z^n \[Element] Reals && n > 0 && n \[Element] Integers, n, 2]
(* {{n -> 135}, {n -> 531}} *)

Those are not guaranteed to be the smallest though. So

FindInstance[z^n \[Element] Reals && n > 0 && n \[Element] Integers && n < 135, n, 2]
(* {{n -> 108}, {n -> 24}} *)

FindInstance[z^n \[Element] Reals && n > 0 && n \[Element] Integers && n < 24, n, 2]
(* {{n -> 18}, {n -> 3}} *)

The answer is 3

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract