Prove that $\int_a^\infty f(x)\sin(e^x) \, dx$ conditionally converges. Let $f$ be a bounded and with a continuous derivative at the interval $[a,\infty)$.
The integral: $\displaystyle \int_a^\infty f(x) \, dx$ diverges. 
Also: 
$$
\exists t> a, \forall x>t: f'(x) < f(x)
$$
Prove that the $\displaystyle \int_a^\infty f(x) \sin(e^x) \, dx$ conditionally converges. 

What i tried:
So i want to show that it diverges in its absolute value and converges in its "normal" value. 
For diverges in its absolute value
We know that: 
$$
|\sin(e^x)| < 1
$$
Therefore we can write: 
$$
\int_a^\infty |f(x)| \leq \int_a^\infty |f(x)\sin(e^x)| \, dx
$$
But we know that the left integral diverges from the question, therefore, by comparison test: 
$$
\int_a^\infty |f(x)\sin(e^x)| \, dx
$$
diverges. 
Now the problem in proving converges for the "normal" function. 
I thought to use Dirichlet test, but i dont see how to say that $f(x)$ is decreasing monotonic or to talk about the limit. 
I must say it very sounds like drichlet test, but i cant see how it feets...
Couldnt think of other functions for dirichle
So i thought about the comparison test, yet couldn't think of a converging function that will fit.
In the end, i am stuck. 
Those are my homework, so i prefer a hint than a solution. 
Thank you. 
 A: I suggest to write $$f(x) \sin(e^x) = e^{-x} f(x) e^{x} \sin(e^x)$$ and to integrate by parts considering $u(x) = e^{-x} f(x)$ and $v'(x) = e^{x} \sin(e^x).$
$$\int_a^\infty f(x) \sin(e^x)\, dx = -\left[e^{-x}f(x)\cos(e^x)\right]_a^\infty + 
\int_a^\infty e^{-x}(f'(x) -f(x)) \cos(e^x)\, dx.$$
Using your assumption (I guess it is $|f'| \leq |f|$) together with the boundness of $f$, you can prove that the integral $\int_a^\infty e^{-x}(f'(x) -f(x)) \cos(e^x)\, dx$  is convergent. 
A: With your hypothesis $f'<f$ (not $|f'|<|f|$) this problem seems very tricky.  Here's a solution sketch I've been able to work out.  To show that the integral converges:


*

*First note that the convergence only depends on the behavior of $f$ at large $x$, so WLOG we can assume that $f'<f$ everywhere. 

*Then use the integration by parts and integration factor of @A.Pi's answer.

*Note that boundedness of $f$ implies that $\int_a^\infty e^{-x}f(x)\cos(e^x)dx$ converges absolutely, so we need only show that the remaining term $\int_a^\infty e^{-x}f'(x)\cos(e^x)dx$ converges.

*Define $f'_+(x):= \max\{f'(x),0\}$ and $f'_-(x):=\max\{-f'(x),0\}$, so that $f' = f'_+ - f'_-$.  Then we have $|f'(x)| = f'_+ + f'_-$ and thus $\left|\int_a^b e^{-x} f'(x) \cos(e^x) dx\right| \leq \int_a^b e^{-x} \left(f'_+ + f'_-\right) dx$.

*By boundedness of $f$, there is some $M$ such that $|f|\leq M$, and thus on any interval $[b,c]$ we have $$2M\geq |f(c)-f(b)| = \left|\int_b^c f' dx\right| = \left|\int_b^c f'_+ dx - \int_b^c f'_- dx\right|$$ Furthermore, since $f'<f\leq M$ the term $\left|\int_b^c f'_+ dx\right|\leq M(c-b)$, and thus $\int_b^c f'_- dx\leq 2M + M(c-b)$.  This is what we will use to "bound $f'$ from below", which is what makes this problem hard.

*On an interval $[a,b]$, to show that $\int_a^b e^{-x} (f'_+ + f'_-) dx$ converges as $b\rightarrow \infty$, chop up $[a,b]$ into subintervals $[a,a+1]$, $[a+1,a+2]$, $[a+2,a+3]$, $\dots$, $[a+n,b]$, where $n=\lfloor b-a \rfloor$.  The integral over $[a+k,a+k+1]$ or over $[a+n,b]$ is at most $4Me^{-a-k}$ by the bound above on $\int f'_+ dx$ and $\int f'_- dx$.  Thus the sum over these intervals converges geometrically as $k\rightarrow \infty$.  This proves the convergence we wanted to show. 



To show that the integral $\int_a^\infty \left|f(x) \sin(e^x)\right| dx$ does not converge, first note that the condition $f'<f$ implies that $f>0$, because otherwise $f$ would diverge to $-\infty$, contradicting its boundedness.  Hence the above integral is $\int f(x) |\sin(e^x)| dx$.
Now use the same $e^{\pm x}$ integration trick as before, assume WLOG that $e^a=2\pi k$ for some integer $k$ (otherwise increase $a$ a little bit to make this true), and note that 
$$\int_a^x e^y |\sin(e^y)| dy = 2n(x)+1 - (-1)^{n(x)}\cos(e^x)$$
where $n(x) = \lfloor \frac{e^x-e^a}{\pi}\rfloor$ counts how many times $\sin(e^x)$ switches sign.  Then following the same analysis as above, we find that 
$$\int_a^b |f(x) \sin(e^x)| dx = \left[e^{-x} f(x) \left(2n(x)+1 - (-1)^{n(x)}\cos(e^x)\right)\right]_a^b - \int_a^b e^{-x} (f'(x)-f(x)) \left(2n(x)+1 - (-1)^{n(x)}\cos(e^x)\right)dx$$
As $b\rightarrow \infty$, everything in the first term vanishes except $2n(b)e^{-b}f(b)$, which $\rightarrow \frac{2}{\pi}f(b)$. In the remaining integral, by similar arguments as above, everything converges absolutely except $\int_a^b 2n(x)e^{-x}(f'(x)-f(x)) dx$.  Note that $n(x) = \frac{e^x}{\pi} + \epsilon(x)$, where $\epsilon(x)$ is bounded.  Thus the preceding integral can be written as $\int_a^b \frac{2}{\pi} (f'(x)-f(x)) dx $ plus an absolutely convergent term.  $\int_a^b \frac{2}{\pi} f'(x) dx$ cancels with the $\frac{2}{\pi} f(b)$ term above, and we are left with $\frac{2}{\pi}\int_a^b f(x) dx$, which diverges by hypothesis.  
This proves that $\int_a^\infty |f(x) \sin(e^x)| dx$ diverges. 
