ordinary differential equations – Formula for the derivative of finite power series in reversed order of terms.

I wanted to solve the polar part in Schrödinger’s wave equation for the H-atom by direct substitution of functions of form:-
$$
Theta_{lm}(theta) = a_{lm} sin^{|m|}theta sum_{r≥0}^{r≤(l-|m|)/2}(-1)^rb_r cos^{l-|m|-2r}theta
$$

The $a$‘s are normalisation constants, no problem there. However, the problem of determining the $b$‘s ultimately drops down to finding the first and second derivatives of the polynomial in $z=cos theta$:
$$
P(z)=sum_{r≥0}^{r≤(l-|m|)/2} (-1)^rb_r z^{l-|m|-2r}
$$

Which is a finite power series written in decreasing order of powers. I couldn’t find a formula for so (well sometimes I get that dumb), but I think it does exist, maybe some reference book or website. I emphasize that what I’m doing is right the reverse of Frobenius-method. Thanks.