Hi,

I was looking at some old exams in Numerical Analysis and found this question.

Show that cosx = lnx has a unique solution in $\displaystyle ]0,\pi/2]$. First of all, I think the sign $\displaystyle ]$ is a typo, and perhaps it should be $\displaystyle ($ since $\displaystyle ln0$ is $\displaystyle -\infty$. Then again, it could perhaps be a closed interval as well...

The first thing I think of is to look at the function $\displaystyle f(x) = cos(x)-ln(x)$. Now if I assume that the interval is $\displaystyle [0,\pi/2]$ then I think I could, by the intermediate value theorem show that there exists a solution. I would need to do some limit-stuff because of $\displaystyle 0$ and $\displaystyle ln(x)$...

Another thing that comes to mind is perhaps rewriting this in the following manner;

$\displaystyle

e^{cos(x)} = x \Rightarrow x - e^{cos(x)} = 0.$

If I let $\displaystyle g(x) = e^{cos(x)}$ then,

$\displaystyle

x-g(x) = 0$ if there is some number $\displaystyle \xi$ in our interval such that

$\displaystyle \xi - g(\xi) = 0$. That is, if $\displaystyle \xi$ is a fixed-point of $\displaystyle g$.

A unique fixed point exists if $\displaystyle g$ is a contraction..

Since $\displaystyle g'(x) = -sin(x)e^{cos(x)}$ we have that

$\displaystyle |g'(x)|<1$ for all $\displaystyle x$ in $\displaystyle [0,pi/2]$ and so a unique solution to our problem exists.

The problem from the exam comes with a suggested solution as well. The solution says that since the function cosx is monotonically decreasing in the given interval, and the function ln(x) is monotonically increasing in the same interval, they can only cross in one point.. I do not find this solution particularly satisfying, but what do I know.