Accuracy of solution? 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!
 A: 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$
A: 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.
