4

I was recently doing a high school geometry problem.

I believe that the intermediate steps are less than relevant, but if needed, I can post them too.

I ended up with the equation $$x+\sin(x)=\frac\pi2$$ I have no idea how to solve it. Any help would be appreciated.

welly
  • 113
  • 4

4 Answers4

5

As said in comments, there is no closed form but you can have good approximations since you noticed that the solution is close to $\frac \pi 4$.

Expanding as series $$x+\sin(x)=\left(\frac{1}{\sqrt{2}}+\frac{\pi }{4}\right)+\left(1+\frac{1}{\sqrt{2}}\right) \left(x-\frac{\pi }{4}\right)+\frac{1}{\sqrt{2}}\sum_{n=2}^\infty \frac{\sin \left(\frac{\pi n}{2}\right)+\cos \left(\frac{\pi n}{2}\right)}{n!}\left(x-\frac{\pi }{4}\right)^n$$

Truncating to some order and using series reversion, $$x=\frac{\pi }{4}+t+\left(\frac{1}{\sqrt{2}}-\frac{1}{2}\right) t^2+\frac{8-5 \sqrt{2}}{6} t^3+\frac{27 \sqrt{2}-37}{12} t^4+\frac{518-363 \sqrt{2}}{60} t^5+O\left(t^{6}\right)$$ where $t=\frac{\pi -2 \sqrt{2}}{2 \left(2+\sqrt{2}\right)}$.

Using these terms only, this gives,as an approximation $x=\color{red}{0.83171119}30$ while the solution, given using Newton method, is $x=\color{red}{0.83171119360}$

Edit

What you could also do is performing one single iteration of Halley method (instead of Newton method) and face the problem of solving for $x$ the linear equation $$\frac \pi 2=\frac {\frac{1}{4} \left(2 \sqrt{2}+\pi \right)+\frac{\left(28+16 \sqrt{2}+\sqrt{2} \pi \right) }{8 \left(2+\sqrt{2}\right)}\left(x-\frac{\pi }{4}\right) } {1+\frac{1}{\sqrt{2} \left(2+\sqrt{2}\right)}\left(x-\frac{\pi }{4}\right) }$$ which gives as an estimate $$x=\frac \pi 4 +\frac{2 \left(2+\sqrt{2}\right) \pi -8 \left(1+\sqrt{2}\right)}{4 \left(7+4 \sqrt{2}\right)-\sqrt{2} \pi }=0.831700\cdots$$

Using Householder method $$x=\frac \pi 4 +\frac{3 \left(120+88 \sqrt{2}-16 \left(3+2 \sqrt{2}\right) \pi +\left(1+\sqrt{2}\right) \pi ^2\right)}{-8 \left(119+83 \sqrt{2}\right)+8 \left(5+4 \sqrt{2}\right) \pi +\left(1+\sqrt{2}\right) \pi ^2}$$ which is $0.83171110\cdots$

  • The other answer just a day later GIVES the closed form. https://www.wolframalpha.com/input?i=sin%28pi%2F2-2sqrt%28inversebetaregularized%281%2F2%2C1%2F2%2C3%2F2%29%281-inversebetaregularized%281%2F2%2C1%2F2%2C3%2F2%29%29%29%29%2B+pi%2F2-2sqrt%28inversebetaregularized%281%2F2%2C1%2F2%2C3%2F2%29%281-inversebetaregularized%281%2F2%2C1%2F2%2C3%2F2%29%29%29-pi%2F2 – Anixx May 20 '22 at 00:03
4

Using:

Inverse of $f(x)=\sin(x)+x$

The answer uses Wolfram’s Inverse Beta Regularized $\text I^{-1}_s(a,b)$ for a closed form if you consider such functions as one. Also note the Kepler Equation series solution and the Bessel J function:

$$\sin(x)+x=\frac\pi 2\implies x=\frac\pi 2+2\sum_{n=1}^\infty\frac{\text J_n(-n)}{n} \sin\left(\frac{\pi n}2\right)=\text{hav}^{-1}\left(\text I^{-1}_\frac12\left(\frac12,\frac32\right)\right)=\frac\pi2-2\sqrt{\text I^{-1}_\frac12\left(\frac12,\frac32\right)\left(1-\text I^{-1}_\frac12\left(\frac12,\frac32\right)\right)}= 0.8317111935797359775760096039658780380851729407867954455217916603... $$

where appears the Inverse Haversine $\text{hav}^{-1}$ function.

Proof of result with $0$ error

Sum demonstration

There could be a small simplification for the radical solution, but it is neater this way. The sum converges slowly, so please add more terms in the demonstration link. Please correct me and give me feedback!

Тyma Gaidash
  • 13,576
2

The function $f(x)=x+\sin(x)$ is differentiable and $f'(x)=1+\cos(x)$. $f'(x)>0$ except when $x$ is an odd multiple of $\pi$, so $f$ is increasing. The equation therefore has at most one solution.

Since $f(0)=0<\frac{\pi}{2}$ and $f\left(\frac{\pi}{2}\right)=1+\frac{\pi}{2}>\frac{\pi}{2}$, the equation has exactly one solution by Intermediate Value Theorem and this solution is in $\left(0,\frac{\pi}{2}\right)$. Further uses of the Intermediate Value Theorem (with a computer), or better, using methods from other solutions, leads to better approximation of the solution $x\simeq 0.83$.

Taladris
  • 12,203
  • 5
  • 35
  • 61
  • Other solutions were great, but I wanted to add a more elementary, early Calculus 1 solution. Also, the unicity of solution didn't appear in other solutions. – Taladris May 04 '22 at 01:16
0

AFAIK, this problem cannot be solved analytically.

However, it's amenable to numeric fixed-point iteration. Rewrite the equation as $x = \frac{\pi}{2} - \sin{x}$, make a reasonable guess as to what $x$ might be, and iterate (with your favorite calculator or computer programming language) until you reach maximum precision.

>>> x = 1
>>> x = pi/2 - sin(x); print(x)
0.729325341987
>>> x = pi/2 - sin(x); print(x)
0.9044295814020161
>>> x = pi/2 - sin(x); print(x)
0.7847236391080894
>>> x = pi/2 - sin(x); print(x)
0.8641666671320438
>>> x = pi/2 - sin(x); print(x)
0.8102418604977235
>>> x = pi/2 - sin(x); print(x)
0.846342411176339
>>> x = pi/2 - sin(x); print(x)
0.8219348885430221
>>> x = pi/2 - sin(x); print(x)
0.8383318445230004
>>> x = pi/2 - sin(x); print(x)
0.8272676741511202
>>> x = pi/2 - sin(x); print(x)
0.8347116884247401
>>> x = pi/2 - sin(x); print(x)
0.8296933541692836

This should eventually converge to 0.831711193579736.

Dan
  • 18,262