1
$\begingroup$

I was doing a computation with Mathematica (summing a series) and a part of the result was the following:

$$\frac{\Gamma \left(\frac{1}{4}\right)}{3 \sqrt{2} \sqrt[4]{-\frac{\sqrt[3]{r^3}}{2}-\frac{1}{2} i \sqrt{3} \sqrt[3]{r^3}+1}}$$

I would like to take the denominator, and (considering that $r$ is POSITIVE, that is $r > 0$) I would like to separate the denominator into an Imaginary and a Real part, in such a way that I can then take the complex conjugate and rewrite that fraction as $A + iB$.

The problem is that the commands I tried, do not work... Is there a way to force that separation, considering that $r > 0$ always?

I tried with

ExpToTrig[
Simplify[ComplexExpand[...], Assumptions -> {r > 0}]]

where the dots stands for the expression above. I also tried only with the denominator and it does not work.

Any smarter / stronger command?

Thank you so much!!

$\endgroup$
  • $\begingroup$ Use ComplexExpand[Re[expr]] to get the real part (assuming all variables are real). Similar for the imaginary part. Then Simplify[..., r > 0]. The results might contain I. That does not mean that their values are not real. $\endgroup$ – Szabolcs Oct 6 '17 at 12:42
  • 2
    $\begingroup$ This really should have the input expression in cut-and-pastable code. $\endgroup$ – Daniel Lichtblau Oct 6 '17 at 15:03
2
$\begingroup$

I found this way to proceed:

Simplify[ComplexExpand[
3 Sqrt[2] (1 - 1/2 (r^3)^(1/3) - 1/2 I Sqrt[3] (r^3)^(1/3))^(1/4), 
TargetFunctions -> {Re, Im}], r > 0]

With the following output

$$3 \sqrt{2} \sqrt[8]{r^2-r+1} \left(\cos \left(\frac{1}{4} \tan ^{-1}\left(2-r,-\sqrt{3} r\right)\right)+i \sin \left(\frac{1}{4} \tan ^{-1}\left(2-r,-\sqrt{3} r\right)\right)\right)$$

Could this be ok?

$\endgroup$
1
$\begingroup$

To answer, "Could this be OK?" in your answer

expr = 3 Sqrt[2] (1 - 1/2 (r^3)^(1/3) - 1/2 I Sqrt[3] (r^3)^(1/3))^(1/4);

Note that with the assumption that r > 0 then this expression can be expressed more compactly as

expr2 = Assuming[r > 0, expr // Simplify]

(* 3 (4 + (-2 - 2 I Sqrt[3]) r)^(1/4) *)

Your approach provides the same result with this form

expr3 = Assuming[r > 0, 
  expr2 // ComplexExpand[#, TargetFunctions -> {Re, Im}] & // Simplify]

(* 3 Sqrt[2] (1 - r + r^2)^(
 1/8) (Cos[1/4 ArcTan[2 - r, -Sqrt[3] r]] + 
   I Sin[1/4 ArcTan[2 - r, -Sqrt[3] r]]) *)

To get the form A + B I, you must Expand this expression

expr4 = expr3 // Expand

(* 3 Sqrt[2] (1 - r + r^2)^(1/8) Cos[1/4 ArcTan[2 - r, -Sqrt[3] r]] + 
 3 I Sqrt[2] (1 - r + r^2)^(1/8) Sin[1/4 ArcTan[2 - r, -Sqrt[3] r]] *)

Verifying that this is separated into the real and imaginary parts of the original expression:

Assuming[r > 0, (expr4 // First) == Re[expr] // ComplexExpand // FullSimplify]

(* True *)

Assuming[r > 0, (expr4 // Last)/I == Im[expr] // ComplexExpand // 
  FullSimplify]

(* True *)
$\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.