5
$\begingroup$

How would I go about solving

$(1+i)^n = (1+\sqrt{3}i)^m$ for integer $m$ and $n$?

I have tried

Solve[(1+I)^n == (1+Sqrt[3] I)^m && n ∈ Integers && m ∈ Integers, {n, m}]

but this does not give the answer in the 'correct' form.

$\endgroup$
3
  • $\begingroup$ You have two unknowns and one equation, is there a solution for both n and m? $\endgroup$
    – Jason B.
    Jan 18, 2016 at 9:00
  • 1
    $\begingroup$ I don't think Mathematica can solve this directly, when written in this form. But this should give a hint about the solution: Table[Through[{Re, Im}[(1 + I)^n]], {n, 0, 50, 4}] and Table[Through[{Re, Im}[(1 + Sqrt[3] I)^m]], {m, 0, 50, 3}]. (n==24 && m==12 is one possible solution.) $\endgroup$
    – Szabolcs
    Jan 18, 2016 at 9:05
  • 3
    $\begingroup$ @JasonB Actually, there are two equations, one for the amplitudes and the other for the phases. $\endgroup$
    – bbgodfrey
    Jan 18, 2016 at 9:09

3 Answers 3

9
$\begingroup$

As stated in the question and also the comment above by Szabolcs, Mathematica does not seem to be able to solve the equation directly. For instance, neither Solve nor Reduce produces the desired result. However, as I suggested in a comment above, the equation can be decomposed into expressions for its amplitude and phase, and each solved to obtain the answer. Begin with the amplitude.

Abs[(1 + I)]^n == Abs[(1 + Sqrt[3] I)]^m
(* 2^(n/2) == 2^m *)

Thus, n is twice m. Insert this into the expression for the phases, modulo 2 π.

Solve[(Mod[Arg[(1 + I)] n, 2 π] == 
    Mod[Arg[(1 + Sqrt[3] I)] m, 2 π]) /. n -> 2 m, m, Integers]
(* {{m -> ConditionalExpression[12 C[1], C[1] ∈ Integers]}} *)

This, m is any integer, positive or negative, multiplied by 12, and n is 2 m.

$\endgroup$
1
  • $\begingroup$ Thanks! Interesting how this seems to be the only way without resorting to a brute force search (see the other answers). I was thinking there would be a more elegant way. $\endgroup$
    – Presquevu
    Jan 18, 2016 at 11:40
6
$\begingroup$

One can get a truly ridiculous solution by ComplexExpand[]ing the real and imaginary parts:

Reduce[ComplexExpand[{Re /@ #, Im /@ #}] &[
    (1 + I)^n == (1 + Sqrt[3] I)^m], 
  {m, n}, Integers]
(*  ... an astonishing mess involving 14 integer parameters ... *)

However, pulling out the magnitude and argument is much nicer.

Reduce[ComplexExpand[{Abs /@ #, Arg /@ #}] &[
    (1 + I)^n == (1 + Sqrt[3] I)^m], 
  {m, n}, Integers]
(* C[1] ∈ Integers && m == 12 C[1] && n == 24 C[1] *)

(This essentially automates @bbgodfrey's answer.)

$\endgroup$
1
  • $\begingroup$ That's the way how to solve such equations! +1:) $\endgroup$
    – user36273
    Jan 19, 2016 at 13:07
4
$\begingroup$
Last@Reap@Do[
  If[
   ReIm[(1 + I)^n] == ReIm[(1 + Sqrt[3] I)^m]
   , Sow[{n, m}]
   ]
  , {n, 100}
  , {m, 100}
  ]
{{{24, 12}, {48, 24}, {72, 36}, {96, 48}}}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.