-2

I am trying to approximate the solutions for $x^2=\cos x$. Using Taylor quadratic approximation, we get $$\cos x \approx 1-\frac{x^2}2.$$ Solving yields $x=\pm\sqrt{\frac32}$.

However, I am having trouble calculating the error for this approximation, as Lagrange's Error Bound formula cannot be directly used. Is there another way to calculate the maximum error?

bobeyt6
  • 1,272
  • 1
    Do you mean to bound the error $|x^\ast - \sqrt{2/3}|$ analytically (e.g. using some error bound formulas) where $x^\ast \in (0, 1)$ is the solution of $x^2 = \cos x$? – River Li Jul 08 '22 at 06:07

2 Answers2

1

Sorry, but that's not very likely: since $\cos x\le1$, a reasonable solution of your equation should satisfy $|x|\le1$, too. In reality, your approximation yields $x=\pm\sqrt{\frac23}$, and that's not bad, as $\cos\sqrt{\frac23}=0.68477852552355028302824662222974449974$ is not so far from $\frac23$.

wasn't me
  • 126
1

There is a nice, simple, $\color{red}{\large 1,400}$ years old approximation $$\cos(x) \simeq\frac{\pi ^2-4x^2}{\pi ^2+x^2}\qquad (-\frac \pi 2 \leq x\leq\frac \pi 2)$$ which gives as an estimate $$x^2=\frac{1}{2} \left(-4-\pi ^2+\sqrt{16+12 \pi ^2+\pi ^4}\right)$$ that is to say $$x=\pm 0.823660$$ while the exact solution, given by Newton method, is $x=\pm 0.824132$.

You can polish the root using the fact that the estimate is close to $\frac \pi 4$ and then use a series expansion $$x^2-\cos(x)=\left(\frac{\pi ^2}{16}-\frac{1}{\sqrt{2}}\right)+\left(\frac{1}{\sqrt{2}}+\frac{\pi }{2}\right) \left(x-\frac{\pi }{4}\right)+\left(1+\frac{1}{2 \sqrt{2}}\right) \left(x-\frac{\pi }{4}\right)^2+O\left(\left(x-\frac{\pi }{4}\right)^3\right)$$ Solving the quadratic gives $$x=\pm\frac{-4 \sqrt{2}+\sqrt{2} \pi +2 \sqrt{24+\frac{8192+2048 \pi -256 \pi ^2}{128\sqrt{2}}}}{4 \left(4+\sqrt{2}\right)}=\pm 0.824129$$

Edit

Even if it does not make any sense, notice that $$\cos \left(\frac{35 \pi }{229}\right)-\sin \left(\frac{\pi }{50}\right)$$ approximates the solution within an error of $4.53 \times 10^{-9}$ (this was found by a trigonometric inverse calculator of mine).

  • Are there any sources for that 1,400-year-old approximation? – TravorLZH Jul 08 '22 at 04:30
  • @TravorLZH. Have a look at this old question of mine https://math.stackexchange.com/questions/976462/a-1-400-years-old-approximation-to-the-sine-function-by-mahabhaskariya-of-bhaska – Claude Leibovici Jul 08 '22 at 04:38