# Integrating Expression

I'm trying to integrate the following:

$$2\lambda\cdot \int_0^\infty x^2e^{-2\lambda x}$$

The answer is supposed to be $\frac 1{4\lambda^2}$ however I'm attempting to solve it via a simple double application of integration by parts and keep getting $2$.

I'm unsure how to solve this otherwise, but mostly I'm not sure why a double application of integration by parts doesn't produce the solution. I've run through my work a few times now and can't find a mistake so I feel like there must be a greater principle I'm missing. Why can't I just integrate by parts twice to nuke the first term?

My attempt at solution:

Taking the integral of the first expression, I apply integration by parts for:

$$\frac {-x^2*e^{-2\lambda x}}{2\lambda} - 2\int xe^{-2\lambda x}$$

This done, I do the same to the second term, receiving:

$$\frac {-x*e^{-2\lambda x}}{\lambda} - 2\int {e^{-2\lambda x}}$$

Evaluating the last integral and pulling it all together, accounting for sign carryover, gives me:

$$\frac {-x^2*e^{-2\lambda x}}{2\lambda} + \frac {xe^{-2\lambda}}{2\lambda} - \frac {-e^{-2\lambda x}}{\lambda}$$

As a solution to the indefinite integral. When I evaluate the boundary conditions and multiply by $2\lambda$, I get $2$.

• Ibp should work. Please add your solution (or a significant part of it), so anyone may point out the error. – The Phenotype Feb 2 '18 at 4:25
• Done, hope that's satisfactory. If not let me know and I'll fill in more. – Bookie Feb 2 '18 at 4:44

Let's first forget the $2\lambda$ in the front for the ease. It should be $$\int x^2e^{-2\lambda x}=\frac {-x^2*e^{-2\lambda x}}{2\lambda} - 2\int \frac{-xe^{-2\lambda x}}{2\lambda}$$. You forgot to keep the denominator, as it is part of the antiderivative of the $e$-part.

• Glad it was that simple of a mistake, I went back through and it works perfectly. Thank you. – Bookie Feb 2 '18 at 5:27

Hint

To make life easier, start using $x=\frac{t}{2 \lambda }$, $dx=\frac{dt}{2 \lambda }$ to make $$I=2\lambda \int x^2e^{-2\lambda x}\,dx=\frac{1}{4 \lambda ^2}\int t^2\,e^{-t}\,dt$$ Now, use two integration by parts.

The correct solution is $\lambda^{-2}/2.$ You can do it with integration by parts, but where is the fun in that?

Lets give the expression the name $\hat{I}$ and make it dependent on $\lambda$. $$\hat{I}(\lambda)=2\lambda\int_0^{\infty}x^2e^{-2\lambda x}dx.$$ Now calculate $$\frac{d\hat{I}}{d\lambda}(\lambda)=2\frac{\hat{I}(\lambda)}{\lambda}+2\lambda\int_0^{\infty}x^2(-2x)e^{-2\lambda x}dx.$$

This is called the Leibniz rule. It seems to increase the exponent of the $x$ term by one. Lets apply it in reverse such that the $x$ term gets decreased by one in the exponent. Let us try and find an integral that looks like $\hat{I}$ but has only $x$ and not $x^2$ in the exponent. Additionally we want its derivative to be equal to $\hat{I}$. You can easily see that $$\tilde{I}(\lambda)=-\lambda\int_0^{\infty}xe^{-2\lambda x}dx$$ does that except it has an additional term in its derivative.

We repeat this process one last time and get $$I(\lambda)=\frac{\lambda}{2}\int_0^{\infty}e^{-2\lambda x}dx=-\frac{\lambda}{2}$$ Then differentiate this expression so many times that you get your original integral: $$\frac{d^2 I}{d\lambda^2}(\lambda)=2\lambda\int_0^{\infty}x^2e^{-2\lambda x}dx+\frac{I(\lambda)}{\lambda^2}.$$

Finally calculate the derivatives explicitly: $$0=2\lambda\int_0^{\infty}x^2e^{-2\lambda x}dx-\frac{1}{2}\lambda^{-2}$$

• So, one more typo in a text book ! – Claude Leibovici Feb 2 '18 at 5:50