Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
3

Calculating Cauchy Integrals in Sage

asked 5 years ago

JoaoDDuarte gravatar image

updated 5 years ago

Hi!

I am relatively new to complex analysis and I am trying to write down the following integral in Sage Math:

I(k)=12iπ(1t2)(1t)ndttk+1

from a paper that can be found at: http://magali.bardet.free.fr/Publis/l...

The contour is a unit circle around the origin with a radius less than 1.

whereby S(n)=(1t2)(1t)n is a formal power series. The Cauchy Integral will produce the k-th coefficient of S(n). I tried doing the following:

def deg_reg_Cauchy(k, n, m):
    R.<t> = PowerSeriesRing(CC, 't')
    constant_term = 1/(2*I*pi)
    s = (1-t**2)**m / (t**(k+1)*(1-t)**n)
    s1 = constant_term * s.integral()
    return s1

I realize this is probably very wrong and I used 0 till 2π as simple placeholders until I find appropriate values. Does anyone have any tips on how to go about this, please? Below is the error message that is being outputted by Sage.

ArithmeticError: The integral of is not a Laurent series, since t^-1 has nonzero coefficient.

Thank you!

Preview: (hide)

Comments

Also posted at Stackoverflow.

kcrisman gravatar imagekcrisman ( 5 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 5 years ago

kcrisman gravatar image

updated 5 years ago

Identical answer (not full, unfortunately) to what I posted on SO.


You're probably going to have to parametrize your integration domain (circle, here). Or use a Cauchy residue type theorem, as here.

Here is an interesting Sage cell instance by Jason Grout and Ben Woodruff that might help you get started on how to calculate some of them; unfortunately, sometimes these integrals are very tricky to do exactly. See this sage-support thread for an easier example, though I don't think in the end it fully worked because of a Maxima bug.

Relevant code:

f(x,y)=9-x^2-y^2
r(t)=(2*cos(t), 3*sin(t))
trange=(t,0,2*pi)

ds=r.diff(t).norm()
dA=f(*r(t))*ds(t)

def line_integral(integrand):
    return RR(numerical_integral(integrand, trange[1], trange[2])[0])

A = line_integral(dA)
integrate(dA, trange)

The last two lines do a numerical and exact (if possible) result, respectively.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 5 years ago

Seen: 1,155 times

Last updated: Jul 03 '19