Working out $\tan x$ using sin and cos expansion 
Using only the series expansions $\sin x = x- \dfrac{x^3} {3!} + \dfrac{x^5} {5!} + ...$ and $\cos x = 1 - \dfrac{x^2} {2!} + \dfrac{x^4}{4!} + ...$
  Find the series expansions of the $\tan x$ function up to the $x^5$ term.

So it is:
$$
\frac {x- \dfrac{x^3} {3!} + \dfrac{x^5} {5!} + ...} {1 - \dfrac{x^2} {2!} + \dfrac{x^4}{4!} + ...}
$$
However many times I retry, trying long division results :
$$
\require{enclose}
\begin{array}{rll}
   Q(x) \\[-3pt]
   1 - \dfrac{x^2} {2!} + \dfrac{x^4}{4!} + ... \enclose{longdiv}{x- \dfrac{x^3} {3!} + \dfrac{x^5} {5!} + ...}\kern-.2ex \\[-3pt]
      \underline{x-\dfrac{x^3} {2!} + \dfrac{x^5} {4!}\phantom{0000}} \\[-3pt]
      \dfrac{-x^3} {3!} + \dfrac{x^3} {2!}+ \dfrac{x^5} {5!}-\dfrac{x^5} {4!} \phantom{00}&& \\[-3pt]
      \underline{\phantom{0}\dfrac{-x^3} {3!} + \dfrac{x^3} {2!}- \dfrac{x^5} {2!2!}+ \dfrac{x^5} {3!2!}} && \\[-3pt]
       \dfrac{x^5} {5!} - \dfrac{x^5} {4!} + \dfrac{x^5} {2!2!}-\dfrac{x^5} {3!2!}&&  \\[-3pt]
  \end{array}
$$
Sorry for the horrible format. but this is the best i can do..
$$
Q(x) = x + (\frac {x^3}{2!} - \frac {x^3}{3!}) + (\dfrac {x^5}{5!} - \dfrac {x^5}{4!} + \dfrac {x^5}{2!2!} - \dfrac {x^5}{3!2!}) + ...
$$
Which results the coefficients of the $x^5$ term $\dfrac 1 {20}$.
This is clearly a wrong value. 
I can't seem to get $\dfrac 2 {15}$ instead.
Where did I get wrong?
Many thanks in advance.
 A: You get that the coefficient for $x^5$ is $\dfrac {1}{5!} - \dfrac {1}{4!} + \dfrac {1}{2!2!} - \dfrac {1}{3!2!}$, which is indeed $\dfrac2{15}$. So, no need to change method.
A: The following way may be easier.
Since $\tan x$ is an odd function, it can be represented as $\tan x=ax+bx^3+cx^5+\cdots.$
Since $\sin x=\cos x\tan x$, one has
$$x-\frac{x^3}{3!}+\frac{x^5}{5!}+\cdots=\left(1-\frac{x^2}{2!}+\frac{x^4}{4!}+\cdots\right)\left(ax+bx^3+cx^5+\cdots\right).$$
Comparing the coefficients gives you
$$1=a$$
$$-\frac{1}{3!}=b-\frac{a}{2!}$$
$$\frac{1}{5!}=c-\frac{b}{2!}+\frac{a}{4!}.$$
A: You may exploit the fact that $\tan x$ is an odd function, hence in a neighbourhood of the origin:
$$ \tan x=\sum_{n\geq 0} a_{2n+1}\, x^{2n+1}\tag{1} $$
as well as:
$$ \frac{d}{dx}\tan x=\frac{1}{\cos^2 x}=1+\color{purple}{\tan^2 x} = \sum_{n\geq 0}(2n+1)\,a_{2n+1}\,x^{2n} \tag{2}$$
from which it follows that $a_1=1$ and:

$$ a_{2n+1} = \frac{1}{2n+1}\sum_{k=1}^{n}a_{2k-1}a_{2n-2k+1}\tag{3}$$

so the Taylor coefficients of the tangent function can be computed with a rather simple recursion. $(3)$ leads to:
$$ a_3 = \frac{1}{3}a_1^2 = \frac{1}{3},\quad a_5=\frac{2}{5}a_1 a_3=\frac{2}{15}.\tag{4}$$
No polynomial divisions involved. Pretty nice, don't you think?
