This question concerns my attempts to re-implement parts of this paper on developing wavelet filters. Though I don't think it is necessary to look at that paper, for full context, I'm trying to compute the contents of table II (using equation 9 and the description under the heading A Spline Variant with Less Dissimilar Lengths).
To summarize the technique, we have a trigonometric polynomial in $e^{-i\xi}$ (with real coefficients) given by the product of two factors, $H\left(\xi\right)$ and $\hat{H}\left(\xi\right)$.
These factors are defined as follows: $$ H\left(\xi\right) = 2^{-\frac{1}{2}}\left.\sum_n h_ne^{-in\xi}\right.\qquad \hat{H}\left(\xi\right) = 2^{-\frac{1}{2}}\left.\sum_n \hat{h}_ne^{-in\xi}\right. $$ in which the coefficients are symmetric about $n=0$, that is $h_n = h_{-n}$ and $\hat{h}_n = \hat{h}_{-n}$.
We wish to derive those factors so they have as close a number of non-zero coefficients as possible (which I know to be 9 and 7 for $h_n$ and $\hat{h}_n$ respectively for the case described below).
The polynomial we have is of a simple symmetric form (derived from equation 9 in the above reference) and is as follows (I might well have made a mistake in the preceding algebra, but I'm sure the form is correct):
Defining $B = e^{-i\xi}$ $$ H\left(\xi\right)\hat{H}\left(\xi\right) = \frac{B^{-7}}{2^8}\left[-\frac{5}{16}\left(B^{14} + 1\right) + \frac{49}{16}\left(B^{12} + B^{2}\right) - \frac{245}{16}\left(B^{10} + B^{4}\right) + \frac{1225}{16}\left(B^{8} + B^{6}\right) + 128B^{7}\right] $$
Given this, I can define $H\left(\xi\right)$ and $\hat{H}\left(\xi\right)$ as follows: $$ H\left(\xi\right) = B^{-4}2^{-\frac{1}{2}}\left[h_0B^4 + \sum_{n=1}^{4} h_n\left(B^{4+n} + B^{4-n}\right)\right]\\ \hat{H}\left(\xi\right) = B^{-3}2^{-\frac{1}{2}}\left[\hat{h}_0B^3 + \sum_{n=1}^{3} \hat{h}_n\left(B^{3+n} + B^{3-n}\right)\right] $$ in which I wish to find $h_n$ and $\hat{h}_n$.
Now, I can always multiply and expand out the above and attempt to equate the coefficients by hand, but this seems long, tedious and error prone.
Is there some technique I can use to automate this task? I initially thought a matrix technique, but it's not obvious to me how. It might be really trivial, so feel free to point it out as such!
Edit: I'm pretty sure I need an additional constraint to solve this uniquely. In this case it's: $$ \sum_n (-1)^n h_n = 0 \\ \sum_n (-1)^n \hat{h}_n = 0 \\ $$ My apologies, I've only just come to this conclusion.