Numerical Integration of complex functions

asked 2022-08-08 06:19:16 +0100

lymber gravatar image

updated 2022-08-08 10:14:10 +0100

FrédéricC gravatar image

Hi, there! Just wondering if there is a way to compute numerical integration of some complex valued functions (meromorphic ones, most of the time). I intend to explore Weierstrass representation for minimal surfaces in Sage, and the only examples I can get are the ones were it can compute a primitive for the integrand, like in the Ennerper case:

var('rho,a,w')
f=w
g=1/w
theta=0

Phi_1=(f/2*(1/g-g)).integrate(w)
Phi_2=(I/2*f*(1/g+g)).integrate(w)
Phi_3=(f).integrate(w)
def FF1(rho,a):
  return real_part(exp(I*theta)*Phi_1(w=rho*exp(I*a)))
def FF2(rho,a):
  return real_part(exp(I*theta)*Phi_2(w=rho*exp(I*a)))
def FF3(rho,a):
  return real_part(exp(I*theta)*Phi_3(w=rho*exp(I*a)))

parametric_plot3d([FF1,FF2,FF3],(rho,0,2),(a,0,2*pi),plot_points=[10,100], mesh=true)

Maybe this numerical integration could be done in a meshgrid or something like that. If so, how one can do it?

Best, Alexandre

edit retag flag offensive close merge delete

Comments

Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 2022-08-08 21:52:50 +0100 )edit

It is nice to include an example that works. Can you also include one that does not work?

slelievre gravatar imageslelievre ( 2022-08-08 21:53:20 +0100 )edit