Mathematica, Arg and Simplify

I am having problems using Mathematica with complex numbers. Am I doing something wrong?

Two examples:

  • ComplexExpand [(x + i y) ^ (1/2)] gives (x ^ 2 + y ^ 2) ^ (1/4) Cos [1/2 Arg [x + i y]] + i (x ^ 2 + y ^ 2) ^ (1/4) Sin [1/2 Arg [x + i y]]

    and I still have not found a simpler result (which exists!)

  • ComplexExpand [Sqrt [x ^ 2 + y ^ 2] Cos [Arg [x + i y]] + i Sqrt [x ^ 2 + y ^ 2] Sin [Arg [x + i y]]]
    gives the same argument result ComplexExpand, while it should obviously be x + i y!

Thanks in advance!

+3
source share
1 answer

, Mathematica , "" .

, :

a = Sqrt[x^2 + y^2] Cos[Arg[x + I y]] + I Sqrt[x^2 + y^2] Sin[Arg[x + I y]];
ComplexExpand@a

Sqrt[x^2 + y^2] Cos[Arg[x + I y]] +  I Sqrt[x^2 + y^2] Sin[Arg[x + I y]]

FullSimplify@a

E^(I Arg[x + I y]) Sqrt[x^2 + y^2]

, Mathematica , X Y REALS.

, Mathematica .

:

a = Sqrt[x^2 + y^2] Cos[Arg[x + I y]] + I Sqrt[x^2 + y^2] Sin[Arg[x + I y]];
$Assumptions = Element[x, Reals] && Element[y, Reals]
FullSimplify[a]

x + I y   

, $Assumptions

$Assumptions = True

, , Mathematica , ...

+5

Source: https://habr.com/ru/post/1778424/


All Articles