Hi,
In the provided answers for a question set on PDE's, the following integral was solved really quickly:
Any ideas what he's actually doing? Integration by parts?
Thanks for your help![]()
Integration by parts twice, in quick succession. The first one (slowed down just a bit) goes like this:
$\displaystyle \begin{aligned}\frac2a\int_0^a\!\!\!(ax-x^2)\sin\tfrac{n\pi x}a\,dx &= \frac2a\biggl[(ax-x^2)\frac{\bigl(-\cos\tfrac{n\pi x}a\bigr)}{n\pi/a}\biggr]_0^a-\frac2a\int_0^a\!\!\!(a-2x)\frac{\bigl(-\cos\tfrac{n\pi x}a\bigr)}{n\pi/a}dx \\ &=\frac2{n\pi}\int_0^a\!\!\!(a-2x)\cos\tfrac{n\pi x}a\,dx,\end{aligned}$
because the expression in square brackets vanishes at both ends of the interval. Now you have to integrate by parts again, and the same thing happens to the expression in brackets.