The "best" simple and accurate approximation for $x - \cos(x) = w$

88 Views Asked by At
  1. the given equation is $x-\cos(x) = w$
  2. given some $w$ values $-100, -1.9827359827356, 50, 75.2982735, 100\ldots$ maybe many more between, say $-10000\ldots 10000$

Please find some

a) simple !! b) enough accurate

approximation to find $x$

I tried

$a_1 \sin{(z_1 w + z_2)} + a_2 \sin{(z_3 w + z_4)} + a_3 \sin{(z_5 w + z_6)} ... + w + constant$

and found some good but it was something like at least $9 \sin$ things to get a good approximation.

Can you find more simple still somewhat accurate approx equation for this ?

2

There are 2 best solutions below

0
On

For convenience, I am treating $y=x-\sin(x)$, which is just a translate of the original equation.

This function is odd and can be repeated by translation, so it is enough to solve in $[-\frac\pi2,\frac\pi2]$. Inspired by its Taylor development, we look at the graph of

$$\sqrt[3]{x-\sin(x)}$$ which is very close to a straight line. Hence the linear approximation

$$\sqrt[3]y\approx\frac2\pi\sqrt[3]{\frac\pi2-1}\,x.$$

enter image description here

3
On

A rather good approximation is $$x=w-\frac{6 (-1766 \sin (2 w)+\sin (4 w)-3676 \cos (w)+156 \cos (3 w))}{45380 \sin (w)-380 \sin (3 w)-8916 \cos (2 w)+\cos (4 w)+37483}$$ which is the result of one single iteration of a method of order $8$.

Trying for $w=\pi^k$ $$\left( \begin{array}{ccc} k & \text{estimate} & \text{solution} \\ 1 & 2.402303939 & 2.402507520 \\ 2 & 8.967638069 & 8.970865828 \\ 3 & 31.89675206 & 31.89410931 \\ 4 & 96.66186737 & 96.66210022 \\ 5 & 305.0248861 & 305.0781580 \\ 6 & 962.1032272 & 962.1030947 \\ 7 & 3019.254913 & 3019.325573 \\ 8 & 9488.852896 & 9488.852896 \\ 9 & 29809.05062 & 29809.05062 \\ 10 & 93647.19019 & 93647.19169 \end{array} \right)$$

Edit

In a comment, the questioner wonders if this is a Padé approximant. The funny answer is that it is and it is not at the same time.

As done, it was the first iterate of an high order iterative method.

But, if we consider the $[1,n]$ Padé approximant (built around $x=w$) of the function $$f(x)=x-\cos(x)-w$$ it would write

$$P_n(x)=\frac{-\cos(w)+ a^{(n)} (x-w) } {1+\sum _{i=1}^n b_i^{(n)} (x-w)^i }$$ and the approximate solution is $$x_{(n)}=w +\frac{\cos(w)}{ a^{(n)} }$$ but $a^{(n)}$ depends on the function and derivative values at $x=w$, we find again Newton $(n=0)$, original Halley $(n=1)$, original Householder $(n=2)$ formulae. For example $$P_0=(x-w) (\sin (w)+1)-\cos (w)$$ $$P_1=\frac{\frac{(x-w) \left(2 \sin ^2(w)+4 \sin (w)+\cos ^2(w)+2\right)}{2 (\sin (w)+1)}-\cos (w)}{1-\frac{(x-w) \cos (w)}{2 (\sin (w)+1)}}$$

The given result would correspond to $[1,6]$ which is order $8$.

What is amuzing is that for some $n$ appears also a cotangent terms. For example $[1,3]$ gives $$x=w+\frac{2}{9} \left(1-\frac{2}{\cot \left(\frac{w}{2}\right)+1}+\frac{17 \sin (2 w)+302 \cos (w)}{60 \sin (w)-\cos (2 w)+131}\right)$$