Given a formal power series $f(x,y)=\sum\_{n,m\ge 0}f(n,m)\: x^n y^m$ in two variables $x$ and $y$ over some field of characteristic zero, e.g. the field of complex numbers $\mathbb C$, we define a new formal power series in one variable $t$:


$\Delta(f)(t):=\sum\_{i\ge 0} f(i,i) \:t^i$.


It is known that if $f(x,y)$ is rational $\Delta(f)(t)$ is in general not rational (I think it is algebraic though).


Example: $f(x,y)=\frac{1}{1-x-y}$ leads to $\Delta(f)(t)=(1-4t)^{-1/2}$.


The question is: Is there a constructive way (i.e. algorithm or explicit formula) to calculate 
$\Delta(f)(t)$ for rational (or algebraic) $f(x,y)$ ?



A diagonal operation on power series
There is a discussion of taking diagonals of rational functions in Stanley's *[Enumerative Combinatorics Volume II](http://www.cambridge.org/gb/knowledge/isbn/item1167618/?site_locale=en_GB)* (section 6.3). It contains a reasonably explicit description of how to take diagonals using Puiseux series as well as a description of how to do it using residues. 


