3
$\begingroup$

I have a question that asks me to get the solution to the equation $x+\arcsin(x)={\pi\over 2}$ by using a calculator. (Repeatedly pressing cos?) Then it asks to justify the accuracy of the answer. What does this mean? What am I supposed to do? Please help!

  • 0
    I've put it as an answer2011-12-09

2 Answers 2

2

For me it seem to be an exercise on the Contraction Mapping Theorem: rewrite the equation as $ x = \pi/2-\arcsin x $ so rhs is defined only on $[-1,1]$ and takes values on $[0,\pi]$. By monotone arguments we obtain that there is only one solution of the equation. Now, rewrite it as $ \arcsin x = \frac\pi2-x $ and apply $\sin$ to both sides: $ x = \cos x \quad(1) $ Geometrically it means that you reflected the graph of these functions with respect to $y=x$. Now we can apply Contraction Mapping Theorem to solve $(1)$ on $[-1,1]$. You can show using Lipschitz continuity of $\cos$ that |\cos x' - \cos x''|\leq \alpha|x'-x''| where $\alpha = \sin1<1$. Now, we put $x_0 =0$ and construct $x_{n+1} = \cos x_n$ which converges to the solution $x^* = \lim\limits_{n\to\infty}x_n$. We only need to find bounds: $ |x^*-x_n| \leq \sum\limits_{k=n}^\infty|x_{k+1}-x_k| \leq \sum\limits_{k=n}^\infty\alpha^k = \frac{\alpha^n}{1-\alpha} $ where we used that $|x_{k+1}-x_k|\leq \alpha|x_k-x_{k-1}|\leq\dots\leq\alpha^k|x_1-x_0|=\alpha^k$. By the way, $\alpha\leq 0.85$

  • 0
    @r.e.s.: A function with a multiple root is a good example. Try $f(x)=x^2$. You can be within $1E-16$ of zero for -1E-1, so the accuracy of the root is much worse than the machine epsilon.2011-12-10
1

If you wrote a program using a method you know, you can use the analysis of the method to give an answer. For example, if you use Newton-Raphson, the error is squared each step. It is not too bad an approximation then to say the error is about the square of the amount you moved in the step before you converged.

If you still get a non-zero result for $x+\arcsin(x)-{\pi\over 2}$ at your converged $x$, you can use the derivative (essentially taking one more step of Newton-Raphson) to estimate the error. I get an $x$ of about $0.739$. If you are using single precision, you have about $24$ bits of precision. You can't add anything less than $0.739*2^{-24}\approx 4.4 E-8$ to it an see any difference. If your next step should be $10^{-10}$, that is a reasonable approximation to your error.

Neither of these is rigorous, in that they are not an absolute upper bound, but they will be very close. Your function is nicely behaved near the root-no other roots nearby.

  • 0
    Can you figure out what the least significant change in $x$ is? This is the $4.4E-8$ I referred to for single precision. You can't be much more accurate than that. One way is to take your converged value and do $(x+\epsilon)-x$ and see where you get $0$. In this case you are probably accurate to that assuming your trig functions are at least that good (not necessarily true). Then if you display the fact that $f(x + \epsilon) \ne 0$ you can claim that you are good to 1 LSB.2011-12-09