# Amount of exactly approximated samples with Padé approximation

I've already had some good discussion with Fat32 in this question yesterday.

Today I'm confused again. The author of Statistical digital signal processing and modeling M.h. Hayes and Fat32 both stated that Padé can approximate p+q+1 samples. Then I found this exercise

and the solution

Do I count wrong or are there 5 samples used for the approximation? q+p+1 should be $$2+3+1=6$$ and therefor 6 perfectly approximated samples. Okay I've calculated it. Due to the periodicity the sixth sample is correct too. But what if the vector would be e.g. 10 at $$x[5]$$ (sixth sample)?

To solve for the a's I'd then have 3 equations for the vector $$[1, a_1, a_2]^T$$ which is impossible to solve. Where do I make the mistake?

Your mistake is that you've taken $$p=2$$ but $$q=3$$ which is wrong. Correct is $$q=2$$ and there are 3 unknowns in $$b[k]$$ , that the problem defines a second order system , i.e, $$a[k] = [1, a_1, a_2]$$ and $$b[k] = [b_0, b_1, b_2]$$ , according to the book.
Since there are $$p+q+1 = 2+2+1 = 5$$ (that +1 is for $$b_0$$) unknown coefficients in the system transfer function $$H(z)$$, then from its impulse response $$h[n],$$ only the first 5 samples will match to the data $$x[n]$$ for $$n = 0,1,2,3,4$$.
And from the given solution as you can see there are 5 equations for 5 unknowns, of last 2 is used to solve for the unknowns $$a_1,a_2$$ and the first 3 used to find $$b_0,b_1,b_2$$. The data set used is the $$x = [x_0, x_1,x_2,x_3,x_4] = [2,1,0,-1,0]$$.
Note that for the first two equations $$x(-1)$$ and $$x(-2)$$ are implictly referenced, which are assumed to be zero for the causal modeling.
• yes for the $a[k]$ coefficients $a_0 = 1$ by default, and thus only $p$ unknowns left, whereas for $b[k]$ coefficients $b_0$ is also an unknown and hence the number of unknown coefficients is $q+1$ (order plus one) – Fat32 Feb 7 '19 at 11:58