ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 29 Jun 2019 19:01:11 +0200Calculating Cauchy Integrals in Sagehttps://ask.sagemath.org/question/47017/calculating-cauchy-integrals-in-sage/Hi!
I am relatively new to complex analysis and I am trying to write down the following integral in Sage Math:
$$
I(k) = \frac{1}{2i\pi}\oint\frac{(1-t^2)}{(1-t)^n}\frac{dt}{t^{k+1}}
$$
from a paper that can be found at:
http://magali.bardet.free.fr/Publis/ltx43BF.pdf
The contour is a unit circle around the origin with a radius less than 1.
whereby $$S(n) = \frac{(1-t^2)}{(1-t)^n} $$ is a formal power series. The Cauchy Integral will produce the k-th coefficient of $S(n)$. I tried doing the following:
<!-- language: python -->
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\pi$ 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.
<!-- language: python -->
ArithmeticError: The integral of is not a Laurent series, since t^-1 has nonzero coefficient.
Thank you!JoaoDDuarteSat, 29 Jun 2019 19:01:11 +0200https://ask.sagemath.org/question/47017/Why is diff(conjugate(x),x) unevaluated?https://ask.sagemath.org/question/24027/why-is-diffconjugatexx-unevaluated/Or, can we differentiate holomorphic functions only?
Wirtinger defined two derivations in complex analysis for which we have:
diff(x,conjugate(x)) = 0
and
diff(conjugate(x),x) = 0.
http://en.wikipedia.org/wiki/Wirtinger_derivatives
Wirtinger calculus has important applications in optimization and has been extended to quaternion functions.
Is there any situation in which leaving diff(conjugate(x),x) unevaluated is an advantage?Bill Page _ againWed, 03 Sep 2014 03:25:09 +0200https://ask.sagemath.org/question/24027/Differentiating Complex Conjugated Functionshttps://ask.sagemath.org/question/7780/differentiating-complex-conjugated-functions/This is primarily a question of understanding the syntax of some output although there might be a bug hidden underneath. Consider the following code:
sage: var('x,t')
sage: q = function('q',x,t)
sage: f = q*q.conjugate()
sage: print f.derivative(x,1)
q(x, t)*D[0](conjugate)(q(x, t))*D[0](q)(x, t) + conjugate(q(x,t))*D[0](q)(x, t)
The answer is supposed to be $d/dx(q\bar{q}) = q_x \bar{q} + q \bar{q}_x$. The second term in the Sage output is correct but I'm having trouble deciphering the first term. Any thoughts?
I think I can narrow down the differences even further. Check it out:
sage: print q.conjugate().derivative(x,1)
D[0](conjugate)(q(x, t))*D[0](q)(x, t)
sage print q.derivative(x,1).conjugate()
conjugate(D[0](q)(x, t))
The independence of order isn't the issue: $q = u + iv$ means that $q_x = u_x + iv_x$, $\bar{q} = u - iv$. So $\bar{q_x} = u_x - iv_x$ and $(\bar{q})_x = (u - iv)_x = u_x - iv_x$.cswierczTue, 30 Nov 2010 16:18:04 +0100https://ask.sagemath.org/question/7780/