$$\int_0^\infty x \sin e^x \, dx$$

I have tried applying the Dirichlet test, Comparison Principle, integration by parts and substitution, but all have failed. None of these prove that the integral is divergent though, so I'm not really sure how to show that this converges/diverges.

My work:

Dirichlet: Fails, because neither $f(x)=x$ nor $g(x)=\sin e^x$ goes to zero

Comparison: Fails. $\sin e^x \le1$, therefore $\int_0^\infty x \, dx\ge \int_0^\infty x \sin e^x \, dx$. However, $\int_0^\infty x \, dx$ does not converge, so this idea is unhelpful

IBP: $\int_a^b FG'=(F(b)G(b)-F(a)G(a))-\int_a^bGF'$ $$F=x,\quad F'= dx,\quad G' = \sin e^x, \quad G =\text{?}$$ Substitution: $u(x)=e^x$ $du=e^x$ therefore: $$\int_0^\infty x \sin e^x \, dx=\int_0^{\infty} \ln {u(x)} \sin u(x) \, dx$$ From here, you can use IBP, resulting in: $$F=\ln(u), \quad F'=\frac 1x, \quad G'= \sin u(x), \quad G = -\cos u(x)\cdot u'(x)$$ $$-\ln u(x) \cos u(x) u'(x)|_0^\infty-\int_0^\infty \frac{-\cos u(x) u'(x)}{u(x)}$$ But I feel like this integral is far too complicated for the scope of the question. Additionally, $\ln\infty$ would go to infinity anyway, so I feel like that is not an acceptable way to solve the problem. Graphically, my calculator says that the integral should be equal to 0.411229, a number which appears to have no numerical significance. Is there any other way to integrate this function?

  • $\begingroup$ Think about what the graph of this function looks like. ${}\qquad{}$ $\endgroup$ – Michael Hardy Dec 13 '15 at 21:55
  • $\begingroup$ Try converting to an alternating series, with each half oscillation being a term in the series. $\endgroup$ – Paul Dec 13 '15 at 22:26


Let $x=\log y$. Then, $dx=\frac1y \,dy$ and


Now note that that the integrand is $\sin y$ times a function that monotonically decreases to $0$ (for $y\ge e$). Given that the integral of the sine function is bounded on any interval, finish by appealing to Abel's Test.

  • 1
    $\begingroup$ nice answer (+1), but to someone who has no experience it might be non obvious why the last integral converges. Note that without the sine it would be divergent so i think this is a quiet delicate situation $\endgroup$ – tired Dec 13 '15 at 23:06
  • $\begingroup$ @tired Thanks. Do you think I should add a link to Abel's Theorem? $\endgroup$ – Mark Viola Dec 13 '15 at 23:31
  • $\begingroup$ maybe something like that might be helpful :) $\endgroup$ – tired Dec 13 '15 at 23:33
  • 1
    $\begingroup$ @tired I added a link to a MSE post that provides a proof of the theorem. I really appreciate your suggestion! +1 -Mark $\endgroup$ – Mark Viola Dec 13 '15 at 23:42

Let $y=e^x$. Then $$ \int_0^\infty x \sin e^x \: dx=\int_1^\infty \frac{\ln y}{y}\sin y\:dy=\int_{1}^{\pi}\frac{\ln y}{y}\sin y\:dy+\sum_{n=1}^{\infty}\int_{n\pi}^{(n+1)\pi}\frac{\ln y}{y}\sin y\:dy $$ Since $\frac{\ln y}{y}\to0$ as $y\to\infty$ and is monotonic decreasing, as well as $|\int_{n\pi}^{(n+1)\pi}\sin y\:dy|=2$ $$ \sum_{n=1}^{\infty}\int_{n\pi}^{(n+1)\pi}\frac{\ln y}{y}\sin y\:dy=\sum_{n=1}^{\infty}(-1)^na_n $$ is an alternating series with $$ 2\frac{\ln (n+1)}{n+1}\leqslant a_n\leqslant 2\frac{\ln n}{n}\quad\text{and }\quad a_n=O(\frac{\ln n}{n})\to0 $$ as $n\to\infty$. So it is converges by Leibniz Criterion. Since $$ \frac{\ln n}{n}=O(\frac1{n^{1-\epsilon}}) $$ It is not absolute convergent.

  • $\begingroup$ I don't think this by itself proves that the integral converges. You need to prove that the limit of $\int_0^A$ exists as $A$ goes to infinity, and you have done it only for one subsequence $A_n$ tending to infinity. The integral of $\sin x$ from zero to infinity diverges, but the sum of integrals over $[2 \pi k, 2 \pi (k + 1)]$ converges. $\endgroup$ – Maxim Apr 2 '18 at 11:41
  • $\begingroup$ I'm saying that replacing the integral with a sum over one particular sequence of intervals doesn't prove that the integral converges even conditionally. If I replace $$\int_0^\infty (1 + e^{-x}) \sin x \,dx$$ with $$\sum_{k=0}^\infty \int_{2\pi k}^{2\pi(k+1)} (1 + e^{-x}) \sin x \,dx = \sum_{k=0}^\infty \int_{2\pi k}^{2\pi(k+1)} e^{-x} \sin x \,dx,$$ $e^{-x}$ will monotonically decrease to zero, but it doesn't prove that the integral of $(1 + e^{-x}) \sin x$ converges. Instead, Dirichlet's test should be applied to the improper integral, and then the convergence of your sum follows. $\endgroup$ – Maxim Apr 2 '18 at 19:35
  • $\begingroup$ I'm not sure what you mean by that. Uniformly convergent with respect to what parameter? $\endgroup$ – Maxim Apr 2 '18 at 23:22
  • $\begingroup$ Sorry, it is not uniform convergent. In your example, it is not integrable, and so it can not use sum to calculate. So it has to be integrable first in order to use sum. $\endgroup$ – Math Wizard Apr 3 '18 at 7:05

$$ \int_0^{\infty} x\sin e^x dx = - \int_0^{\infty} xe^{-x}d(\cos e^x) \\ =\left[-xe^{-x}\cos e^x \right]_0^{\infty} +\int_0^{\infty}d(xe^{-x})\cos e^x \\ =\int_0^{\infty}(1-x)e^{-x}\cos e^x dx $$ and $$ \left|\int_0^{\infty}(1-x)e^{-x}\cos e^x dx \right| \lt \int_0^{\infty}xe^{-x} dx = 1 $$


If divergent means that its absolute value does not integrate, note that it is bounded from below by $1/2$ on the intervals $[\ln(2\pi n +\pi/6),\ln(2\pi n+5\pi/6)]$ ($n=1,2,\ldots$).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.