<s>[INST] What is the Taylor series expansion of $\frac{2z+1}{(z+1)^2}$ at $z=i$ 
What is the Taylor series expansion of $\frac{2z+1}{(z+1)^2}$ at $z=i$?

I try to use that $a_n=\frac{f^{(n)}(i)}{n!}$, but the formula is too tedious. How should I proceed?
 [/INST] We are looking for a representation
\begin{align*}
  \frac{2z+1}{(z+1)^2}=\sum_{n=0}^\infty a_n(z-i)^n\qquad\qquad a_n\in\mathbb{C}
  \end{align*}

We obtain
  \begin{align*}
\frac{2z+1}{(z+1)^2}&=\frac{2(z-i)+(1+2i)}{((z-i)+(1+i))^2}\\
&=\frac{1}{(1+i)^2}\cdot\frac{2(z-i)+(1+2i)}{\left(1+\frac{z-i}{1+i}\right)^2}\\
  &=-\frac{i}{2}\left(2(z-i)+(1+2i)\right)\sum_{n=0}^\infty \binom{-2}{n}\left(\frac{z-i}{1+i}\right)^n\tag{1}\\
  &=\left(-i(z-i)+\left(1-\frac{1}{2}i\right)\right)
  \sum_{n=0}^\infty (n+1)(-1)^n\left(\frac{z-i}{1+i}\right)^n\tag{2}\\
  &=-i\sum_{n=0}^\infty\frac{(n+1)(-1)^n}{(1+i)^n}(z-i)^{n+1}\\
  &\qquad +\left(1-\frac{1}{2}i\right)\sum_{n=0}^\infty\frac{(n+1)(-1)^n}{(1+i)^n}(z-i)^n\tag{3}\\
  &=-i\sum_{n=1}^\infty\frac{n(-1)^{n-1}}{(1+i)^{n-1}}(z-i)^{n}\\
  &\qquad + \left(1-\frac{1}{2}i\right)\sum_{n=0}^\infty\frac{(n+1)(-1)^n}{(1+i)^n}(z-i)^n\tag{4}\\
&=\sum_{n=1}^\infty\frac{1+\frac{1}{2}(n-1)i}{(1+i)^n}(-1)^n(z-i)^n+1-\frac{1}{2}i\tag{5}\\
&=\sum_{n=0}^\infty\frac{1}{2^n}(-1+i)^n\left(1+\frac{1}{2}(n-1)i\right)(z-i)^n
\qquad\qquad\quad |z-i|<\sqrt{2}\tag{6}
\end{align*}

Comment:


*

*In (1) we expand the binomial series at $z=i$ with radius of convergence $\left|\frac{z-i}{1+i}\right|<1$, i.e. $|z-i|<\sqrt{2}$.

*In (2) we apply the binomial identity $\binom{-p}{q}=\binom{p+q-1}{q}(-1)^q$.

*In (3) we rearrange the series according to powers of $z-i$.

*In (4) shift the index of the left series by one to obtain powers $(z-i)^n$.

*In (5) we collect the terms with equal powers.

*In (6) we do some final simplifications.
</s>