I am reading the article "Some undecidable problems involving elementary functions of a real variable" by Daniel Richardson and have some problems with understanding Lemma Three :
Let $h(w)=w\sin w, g(w)=w\sin w^3$. For any $x_1$ and $x_2$ and any $\delta>0$, there is a $w\gt 0$ so that $|h(w)-x_1|< \delta$, $g(w)=x_2$
Proof :
Let $w_2$ and $w_1$ be two numbers such that
$w_2>w_1>|x_2|$,
$h(w_2)=x_1$,
$w_2^3-w_1^3>2\pi$,
$(w_2-w_1)(w_2+1)<\delta$.
Since $w_2$ and $w_1$ are greater that $|x_2|$ and since $w_2^3-w_1^3>2\pi$, there is a number $w$ between $w_1$ and $w_2$ so that $g(w)=x_2$
We want to show that $|h(w)-x_1|<\delta$
$|h(w)-x_1|=|h(w)-h(w_2)|$
$\leq (w_2-w_1)|\sin x+x\cos x|$ for some x between $w_1$ and $w_2$
$<(w_2-w_1)(w_2+1)$
$<\delta$
I am confused about this line $|h(w)-x_1|=|h(w)-h(w_2)|\leq (w_2-w_1)|\sin x+x\cos x|$
The real question is why we have $\leq (w_2-w_1)|\sin x+x\cos x|$ here? How did we get $|\sin x+x\cos x|$? Is it obtained by using mean value theorem? Can somebody explain, please?