∫x2(xsin⁡x+cos⁡x)2 dx\int \frac{x^2}{(x \sin x + \cos x)^2} \, dx

Answer: −xxsin⁡xcos⁡x+cos⁡2x+tan⁡x+C=−xsec⁡xxsin⁡x+cos⁡x+tan⁡x+C\frac{-x}{x \sin x \cos x + \cos^2 x} + \tan x + C = -\frac{x \sec x}{x \sin x + \cos x} + \tan x + C

Step-by-step solution

Step 1: Rewrite integrand by multiplying and dividing by cosine

To integrate by parts, we observe the derivative of the denominator term xsin⁡x+cos⁡xx \sin x + \cos x. Its derivative is ddx(xsin⁡x+cos⁡x)=xcos⁡x+sin⁡x−sin⁡x=xcos⁡x\frac{d}{dx}(x \sin x + \cos x) = x \cos x + \sin x - \sin x = x \cos x. Thus, we rewrite the numerator x2x^2 as xcos⁡x⋅(xcos⁡x)\frac{x}{\cos x} \cdot (x \cos x) so that one part is directly integrable.

Step 2: Find the integral of the second function

Let t=xsin⁡x+cos⁡xt = x \sin x + \cos x. Then dt=(xcos⁡x+sin⁡x−sin⁡x) dx=xcos⁡x dxdt = (x \cos x + \sin x - \sin x) \, dx = x \cos x \, dx. The integral becomes ∫dtt2=−1t=−1xsin⁡x+cos⁡x\int \frac{dt}{t^2} = -\frac{1}{t} = -\frac{1}{x \sin x + \cos x}.

Step 3: Apply integration by parts

Taking f(x)=xcos⁡x=xsec⁡xf(x) = \frac{x}{\cos x} = x \sec x as the first function and g(x)=xcos⁡x(xsin⁡x+cos⁡x)2g(x) = \frac{x \cos x}{(x \sin x + \cos x)^2} as the second function, we apply the integration by parts rule: ∫f(x)g(x) dx=f(x)∫g(x) dx−∫[ddxf(x)∫g(x) dx]dx\int f(x) g(x) \, dx = f(x) \int g(x) \, dx - \int \left[ \frac{d}{dx}f(x) \int g(x) \, dx \right] dx.

Step 4: Differentiate the first function and simplify the remaining integral

Differentiating f(x)=xcos⁡xf(x) = \frac{x}{\cos x} using the quotient rule gives 1⋅cos⁡x−x(−sin⁡x)cos⁡2x=cos⁡x+xsin⁡xcos⁡2x\frac{1 \cdot \cos x - x(-\sin x)}{\cos^2 x} = \frac{\cos x + x \sin x}{\cos^2 x}. Substituting this into the remaining integral leads to an exact cancellation of the factor (xsin⁡x+cos⁡x)(x \sin x + \cos x).

Step 5: Evaluate the remaining integral and conclude

The remaining integral simplifies to ∫1cos⁡2x dx=∫sec⁡2x dx=tan⁡x\int \frac{1}{\cos^2 x} \, dx = \int \sec^2 x \, dx = \tan x. Adding the constant of integration CC, we obtain the final answer.

Solve your own maths question free →