This is a pretty simple issue with Mathematica but I could not find any previous discussion on this topic. The issue arises when we have fractions as indices of complex numbers. For e.g. Let's say we try to find the square root of the complex number $(8-x +6i)$.
Now, from basic complex number algebra, we know that the real part of the $\sqrt{(8-x +6i)}$ is aperiodic. In fact, Real part of the square root is $\pm\sqrt{0.5((8-P)+\sqrt{ {(8-P)}^2 + 6^2 })}$, which is aperiodic.
expr[x_] = ((8 - x) - 6 i)^(0.5)
expr1[x_] = expr[x] // Rationalize[#, 0] & // Re //
ComplexExpand[#, TargetFunctions -> {Re, Im}] & // FullSimplify
The output of the expr1[x]
is given in this weird form: (36 + (-8 + x)^2)^(1/4) Cos[1/2 ArcTan[8 - x, -6]]
. More importantly, this looks like a perioidic function.
This becomes an even bigger issue when the indices of the complex number is something like {1/4,1/3,7/3,etc..}.
As an example, I give a complex number raised to 19/3
.
expr8[x_] = (0.0133707 -
0.053536 I)/((0.905625 - 0.375 I) + (0. + 1.5 I) x)^(19/3)
expr9[x_] =
expr8[x] // Rationalize[#, 0] & // Re //
ComplexExpand[#, TargetFunctions -> {Re, Im}] & // FullSimplify
(46976204800000 5^(
2/3) (19101 Cos[19/3 ArcTan[200/483 (-1 + 4 x)]] -
76480 Sin[19/3 ArcTan[200/483 (-1 + 4 x)]]))/(729 3^(
1/3) (273289 + 320000 x (-1 + 2 x))^(19/6))
Plotting the real part,i.e. expr9[x] gives me something like this.
I think this happens because when I want to compute the real part of ${(r e^{(i\theta)})^{1/k}}$, Mathematica gives me something like $r^{\frac{1}{k}}cos(\frac{\theta}{k})$. Clear this output is periodic and can have -ve values. Is there a way to specify to Mathematica give me only the positive roots at each $x$?
Thank you in advance.