8

Is there any way to find real root of the following equation by hand? Only need to count the number of zeros~

$$x^2-x \sin x- \cos x=0 $$

I know there's a rule for finding real roots for polynomial by counting the number of times that the sign of the coefficients changes. But how do we find real root for some function like this, without using graphing calculator?

Thanks in advance!!

Lily
  • 361
  • @Rustyn, thanks for the hint. I'm wondering if this function is bounded below by x^2−x−1 and above by x^2+x+1? and even we have the bound, why it's related to the root of the bound equation? Thank you! – Lily Oct 03 '13 at 14:28
  • The LHS is clearly an even function, $f(0) = -1$ and its derivative is positive for $x>0$, so easy to conclude there is exactly one root on each side of the y-axis. – Macavity Oct 03 '13 at 14:29
  • @Rustyn - the function is only bounded above by $x^2-x-1$ when $x<0$. It's bounded below (which is what we need, since $f(0)=-1$) by $x^2-|x|-1$. – Glen O Oct 03 '13 at 14:36

2 Answers2

3

Equations like the one you provided do not have neat explicit answers.

However, there are methods of estimating roots, and more general approaches that can help, too.

In the case of $x^2-x\sin(x)-\cos(x)=0$, we start by noticing that solutions must be small, as $x\sin(x)-\cos(x)$ is much smaller than $x^2$ in magnitude for large $x$.

As a first approximation, we notice that $\sin(x)\approx x$ for sufficiently small $x$, and thus solutions would be expected in the vicinity of the points where $x^2-x^2-\cos(x)=0$. Notice that these occur at $x=\pm \frac{\pi}2$, which is beyond the range in which $\sin(x)\approx x$.

By looking at the function again, we see that $-1\leq \sin(x)\leq 1$, and similarly for $\cos(x)$. As $x^2$ is positive, we seek values of $x\sin(x)+\cos(x)$ that are of a similar magnitude and positive. We can take, as a bound, $|x|+1$. Now, when $x^2-|x|-1=0$, we have $|x| = \frac{1\pm \sqrt{1+4}}2$, which, as it must be positive, gives $|x| = \frac{1+\sqrt{5}}2$. As such, no solution can be larger in magnitude than this. $\frac\pi2$ is slightly smaller than it.

But reasonably, we'd expect our solution to be a little closer to $0$ (since our bounds assumed both $\cos(x)=1$ and $\sin(x)=1$, so let's use $\frac\pi3$ as our estimate.

Now, we can turn to Newton's Method to get a better estimate. $f(x)=x^2-x\sin(x)-\cos(x)$, so $f'(x)=2x-x\cos(x)$. And so, our first Newton step gives

$$ x = \frac\pi3 - \frac{\frac{\pi^2}9-\frac{\pi\sqrt{3}}6-\frac12}{\frac\pi3(2-\frac12)} = \frac\pi3 - (\frac{2\pi}9-\frac{\sqrt{3}}3-\frac1\pi) = \frac\pi9 + \frac{\sqrt{3}}3+\frac1\pi\approx 1.244726 $$ At this point, $f(x)\approx 0.04988$, a reasonable approximation (given that $f(0)=-1$ and $f(\frac\pi3) \approx −0.31$).

Glen O
  • 12,425
0

Solving a "quadratic formula" hidden in the given relation by thinking of the trig functions as coefficients yields $$ x = \frac 1 2 \left(\sin x \pm \sqrt{\sin^2 x+4\cos x}\right)~~. $$ We can think of this as an iterative solver for the roots; i.e., $$ x_{n+1} = \frac 1 2 \left(\sin x_n \pm \sqrt{\sin^2 x_n+4\cos x_n}\right)~~, $$ for a suitable initial guess $x_0$. While there is no a-priori guarantee of a fixed point to converge to, taking e.g., $x_0 =0 $ and the $+$ out of $\pm$ produces the sequence $x_1 = 1$, $x_2 = 1.268$, $x_3 = 1.202$, $x_4 = 1.227$, $x_5 = 1.218$, ...

At this point the original function evaluates to about $-4.98\times 10^{-3}$, suggesting a solution. Noting that the function is even produces another solution near $-1.218$, and a standard derivative analysis precludes any other possible roots.