# Plot a specific branch of a multi-valued complex function?

**URL:** <https://community.wolfram.com/t/plot-a-specific-branch-of-a-multi-valued-complex-function/11576>\
**Category:** Questions\
**Tags:** equation-solving, graphics-and-visualization, symbolic-computations\
**Created:** [November 24, 2017, 5:23pm UTC](https://community.wolfram.com/t/plot-a-specific-branch-of-a-multi-valued-complex-function/11576 "2017-11-24T17:23:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dory1006](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@dory1006](https://community.wolfram.com/u/dory1006)\
**Post date:** [November 24, 2017, 5:23pm UTC](https://community.wolfram.com/t/plot-a-specific-branch-of-a-multi-valued-complex-function/11576/1 "2017-11-24T17:23:37Z")

</div>

I want to plot a specific branch of the function f(z) = \sqrt{z(z-1)} in the space (x,y,w) where x = \Re(z), y = \Im(z) and w = \Re(f(z)).

Let z = r\_1 e^{i\theta\_1} and z-1 = r\_2 e^{i\theta\_2}. We can then rewrite f(z) = \sqrt{r\_1 r\_2} e^{i \frac{\theta\_1+\theta\_2}{2}}. In theory, I can get a branch by specifying a constraint on \arg(z) = \theta\_1 and \arg(z-1) = \theta\_2 to the program. For example let’s suppose 0 \leq \theta\_1 \< 2\pi and -\pi \leq \theta\_2 \< \pi.

Because I want to use \theta\_1 and \theta\_2 as parameters to `ParametricPlot3D`, I need to express r\_1 and r\_2 with respect to \theta\_1 and \theta\_2 :

```
Simplify[
            ExpToTrig[
               Solve[r2 Exp[I ?2] + 1 == r1 Exp[I ?1], Element[{r1, r2}, Reals]]], 
               {Element[{?1, ?2}, Reals], 
            0 <= ?1 < 2 Pi, -Pi <= ?2 < Pi}][[1]]

```

It shows :

```
{r1 -> -Csc[?1 - ?2] Sin[?2], 
 r2 -> -Csc[?1 - ?2] Sin[?1]}

```

So I create new variables r\_1 and r\_2 :

```
r1 = -Csc[?1 - ?2] Sin[?2]
r2 = -Csc[?1 - ?2] Sin[?1]

```

I then define the function f(z) :

```
f[?1_, ?2_] = Sqrt[r1*r2]*Exp[I *(?1 + ?2)/2]

```

Finally, I plot :

```
ParametricPlot3D[{r1 Cos[?1], r1 Sin[?1], Re[f[?1, ?2]]}, {?1, 0, 2 Pi}, {?2, -Pi, Pi}, Mesh -> None, AxesLabel -> {x, y, z}]

```

 ![fz.png](https://global.discourse-cdn.com/wolfram/original/3X/1/e/1edf7f07121a340c6a35824d23ddd8f4e694f559.png)

**My question** : How come that the plot did not generate a single branch of the function? How can I solve this problem?
