# Approximate cos(58) to four decimal place accuracy using taylor's theorem

Approximate cos(58) to four decimal place accuracy using taylor's theorem.

-
Hint: I imagine the $58$ is in degrees. This is almost $60$, so in radians it is $\pi/3 -2\pi/180$. Expand $\cos x$ about $a=\pi/3$. We know explicitly $\cos$ and its derivatives at $\pi/3$. – André Nicolas Apr 12 '12 at 19:48
No thanks. You can do your own homework. – user5137 Apr 12 '12 at 19:54
Welcome to math.SE: since you are fairly new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are so far; this will prevent people from telling you things you already know, and help them write their answers at an appropriate level. If this is homework, please add the [homework] tag; people will still help, so don't worry. Also, many find the use of imperative ("Find", "Show") to be rude when asking for help; please consider rewriting your post.(AM) – The Chaz 2.0 Apr 12 '12 at 20:01
(^surely there's a way to have this easily "copied to clipboard" for quick reply to such questions? I had to look up AM's recent activity...) – The Chaz 2.0 Apr 12 '12 at 20:02
I have a text file where I keep all of my standard math.SE responses. – Zev Chonoles Apr 12 '12 at 22:17

## 1 Answer

Since we have to use Taylor's Theorem to solve this problem, let's first recall what it (or at least one formulation) is:

Taylor's Theorem:
Let $n\in\Bbb N$, let $I=[a,b]$, and let $f:I\rightarrow \Bbb R$ be such that $f$ and its derivatives $f'$, $f''$, $\ldots\,$, $f^{(n)}$ are continuous on $I$ and that $f^{(n+1)}$ exists on $(a,b)$. If $x_0\in I$, then for any $x$ in $I$ there exists a point $c$ between $x$ and $x_0$ such that $$f(x)=\color{darkgreen}{f(x_0)+f'(x_0)(x-x_0)+{f''(x_0)\over 2!}(x-x_0)^2+ {f'''(x_0)\over 3!}(x-x_0)^3}$$ $$\color{darkgreen} { +\cdots +{f^{(n)}(x_0)\over n!}(x-x_0)^n} +\color{maroon}{{f^{(n+1)}(c)\over (n+1)!}(x-x_0)^{n+1}}$$

The darkgreen term in Taylor's Theorem $$P_n(x)=\textstyle \color{darkgreen}{f(x_0)+f'(x_0)(x-x_0)+{f''(x_0)\over 2!}(x-x_0)^2+ {f'''(x_0)\over 3!}(x-x_0)^3} \color{darkgreen} { +\cdots +{f^{(n)}(x_0)\over n!}(x-x_0)^n}$$ is the Taylor polynomial of the function $f$ of degree $n$ centered at $x_0$.

The maroon term in Taylor's Theorem, $$\tag{1} E_n(x)=\color{maroon}{{f^{(n+1)}(c)\over (n+1)!} (x-x_0)^{n+1}}$$ is called the the error term. Note that the "$c$" here depends on both $n$ and $x$.

If we estimate the function $f(x)$ with the value of $P_n(x)$, then the error in approximation is given by $E_n(x)$. Now, of course, we can't in practice hope to know what $E_n(x)$ is exactly; but if we can find a number $M$ so that $$\tag{2} \max_{t\text{ btw }x_0\text{ and }x } \Biggl|\, {f^{(n+1)}(t)\over (n+1)! (x-x_0)^{n+1}} \, \Biggr | \le M,$$ then we would know from Taylor's Theorem that $$\tag{3} \bigl|\,f(x)-P_n(x)\,\bigr|\le M.$$ The general procedure for approximating a function's value $f(x)$ with a Taylor polynomial $P_n(x)$ to within a certain degree of accuracy, say $\epsilon$, is to first determine a value of $n$, the degree of the Taylor Polynomial, needed so that the right hand side of $(2)$ is less than or equal to $\epsilon$. Then $(3)$ would tell us that the Taylor polynomial of degree $n$ will approximate the value of $f(x)$ to within $\epsilon$.

Now on to your problem. This is calculus, we will use radians for angular measurements.

We wish to estimate $\cos (29\pi/90)$ to within $1/10^4$ using Taylor's Theorem. Since $29\pi/90\approx\pi/3$, we will do so by using a Taylor polynomial of $f(x)=\cos x$ centered at $x_0=\pi/3$ and using $x=29\pi/90$ in Taylor's Theorem.

But what should should the degree $n$ of the polynomial be? We can use the remarks above to determine this:

We want the error in approximation, $E_n(29\pi/90)$ to satisfy $$\tag{4} \bigl|\,E_n(29\pi/90)\,\bigr|\le {1\over 10^4}.$$ Using $(1)$ to write the term $E_n(29\pi/90)$ more explicitly, we want

$$\Biggl|\,{ f^{(n+1)} (c)\over (n+1)!} \bigl({\textstyle{29\pi\over 90}-{\pi\over3}}\bigr)^{n+1}\,\Biggr|\le {1\over 10^4};$$ which simplifies to

$$\tag{5} \Biggl|\,{ f^{(n+1)} (c)\over (n+1)!}\bigl({\textstyle{- \pi\over 90}}\bigr )^{n+1}\,\Biggr|\le {1\over 10^4}.$$ Since we do not know what $c$ is, we find an upper bound for the expression on the left hand side of $(5)$; that is, we find an $M$ as in $(2)$. We can be slack here and use the fact that all derivatives of $f(x)=\cos x$ produce functions with absolute value at most 1. So, we have $$\tag{6} \bigl|E_n(29\pi/90)\bigr|= \Biggl|\,{ f^{(n+1)} (c)\over (n+1)!}\bigl({\textstyle{- \pi\over 90}}\bigr )^{n+1}\,\Biggr|\le \Biggl|\, {1\over (n+1)!}({ -\pi\over 90} )^{n+1}\,\Biggr|.$$ Now we find an $n$ so that the right hand side of $(6)$ is less than or equal to $1/10^4$. Then it will follow that inequality $(4)$ holds for this value of $n$, and consequently that $P_n(29\pi/90)$ approximates $\cos(29\pi/90)$ to within $1/10^4$. It turns out that (nicely) $n=2$ does the job, as direct verification will attest (you can plug values of $n$ into the right hand side of $(6)$ until you see the inequality is satisfied).

So, $n=2$, and the desired approximation is $P_2(29\pi/90)$.

We, of course, need to find $P_2(29\pi/90)$. Towards this end we first find the general form of $P_2(x)$ which is: $$P_2(x)=f(\pi/3)+f'(\pi/3)(x-\pi/3)+{f''(\pi/3)\over2!}(x-\pi/3)^2.$$

We have: \eqalign{ f(\pi/3) &= \cos(\pi/3)=1/2\cr f'(\pi/3)&=-\sin(\pi/3)=\sqrt3/2\cr f''(\pi/3)&= -\cos(\pi/3)=-1/2\cr }

So $$P_2(x) = {1\over 2}-{\sqrt3\over2}(x-{\pi/3})-{1\over 2\cdot2!}(x-{\pi/3})^2.$$

Finally, the desired approximation is: $$P_2(29\pi/90) = {1\over 2}-{\sqrt3\over2}(-\pi/90)-{1\over 2\cdot2!}(-\pi/90)^2.$$

-
I can't decide whether to love or to hate this answer! – Chris Taylor Apr 12 '12 at 23:06