Ask Your Question

Gabriel Soranzo's profile - activity

2022-06-16 18:40:58 +0100 received badge  Scholar (source)
2022-06-11 22:51:51 +0100 received badge  Supporter (source)
2022-06-11 15:24:02 +0100 commented answer Implicit plot with complex function

Yes, I'm working on Dessins d'enfants. You too? I would be interested in knowing in what laboratory you're working... we

2022-06-11 15:10:47 +0100 received badge  Notable Question (source)
2022-02-16 11:52:38 +0100 received badge  Popular Question (source)
2020-12-20 15:43:54 +0100 received badge  Student (source)
2020-12-20 13:01:43 +0100 commented question Implicit plot with complex function

Thanks for your help, I added some examples.

2020-12-20 12:38:23 +0100 received badge  Editor (source)
2020-12-20 01:44:39 +0100 asked a question Implicit plot with complex function

I have a complex function $f:\mathbb{C}\to\mathbb{C}$ and want to draw the locus where $f$ is in the interval $[0,1]$.

I made the following (where $f$ is my complex function):

x = var('x')
assume(x, 'real')
y = var('y')
assume(y, 'real')
F = f.subs(z == x + I*y)
P = lambda x, y: F.subs(x=x, y=y).real()
Q = lambda x, y: F.subs(x=x, y=y).imag()
region_plot([P(x, y) <= 1, P(x, y) >= 0, Q(x, y) == 0], (x, 0, 5), (y, -1, 1))

That works well for small functions (low degree) but for big functions it's too long. For example with $$ f(z)=-\frac{{\left(z^{4} - 6 z^{3} + 12 z^{2} - 8 \, z\right)} {\left(z - 1\right)}^{3} {\left(z - 3\right)}}{{\left(2z - 3\right)} {\left(z - 2\right)}^{3} z} $$ there is no problem (a few second), but with $$ f(z)=-\frac{{\left(z^{8} - 16 z^{7} + 108 z^{6} - 400 z^{5} + 886 z^{4} - 1200 z^{3} + 972 z^{2} - 432 z + 81\right)} {\left(z - 2\right)}^{6} {\left(z - 4\right)} z}{{\left(6 z^{4} - 48 z^{3} + 140 z^{2} - 176 z + 81\right)} {\left(z - 1\right)}^{4} {\left(z - 3\right)}^{4}} $$ that's too long. I think there should be something better. I've seen for example the function complex_plot works well even for big functions and seems to do something more complex.

Any idea?