1
$\begingroup$

So I'm trying to integrate $\int_{-\infty}^\infty{ }x^2e^{-ax^2}dx$ by parts with the formula

$$\int{udv} = uv - \int{vdu} $$

I'm selecting

$$u = x^2$$ $$du = 2xdx$$ $$ v = \sqrt{\pi/\lambda} $$ $$ dv = e^{-ax^2} dx$$

This gives me

$$\Biggr|_{-\infty}^{\infty}{x^2 \sqrt{\pi/\lambda} } - \int_{-\infty}^\infty{ } \sqrt{\pi/\lambda} * 2x dx $$

Which equates to $0$.

This particular integral has been asked about before and I know how to solve it through integration by parts the "right way", but my question is why isn't the above a "legal move"? I solved another integral by evaluating the Gaussian integral during an integration by parts set-up just like this and it gave me the correct answer. I know I'm wrong, just not why.

Edit: My apologies, made an error in the type-up that made the whole thing nonsense, had $x^2$ as a factor of $dv$ by mistake.

$\endgroup$
  • $\begingroup$ I think it must be $$a>0$$! $\endgroup$ – Dr. Sonnhard Graubner Jan 27 at 9:09
  • 3
    $\begingroup$ Your $\;v'\;$ and thus your $\;v\;$ must be actual functions', not merely numbers! If $\;v'=k\in\Bbb R\;$ , then clearly $\;v=kx\;$ ...! $\endgroup$ – DonAntonio Jan 27 at 9:09
  • $\begingroup$ @DonAntonio Why do they have to be functions? $\endgroup$ – Bookie Jan 27 at 9:12
  • $\begingroup$ @Dr. Sonnhard Graubner I don't understand what you're saying here. $\endgroup$ – Bookie Jan 27 at 9:12
  • 1
    $\begingroup$ $$\int_a^budv=(uv)\Big|_a^b-\int_a^bvdu$$You have to apply the limits to the aggregate $uv$, not to $u,v$ separately $\endgroup$ – Shubham Johri Jan 27 at 9:31
2
$\begingroup$

Assuming $\;\alpha >0\;$ , put

$$\begin{cases}u=x,&u'=1\\{}\\ v'=xe^{-\alpha x^2},&-\frac1{2\alpha}e^{-\alpha x^2}\end{cases}\;\;\;\implies\int_{-\infty}^\infty x^2 e^{-\alpha x^2}dx=\overbrace{-\left.\frac1{2\alpha}xe^{-\alpha x^2}\right|_{-\infty}^\infty}^{=0}+\frac1{2\alpha}\int_{-\infty}^\infty e^{-\alpha x^2}dx=$$

$$=\frac1{2\alpha^{3/2}}\int_{-\infty}^\infty d(\sqrt\alpha\,x)\,e^{-\left(\sqrt\alpha\,x\right)^2}=\frac{\sqrt\pi}{2\alpha^{3/2}}$$

$\endgroup$
  • $\begingroup$ Thanks for going out of your way to demonstrate the correct solution, I appreciate that. Your comment also makes sense to me now after a moment's thought on it, thanks. $\endgroup$ – Bookie Jan 27 at 9:32

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.