At what values of $x$ will $\cos x\approx1-\frac{x^2}{2!}+ \frac{x^4}{4!}$ have an error less than $0.00006$?

122 Views Asked by At

At what values of $x$ will the approximate formula $$\cos x\approx1-\frac{x^2}{2!}+ \frac{x^4}{4!}$$ have an error less than $0.00006$?

My work: $$\cos x\approx1-\frac{x^2}{2}+ \frac{x^4}{24}$$$\implies$ $$\cos x\approx\frac{24}{24}-\frac{12x^2}{24}+ \frac{x^4}{24}$$$\implies$ $$\cos x\approx\frac{x^4-12x^2+24}{24}$$ The numerator cannot be factored further and so I am stuck at his moment and thinking about what to do next? I think my working is fine and I have made no mistakes.

Any help is greatly appreciated.

EDIT: Typo corrected

2

There are 2 best solutions below

0
On BEST ANSWER

As @emacs drives me nuts wrote, you look for the solution of $$\cos(x)-\Big[1-\frac{1}{2}x^2+\frac{1}{24}x^4 \Big]=\epsilon$$ Since $\epsilon$ is small, look instead for the solution of $$\log\Bigg[\cos(x)-\Big[1-\frac{1}{2}x^2+\frac{1}{24}x^4 \Big]\Bigg]=\log(\epsilon)$$ Expanding the lhs as a Taylor series around $x=0$, it is $$6 \log (x)-\log (720)-\frac{x^2}{56}+O\left(x^4\right)$$ So, ignoring the term in $x^2$, a first approximation is $$x_0=\sqrt[6]{720 \epsilon}$$ For $\epsilon=6\times 10^{-5}$, this will give $$x_0=\frac{\sqrt{3}}{5^{2/3}}=0.592353$$ while the solution is $0.592973$ (as already given in @emacs drives me nuts's answer).

Now, just for your curiosity, we can do better including the $x^2$ term. Let $x^2=t$ and the equation becomes $$3\log(t)-\frac 1{56} t=\log(720\epsilon)$$ which has an explicit solution in terms of Lambert function $$t=-168 W(-k) \qquad \text{where} \qquad k=\frac 1{14}\sqrt[3]{\frac{5 }{12}\epsilon } $$ For $\epsilon=6\times 10^{-5}$, this will give $$t=0.3516172798979606938439809\cdots$$ that is to say $$ x=\sqrt t=0.5929733$$ while the exact solution is $x=0.5929728$

0
On

You can do it numerically, for example with Newton-Raphson iteration. Then search for a zero of

$$|\cos x - f(x)| - \varepsilon =0$$

with $f(x) = 1-x^2/2 + x^4/24$ and $\varepsilon = 0.00006$. One gets

$$|x|<x_\max \approx 0.592972776$$

For an overview, you can also use online calculators / plotters like Desmos. The red strip indicates the range of $x$'s where $|\cos x - f(x)| < \varepsilon$, which is again $|x|\lessapprox0.59$.