0

I'm trying to evaluate the following definite integral: $$\int_\pi^{2\pi} \frac{x^2+2}{x^3}\cos x \,dx$$ I tried integration by parts, the integral is getting only complicated with each step. Tried to apply definite integral properties, but its not getting tamed.

Zacky
  • 27,674
  • 1
    What "definite integral properties" did you apply? How did you integrate by parts? – Zacky Jan 04 '20 at 14:11
  • I tried by parts , didn't work. Tried substitution t = pi - x so that lower limit becomes 0 so that I could apply the property f(a-x) = f(x) , got stuck there. – Madavan Viswanathan Jan 04 '20 at 14:22
  • When it doesn't work once, try twice (to integrate by parts), but first split the integral in two. – Zacky Jan 04 '20 at 14:22
  • Give me a hint on choosing u and v for parts , I will try further. – Madavan Viswanathan Jan 04 '20 at 14:24
  • 1
    I already gave the hint. Split the integral in two as: $\int_{\pi}^{2\pi} \frac{\cos x}{x}dx+2\int_\pi^{2\pi} \frac{\cos x}{x^3}dx$ and now pick one integral and integrate it by parts (twice). I don't know about $u,v$ stuff, just write for the second integral $\frac{2\cos x}{x^3} =\left(-\frac{1}{x^2}\right)'\cos x$. – Zacky Jan 04 '20 at 14:27
  • ok thanks , I got this part , but since this question was asked in a competitive exam where there is not much time to work out by parts ( only approx 1 minute per question) , I thought there must be some quicker way of solving using properties like f(a-x) = f(x) ...etc , any such ideas ? - Thanks. – Madavan Viswanathan Jan 04 '20 at 14:34
  • @MadavanViswanathan: have a look at my alternative solution, I believe it is faster than applying IBP twice. – Jack D'Aurizio Jan 04 '20 at 18:04

2 Answers2

3

Split the terms $\int\limits_{\pi}^{2\pi}\frac{\cos x}{x}+\frac{2\cos x}{x^3}dx$

Applying the integration by parts on the first term repeatedly will generate the second term and they will cancel out.

$I=C+\int\limits_{\pi}^{2\pi}\frac{\sin x}{x^2}dx$ after first integration by parts.

$I'=C'-\int\limits_{\pi}^{2\pi}\frac{2\cos x}{x^3}dx$.

Evaluate $C,C'$ and the remaining term cancels out.

PythonSage
  • 1,074
  • ok thanks , I got this part , but since this question was asked in a competitive exam where there is not much time to work out by parts , I thought there must be some quicker way of solving using properties like f(a-x) = f(x) ...etc , any such ideas ? - Thanks. – Madavan Viswanathan Jan 04 '20 at 14:34
  • @MadavanViswanathan If it was asked in JEE, rest assured. I train students for JEE. This is the method. More importantly, JEE (Adv.) is not about speed. It is about accuracy. JEE(Mains) is speed oriented and this should not take more than 2 minutes of calculation. – PythonSage Jan 04 '20 at 14:39
  • @MadavanViswanathan As a thumb rule, $\int f(x)dx=\int f(a+b-x) dx$ is useful when the function is odd or even So that terms cancel out. Or if there is an algebraic expression, the terms simplify by replacing $x$ by $a+b-x$. In this case, as you can see, function is neither odd nor even. Plus the algebraic expression is already as simple as it can be. Introducing $\pi$ will only make it worse. Hence, do not try that property. Separating the terms give an immediate idea that the two terms will cancel out if I integrate by parts twice. – PythonSage Jan 04 '20 at 14:45
2

Another chance is given by guessing the form of the primitive as $a(x)\cos(x)+b(x)\sin(x)$ where $a(x),b(x)$ are ratios of polynomials$^{(*)}$. Since the derivative of such expression is $(a'+b)\cos(x)+(b'-a)\sin(x)$ we get the differential equations $a=b'$ and $(b''+b)=\frac{x^2+2}{x^3}$, for which $b(x)=\frac{1}{x}$ is clearly a solution. This leads to $$ \int_{\pi}^{2\pi}\frac{x^2+2}{x^3}\cos(x)\,dx = \left[-\frac{1}{x^2}\cos(x)+\frac{1}{x}\sin(x)\right]_{\pi}^{2\pi} = \color{red}{-\frac{5}{4\pi^2}}.$$ $(*)$ Yes, we are just reverse-engeneering the question.

Jack D'Aurizio
  • 353,855