I have a function T(z)
and want to expand it to the following form:
At the end I want to have a list of equations, which can calculate a0, a1, a2, b0, b1 and b2 with different values of h1, h2, w01, w02 and T. The variable z does not matter.
In the code I replaced T(z) with f to not get confused.
f = (((1 - z^-1)/(1 + z^-1))^2 + 2*h1*Tan[(w1*T)/2]*((1 - z^-1)/(1 + z^-1)) + (Tan[(w1*T)/2])^2)/(((1 - z^-1)/(1 + z^-1))^2 + 2*h2*Tan[(w2*T)/2]*((1 - z^-1)/(1 + z^-1)) + (Tan[(w2*T)/2])^2)
At first I tried to expand f with the Mathematica-fuction Series in the way it is described here: How to expand a function into a power series with negative powers?
Series[f, {z, Infinity, 2}]
But the result is not what I need.
(2 h1 tan((T w1)/2)+tan^2((T w1)/2)+1)/(2 h2 tan((T w2)/2)+tan^2((T w2)/2)+1)+((-4 h1 tan((T w1)/2)-4)/(2 h2 tan((T w2)/2)+tan^2((T w2)/2)+1)+(4 (2 h1 tan((T w1)/2)+tan^2((T w1)/2)+1) (h2 tan((T w2)/2)+1))/(2 h2 tan((T w2)/2)+tan^2((T w2)/2)+1)^2)/z+((4 (2 h1 tan((T w1)/2)+tan^2((T w1)/2)+1) (2 h2^2 tan^2((T w2)/2)-h2 tan^3((T w2)/2)+3 h2 tan((T w2)/2)-2 tan^2((T w2)/2)+2))/(2 h2 tan((T w2)/2)+tan^2((T w2)/2)+1)^3+(4 h1 tan((T w1)/2)+8)/(2 h2 tan((T w2)/2)+tan^2((T w2)/2)+1)+(4 (-4 h1 tan((T w1)/2)-4) (h2 tan((T w2)/2)+1))/(2 h2 tan((T w2)/2)+tan^2((T w2)/2)+1)^2)/z^2+O((1/z)^3)
I would like to have, more or less, one polynomial series in the enumerator and a second in the denominator.
Thank you.