0
$\begingroup$

I am trying to correct some bills for laurent series with mathematica, but the output I am getting at the moment is not the best. For example, I have this function $$\frac{1}{z^2 + 9}$$ to develop at the point $z_0 = 3i$ in region $0 < |z - 3i| < 6$.

What I have tried so far is

Series [1 / (z ^ 2 + 9), {z, 3 I, 10}]

but this only returns me 10 terms of the series.

Then I tried

sumRule = 
  Inactive[Series][f_, {x_, x0_, n_}] :> 
   Inactive[Sum][
    Assuming[{Element[k, Integers], k >= 0}, 
     SeriesCoefficient[f, {z, 3 I, k}] (x - x0)^k // 
      FullSimplify], {k, 0, n}];

n = Infinity;

f[z_] = 1/(z^2 + 9);

Inactive[Series][f[z], {z, 3 I, n}] /. sumRule

The latter returns $$\underset{k=0}{\overset{\infty }{\sum }}6^{-k-2} (3+i z)^k$$ which comes close to the expected result: $$\frac{1}{6i} \frac{1}{z-3i} + \sum_{n=0}^{+\infty} \frac{-1}{(6i)^{n+2}} (z-3i)^n$$ but it is not this complete and I don't know why. I also haven't specified anywhere in which region to develop. So how can I get the correct result and maybe even specify the region?

$\endgroup$
2
  • 1
    $\begingroup$ "but this only returns me 10 terms of the series" What exactly do you mean by this? I am asking because you did ask for 10 terms? $\endgroup$
    – Nasser
    Jan 19, 2022 at 3:07
  • $\begingroup$ Because it would serve me up to infinity, but rightly does not print infinite terms. $\endgroup$
    – Teo7
    Jan 19, 2022 at 9:56

1 Answer 1

2
$\begingroup$
$Version

(* "13.0.0 for Mac OS X x86 (64-bit) (December 3, 2021)" *)

Clear["Global`*"]

c[k_] = SeriesCoefficient[1/(z^2 + 9), {z, 3 I, k}]

enter image description here

sum = Inactive[Sum][c[k]*(z - 3*I)^k, {k, -1, Infinity}] // 
 Simplify[#, {k >= -1, Element[k, Integers]}] &

enter image description here

Verifying,

sum // Activate

(* 1/(9 + z^2) *)

EDIT: Your "expected result" does not equal the original function

sum2 = HoldForm[1/(6 I) 1/(z - 3 I) +
   Inactive[Sum][-1/((6 I)^(n + 2)) (z - 3 I)^n, {n, 0, Infinity}]]

enter image description here

sum2 // ReleaseHold // Activate // Simplify

(* (6 + I z)/(81 + 36 I z - 3 z^2) *)
$\endgroup$
1
  • $\begingroup$ Thank you very much for the reply and for the correction. However, this procedure does not seem universal, for example SeriesCoefficient does not seem to work with the function (z ^ 2 (z - 1)) / (Sin [1 / (z - 1)]) and I don't know why. $\endgroup$
    – Teo7
    Jan 19, 2022 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.