Can sage find the poles of a complex function, and the residues at those poles?
Hi all,
I searched the SAGE reference and didn't find the word residue in realtion to functions of a complex variable. The function I'm working with is not the ratio of two polynomials in Z, which can be factored out to find the poles and zeros. It's actually like this:
f(z) = A* sinh(z)/ (B* z^2* sinh(z)+ C* z* cosh(z)-D* sin(z))
got this from laplace transforming a partial differential equation I want to solve. I'm following the technique used in a paper I'm trying to apply to a different geometry/coordinate system, and if I can get the residues at the poles, I can get a series solution to the PDE. However, I can't fill in the omitted steps in the paper due to my never having taken a course in complex variables. Hence my interest in finding the residues at the poles programmatically.
I would greatly appreciate a clue or two. Thank you.
Although not directly Sage-related, perhaps you could use the trick described here [http://en.wikipedia.org/wiki/Residue_%28complex_analysis%29#Series_methods]. I know absolutely nothing about complex analysis. :-) On another note, the Sage reference manual says that there is a way to compute Laurent series (which would give you your residue) [http://www.sagemath.org/doc/reference/sage/symbolic/expression.html#sage.symbolic.expression.Expression.taylor]. But when I fiddled with it, I could only get taylor series. You could also take a look at this [http://www.sagemath.org/doc/reference/sage/rings/laurent_series_ring_element.html], but I couldn't figure anything useful out of that, either.
You can find the zeroes of the denominator: "solve(f.denominator() == 0)". I don't know if there is a built-in way to compute residues from there.
Just as a data point, Mma apparently does this: http://reference.wolfram.com/mathematica/ref/Residue.html. Unsurprisingly, rjf has also written on this topic.
@John Palmieri - unfortunately, solve(f.denominator() == 0,x) doesn't help in this case, and using to_poly_solve=True gives a weird indexing error on the symbolic expression that comes out of the original non-solution that it's too late in this time zone for me to track down tonight. But I couldn't get W|A to do it, either; this probably doesn't have a closed-form solution, n'est pas?