Maple: How to rewrite $\sqrt{1-r^2\exp(2i\theta)}$ in Cartesian form

185 Views Asked by At

How can I rewrite $\sqrt{1-r^2\exp(2i\theta)}$ into Cartesian form using Maple. I could do it by hand but I need this type of simplification later for far more complicated expressions.

I allready tried to enter this as a complex number using $I$, but simplify(...,'symbolic') didn't simplify this expression. Any suggestion?

1

There are 1 best solutions below

3
On BEST ANSWER

To write your expression as $z = a + ib$, i.e. with a real and imaginary part you can use the functionals Re and Im.

z:=sqrt(1-r^2*exp(2*I*theta)); # Your expression

a:=evalc(Re(z));               # Real part
b:=evalc(Im(z));               # Imaginary part

z__1 := a + I*b;               # z expressed as a real and imaginary part

$$z_1 := 1/2\,\sqrt {2\,\sqrt { \left( 1-{r}^{2}\cos \left( 2\,\theta \right) \right) ^{2}+{r}^{4} \left( \sin \left( 2\,\theta \right) \right) ^{ 2}}+2-2\,{r}^{2}\cos \left( 2\,\theta \right) }+i/2{\it csgn} \left( i \cos \left( 2\,\theta \right) {r}^{2}-{r}^{2}\sin \left( 2\,\theta \right) -i \right) \sqrt {2\,\sqrt { \left( 1-{r}^{2}\cos \left( 2\, \theta \right) \right) ^{2}+{r}^{4} \left( \sin \left( 2\,\theta \right) \right) ^{2}}-2+2\,{r}^{2}\cos \left( 2\,\theta \right) } $$