Say I want to expand the function $\tan{x}$ in terms of a polynomial with remainder term of 7:th order. This means that there exists constants $c_1, c_3$ and $c_5$ such that
$$\tan{x}=c_1x+c_3x^3+c_5x^5+O(x^7).$$
Since $\sin{x}=\tan{x}\cdot \cos{x},$ the McLaurin expansions of $\sin{x}$ and $\cos{x}$ gives
$$x-\frac{x^3}{6}+\frac{x^5}{120}+O(x^7)=\left(1-\frac{x^2}{2}+\frac{x^4}{24}+O(x^6)\right)(c_1x+c_3x^3+c_5x^5+O(x^7)).$$
Question: Am I supposed to multiply through with one term at a time from each parenthesis in the RHS or are there shortcuts? My goal here is to have the RHS simplifed so that I can solve for $c_1,c_3$ and $c_5$ by identification of coefficients.