# What is the taylor series expansion for the tangent function (tanx)?

May 22, 2018

$\tan x = x + \frac{1}{3} {x}^{3} + \frac{2}{15} {x}^{5} + \ldots$

#### Explanation:

The Maclaurin series is given by

 f(x) = f(0) + (f'(0))/(1!)x + (f''(0))/(2!)x^2 + (f'''(0))/(3!)x^3 + ... (f^((n))(0))/(n!)x^n + ...

${f}^{\left(0\right)} \left(x\right) = f \left(x\right) = \tan x$

Then, we compute the first few derivatives:

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = {\sec}^{2} \left(x\right)$

${f}^{\left(2\right)} \left(x\right) = \left(2 {\sec}^{2} x\right) \left(\sec x \tan x\right) \left(\right)$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = 2 {\sec}^{2} x \tan x$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = 2 \left(1 + {\tan}^{2} x\right) \tan x$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = 2 \left(\tan x + {\tan}^{3} x\right)$

${f}^{\left(3\right)} \left(x\right) = 2 \left\{{\sec}^{2} x + 3 {\tan}^{2} x {\sec}^{2} x\right\}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = 2 {\sec}^{2} x \left\{1 + 3 {\tan}^{2} x\right\}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = 2 {\sec}^{2} x \left\{1 + 3 \left({\sec}^{2} x - 1\right)\right\}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = 2 {\sec}^{2} x \left\{1 + 3 {\sec}^{2} x - 3\right\}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = 6 {\sec}^{4} x - 4 {\sec}^{2} x$

$\vdots$

Now we have the derivatives, we can compute their values when $x = 0$

${f}^{\left(0\right)} \left(x\right) = 0$
${f}^{\left(1\right)} \left(x\right) = 1$
${f}^{\left(2\right)} \left(x\right) = 0$
${f}^{\left(3\right)} \left(x\right) = 2$
$\vdots$

Which permits us to form the Maclaurin serie:

 f(x) = (0) + (1)/(1)x + (0)/(2)x^2 + (2)/(6)x^3 + ... (f^((n))(0))/(n!)x^n + ...

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = x + \frac{1}{3} {x}^{3} + \frac{2}{15} ^ 5 {x}^{5} + \ldots$