-2
$\begingroup$
  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 ?

$\endgroup$
5
  • $\begingroup$ Could you make both "simple" and "accurate" more precise, please? As it is, this isn't really a mathematical question. $\endgroup$
    – qfwfq
    Mar 10, 2021 at 19:13
  • $\begingroup$ Enough accurate = smaller average error square than 0.02. Simpler .. no nine sin things ... shorter to write. $\endgroup$
    – Ytrewq
    Mar 10, 2021 at 19:26
  • $\begingroup$ What happens if you try one iteration of Newton's method with starting value $x_0=w$? $\endgroup$ Mar 10, 2021 at 19:29
  • $\begingroup$ I tried Newton .. it works but the approx equation is too large. I used Mathematica. $\endgroup$
    – Ytrewq
    Mar 10, 2021 at 19:30
  • 1
    $\begingroup$ Related: math.stackexchange.com/questions/1053472/… $\endgroup$ Mar 10, 2021 at 21:04

2 Answers 2

1
$\begingroup$

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)$$

$\endgroup$
3
  • 1
    $\begingroup$ This looks great ! Can you tell how you did it? It looks something like Pade approximation but exponents replaced with sines and cosines. $\endgroup$
    – Ytrewq
    Mar 11, 2021 at 17:53
  • $\begingroup$ @Ytrewq. It is and it is not a Padé approximant !I shall edit to add a funny point. $\endgroup$ Mar 12, 2021 at 4:50
  • $\begingroup$ The only thing i can do now is to find some larger integers to get a little better approximation. After many hours running Excel evolutive solver, it suggests 27404, 61101, 1882, -606096, -48616, 8987, -548633 instead of -1766, -3676, 156, 45380, -380, -8916, 37483. Thanks for your effort. $\endgroup$
    – Ytrewq
    Mar 13, 2021 at 20:48
0
$\begingroup$

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

$\endgroup$
0

Not the answer you're looking for? Browse other questions tagged .