How do you solve the trigonometric equation $\sin(x)+x=9$?

977 Views Asked by At

How do you solve the trigonometric equation $\sin(x)+x=9$? More generally, how do you solve equations with both trigs and 'x's without graphing? And maybe I only want real number answers.
Suggestions and edit: If you use the Taylor Series, you will basically end up with at least $6^{th}$ degree equations, if you want to make it close. Equation Solvers Are NOT Allowed. That will kind of limit you to this:(assuming you make careless mistakes, just like me, so you don't want cubic equations) $$x+x=9.$$ This yields $x=4.5$, which is DEFINITELY a bad estimation.
Thanks for helping me! It's just that I don't know what Newton-Ralphson and iterations are. Can you explain it to me or give me a link?

4

There are 4 best solutions below

2
On BEST ANSWER

The function $\sin x +x-9$ has the strictly non-negative derivative $\cos x+1$, so the solution in $\Bbb R$ is unique, confined to $[8,\,10]$. The Newton-Raphson method $x\mapsto x-\frac{\sin x +x-9}{\cos x +1}$ iteratively improves the estimate $x_0=8$ to $8.0125448260685$ (according to my Python), if that's accurate enough.

2
On

If you equate a numerical solution with graphing, generally you can't. You can use any of the one dimensional root finders, but I think of a graphing solution as equivalent. Either Alpha or the solver in a spreadsheet will make the numerics easy.

I am a fan of fixed point iteration. For your example, I would write it as $x=9-\sin(x)$, start with $x_0=9$, plug $x_i$ into the right and compute $x_{i+1}$ on the left. It converges (for $x$ in radians) to about $8.012545$ in about $10$ iterations. The trick is to make the derivative of the right side less than $1$.

5
On

Assuming you have a calculator in hand. Define $f(x)=\sin x+x-9$. By Newton-Raphson method we have the following iteration formula: $$x_{n+1}=x_n-\dfrac{\sin x_n+x_n-9}{\cos x_n +1}$$

I would make the first guess to be $9$ because $9\approx 3\pi$ and sort of satisfies the equation with this bad approximation. Anyways the solution juggles around a bit before coming close to its actual solution that is approximately $8.013$.

$$\begin{array}{|p{3cm}||p{3cm}|p{3cm}|p{3cm}|}\hline n & x_n \\ \hline 0 & 9 \\ 1 & 4.36266794545 \\ 2& 12.846245078\\ 3& 10.7441080942\\ 4 &9.71164729732\\ 5 &−0.778750255328\\6&5.34415560195 \\ 7&8.14995865106\\8&7.9996375311\\9&8.01244847807\\\hline \end{array}$$

Motivation for choosing $x_0=8$. Another logic one may use to think of this first guess apart from that provided by @J.G. could be thinking in terms of bad approximations as I did in my previous approach, notice that $8\approx 2\pi +\pi/2$ which about satisfies the equation in the following manner: $\sin (2\pi +\pi/2)+2\pi+\pi/2-9\approx 1+8-9=0$. Iterations in this case converge more quickly to the actual solution than in the first approach.

0
On

Consider that you look for the zero of function $$f(x)=\sin(x)+x-9$$ As said in comments and answers, by inspection, the solution is close to $\frac {5 \pi}2$. So, let $x=t+\frac {5 \pi}2$ to get $$g(t)=t+\cos (t)+\frac{5 \pi }{2}-9$$ Now, using Taylor series around $t=0$ gives $$g(t)=\left(\frac{5 \pi }{2}-8\right)+t-\frac{t^2}{2}+O\left(t^4\right)$$ Igoring the higher order terms, you need to solve a quadratic and the solution which is the closest to $0$ is given by $$t=1-\frac{1}{2} \sqrt{20 \pi -60}\implies x=\frac {5 \pi}2+1-\frac{1}{2} \sqrt{20 \pi -60}\approx 8.01258$$ which is quite close to the exact solution.