# Alternating roots of $f(x) = \exp(x) \sin(x) -1$ and $\exp(x)\cos(x) +1$

The following is a homework problem:

Prove that between two roots of the function $f(x) = \exp(x) \sin(x) -1$ there must be at least one root of the function $\exp(x)\cos(x) +1$.

I think it is possible to prove it by simply computing the signs of the functions at $\frac{\pi}{2}k, \pi k, \frac{3\pi}{2}k, 2\pi k$. However, I’m looking for a more elegant way. It is intuitively clear that the roots of $f$ are ˋˋconverging” to the roots of $sin$ and the ones of $g$ to the ones of $cos$. Do you have any hint how to construct a nice argument based on this observation?

#### Solutions Collecting From Web of "Alternating roots of $f(x) = \exp(x) \sin(x) -1$ and $\exp(x)\cos(x) +1$"

The functions $g(x)=\sin(x)-\exp(-x)$ and $g'(x)=\cos(x)+\exp(-x)$ have the same roots as the given functions. Thus the problem reduces to the theorem of Rolle.