Tell me more ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I really hate integration by parts, so when faced with $\int_{-\pi}^\pi x^2 \cos n x \, dx$ I tried writing it as $$\int_{-\pi}^\pi x^2 \cos n x \, dx =
\frac{d}{dn} \int_{-\pi}^\pi x \sin n x \, dx = \frac{d^2}{dn^2} \int_{-\pi}^\pi \cos n x \, dx $$1

I have done something wrong. The integrand is continuously differentiable with respect to n and I thought that was enough. How can I get differentiating under the integral sign to work?

share|improve this question
The last term should have a negative sign, but other than that I don't see what's wrong. This is not a good application of differentiation under the integral sign, though, since generally people only care about integer $n$; I would instead compute $\int_{-\pi}^{\pi} e^{tx} \cos nx \, dx$. – Qiaochu Yuan Jul 20 '11 at 15:53
Your Laplace transform example is complicated. Instead, I should just evaluate the RHS for arbitrary n, even though I just want integer n. This was for my multivariate calculus class, which I am teaching :-/ – john mangual Jul 20 '11 at 16:09

2 Answers

up vote 5 down vote accepted

It did work (except you are missing a negative sign). Remember $n$ is not always an integer, so that $$-\int_{-\pi}^\pi \cos(nx)dx=-\frac{2\sin(\pi n)}{n}.$$

Then $$\frac{d^2}{dn^2} \left(-\int_{-\pi}^\pi \cos(nx)dx\right) =\frac{d}{dn} \left( -\frac{2\pi\cos (\pi n)}{n}+\frac{2\sin(\pi n)}{n^2}\right)$$

$$=\frac{2\pi^2\sin(\pi n)}{n}-\frac{4\sin(\pi n)}{n^3}+\frac{4\pi\cos(\pi n)}{n^2}.$$

share|improve this answer

Well, if there are cases in which you can't avoid integration by parts, then please use the below formula:

  • If $u$ and $v$ are functions of $x$ and dashes denote differentiation and suffixes integration with respect to $x$, then $$\small\int uv \ dx = uv_{1} -u'v_{2}+ u''v_{3} - u'''v_{4} + \cdots + (-1)^{n-1}u^{(n-1)}v_{n} + (-1)^{n} \int u^{(n)}\cdot v_{n} \ dx$$
share|improve this answer
What do the $v_n$ stand for in your formula? – Peter Tamaroff Feb 26 '12 at 17:43
I read you answer. You clarify $v_n$ stands for integration. – Peter Tamaroff Feb 27 '12 at 18:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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