Ordinary generating function - undo transformation without complex arithmetic

39 Views Asked by At

Ordinary generating function is very similar in concept to the $Z$ transform. For linear recurrences with constant coefficients we get rational functions. Suppose that we are limited to real partial fractions. We have rational function$$\frac{P(x)}{Q(x)}.$$We have following cases:

  1. Denominator has distinct linear factors (we do not consider complex numbers). Here it is easy to calculate $n$th derivative or simply get geometric series.
  2. Denominator has distinct irreducible quadratic factors. Here we know that\begin{align*}\operatorname{OGF}\left (\sin \left (\frac{\pi}{2}n\right )\right ) & =\frac{x}{1+x^2}, \\ \operatorname{OGF}\left (\cos \left (\frac{\pi}{2}n\right )\right ) & =\frac{1}{1+x^2}. \end{align*} But in this case we have following fractions:$$\frac{Ax+B}{x^2+px+q}.$$Can we conclude something if we complete the square in the denominator? Is there shift property like in Laplace transform?
  3. Denominator has repeated factors (linear of irreducible quadratics). Here we have that$$\operatorname{OGF}(f*g)=F(x)G(x),$$but convolution is given by sum instead of an integral$$(f*g)(n)=\sum \limits _{k=0}^nf(k)g(n-k).$$

Maybe this question help me.
What is $\operatorname{OGF}(a^n\cos (\omega n+\theta ))$ or $\operatorname{OGF}(a^n\sin (\omega n+\theta ))$?
I think that one of these is enough.
Is it necessary to play with complex numbers to get this $\operatorname{OGF}$?

If I don't make mistake in my calculations$$\operatorname{OGF}(a^n\cos (\omega n+\theta ))=\frac{\cos (\theta )-a\cos (\omega -\theta )x}{1-2a\cos (\omega )x+a^2x^2}.$$