4

I tried to write $\cos^nx$ as $\cos {x} \cos ^{n-1}{x}$ and then integrating by parts with the first function being $\cos ^{n-1}{x}$ and the second function being $x \cos {x}$. I was able to solve upto a point but then I got stuck since I was not able to find a term which I could write as $I_{n-k}$ assuming that the integral $I_n$ is

$$\int_0^\frac{\pi}{2} x \cos ^n{x} dx$$

and $k\in\mathbb Z, k<n$. Am I taking incorrect functions to solve by parts or do I need to do any trigonometric manipulation using the limits of the integral?

Integreek
  • 8,530

3 Answers3

2

To get a recurrence for the given integral, call it $I_n$, observe that $$I_{n-2}-I_n=\int_0^{\pi/2}x\cos^{n-2}x\sin^2 x\,dx=\int_0^{\pi/2}(x\sin x)(\cos^{n-2}x\sin x)\,dx,$$ which is ready to be integrated by parts: $$I_{n-2}-I_n=\frac{1}{n-1}\int_0^{\pi/2}\cos^{n-1}x(\sin x+x\cos x)\,dx=\frac{1}{n-1}\left(\frac{1}{n}+I_{n}\right),$$ yielding $I_n=\left(1-\frac{1}{n}\right)I_{n-2}-\frac{1}{n^2}$.

metamorphy
  • 43,591
1

Set $$f(n)=\int_0^{\pi/2}x\cos^n(x)dx.$$

From here we have the useful identities $$\cos^{2n}(x)=\frac1{2^{2n}}{2n\choose n}+\frac{1}{2^{2n-1}}\sum_{k=0}^{n-1}{2n-1\choose k}\cos[2(n-k)x]$$ and $$\cos^{2n+1}(x)=\frac{1}{2^{2n}}\sum_{k=0}^{n}{2n+1\choose k}\cos[(2n-2k+1)x].$$ Instead of trying to find the general case $f(n)$, go for $f(2n)$ and $f(2n+1)$ separately. Using these identities and $\int(p_1(x)+p_2(x)+...+p_n(x))dx=\int p_1(x)dx+...+\int p_n(x)dx$, you reduce the problem to finding $$q(a)=\int_0^{\pi/2}x\cos(ax)dx,$$ which is easy once you integrate by parts. Can you take it from here?

clathratus
  • 18,002
1

Your approach is totally fine. This is because the derivative of $\cos^{n-1}x$ is $(1-n)\cos^{n-2}x\sin x$ and an antiderivative of $x\cos x$ is $x\sin x+\cos x$, which means that IBP would easily give a relation between $\mathcal I_n$ and $\mathcal I_{n-2}$ since $\sin^2x=1-\cos^2x$:

$$\mathcal I_n=(x\sin x+\cos x)\cos^{n-1}x\bigg{|}_0^\frac\pi2+(n-1)\int_0^\frac\pi2x\cos^{n-2}x\sin^2x+\cos^{n-1}x\sin x\mathrm dx$$ $$=-1+(n-1)(\mathcal I_{n-2}-\mathcal I_n)+(n-1)\int_\frac\pi2^0\cos^{n-1}x\mathrm d(\cos x)$$ $$\implies (n-1)\mathcal I_{n-2}-n\mathcal I_n-\frac1{n}=0$$ $$\therefore\boxed{\mathcal I_n=\left(\frac{n-1}{n}\right)\mathcal I_{n-2}-\frac1{n^2}}$$

Integreek
  • 8,530