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?

  • 1
    $\begingroup$ Well, you should know from routine calculus that $\tan'=\sec^2$ and $(\sec^2)'$ should also not be that hard to calculate. Is the linear approximation already good enough? (It seems like it should be close but maybe not quite there). $\endgroup$ – Ian May 10 '17 at 17:46
  • $\begingroup$ Interestingly, the exact value of tan(42 deg) can be written in closed-form in terms of nested square roots. (See math.la.asu.edu/~surgent/mat170/Exact_Trig_Values.pdf.) But I wouldn't suggest that as an approach to the problem at hand! $\endgroup$ – Semiclassical May 10 '17 at 18:32


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

$f (42)=f (\frac \pi 4 -h) $ with $h=\frac {\pi}{60} $.

$$f (42)=\frac {1-f (h)}{1+f (h)} $$

$$=-1+2\frac {1}{1+f (h)} $$

$$=-1+2 (1-f (h)+f (h)^2-f (h)^3+h^3\epsilon_1 (h)) $$

where $$f (h)=h+\frac {h^3}{3}(1+\epsilon_2 (h))$$

thus $$f (42)\approx 1-2h. $$ with $h\approx 0.05$, you will find

$$f (42)\approx 1-0.1$$

  • $\begingroup$ You appear to be using the angle addition formula $\tan(\alpha-\beta)=\frac{\tan \alpha -\tan \beta}{1+\tan\alpha\tan\beta}$ for $\alpha=\pi/4$, $\beta=\pi/60$. Your answer would probably be clearer if this had been mentioned explicitly. $\endgroup$ – Semiclassical May 10 '17 at 20:43
  • $\begingroup$ @Semiclassical Yes . it is like $ cos^2+sin^2=1$ $\endgroup$ – hamam_Abdallah May 10 '17 at 20:44

For a smooth function,

$f(x) = \sum_\limits{n=0}^\infty \frac {f^{(n)}(a) (x-a)^n}{n!}$

$f(x) = \tan x\\ f'(x) = \sec^2 x = 1 + \tan^2 x\\ f''(x) = 2\tan x + 2\tan^3 x\\ f'''(x) = 2 + 8\tan^2 x + 6\tan^4 x$

And that is probably enough

$f^{(n)} (\frac {\pi}{4}) = 1, 2, 4, 16$ at $n = 0,1,2,3$

$tan (x) \approx 1 + 2(x-\frac{\pi}{4}) + 2(x-\frac{\pi}{4})^2 + \frac 83(x-\frac{\pi}{4})^3\\ \tan (42^\circ) = 1 + 2(-\frac{\pi}{60}) + 2(-\frac{\pi}{60})^2 + \frac 83(-\frac{\pi}{60})^3$

Error bounds:

$|R_n| < |\frac {f^{(n+1)}(\xi)}{(n+1)!} (x-a)^{n+1}|$

Choose $\xi$ such that $f^{(n+1)}(\xi)$ is maximized for $\xi \in [x,a].$
That would be at $\xi = \frac {\pi}{4}$

$|\tan(42^\circ) - (1 - 2(\frac {\pi}{60}) + 2(\frac {\pi}{60})^2)| < \frac {8}{3} (\frac {\pi}{60})^3 < 0.001$

And $\tan(42^\circ) = 1 - 2(\frac {\pi}{60}) + 2(\frac {\pi}{60})^2$ is within tolerance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy