[Math] Evaluate $\tan 42^\circ$ using Taylor’s expansion

calculustaylor expansion

I'm trying to evaluate $\tan 42^\circ$ using Taylor's expansion, with accuracy mistake level of $10^{-2}$.

To do this I've transformed the degrees to radians: $\tan 42^\circ \sim \tan(\pi/4)$

I get $x-a=42^\circ -45^\circ = -3^\circ = -3\cdot (\pi/180) = -\pi/60$

Let $f(x) = \tan(x)$

Now using Taylor's expansion for $f$ I get:

$\tan 42^\circ = \sum^n_{k=0}\frac{tan^{n+1}(\pi/4)}{k!}\cdot (-\pi/60)^{k} +R_n$

I need to find $n$ in a way that $|R_n|\le10^{-2}$

Now the part I'm stuck at, presenting $|R_n|$ using lagrange:

$|R_n| = |\frac{\tan(x)^{n+1}(c)}{(n+1)!}\cdot(\frac{-\pi}{60})^{n+1}| \le ..$

I don't know how to evaluate $\tan $ derivatives and therefore I don't know how to continue. I tried presenting $\tan x = \sqrt{\frac{1}{\cos^2(x)}-1}$, yet can't estimate this function's derivative as well.

How should I approach this?

Best Answer

Not an answer, just a trick to expand the tangent.

By successive differentiations,

$$y(x)\cos x=\sin x$$

$$y'(x)\cos x-y(x)\sin x=\cos x$$

$$y''(x)\cos x-2y'(x)\sin x-y(x)\cos x=-\sin x$$

$$y'''(x)\cos x-3y''(x)\sin x-3y'(x)\cos x+y(x)\sin x=-\cos x$$

$$\cdots$$

Now with $x=\dfrac\pi4$, we have $\sin x=\cos x$ and the relations simplify to

$$y = 1$$

$$y' -y = 1$$

$$y'' -2y' -y =- 1$$

$$y''' -3y'' -3y' +y =- 1$$

$$\cdots$$

Related Question