<s>[INST] $M = \int_0^{\pi/2} \frac{\cos x}{(x+2)} dx$ and $N = \int_0^{\pi/4} \frac{\sin x \cos x}{(x+1)^2} dx$, then value of $M - N$ is? Options are :
(A) $\pi\quad$   (B) $\frac{\pi}{4}\quad$    (C) $\frac{2}{\pi + 4}\quad$   (D) $\frac{2}{\pi - 4}$
I have solved it using Taylor's expansion of the numerators. 
E.g, $\cos x = \cos ((x+2) -2) = \cos(x+2) \cos 2 + \sin(x+2) \sin 2$, then using Taylor's formula expanded $\cos(x+2)$ and $\sin(x+2)$ to get polynomials of $(x+2)$, which is in the denominator.
But due to the denominator, I am getting results in terms of log, which does not match any of the options given.
 [/INST] Using Integration by Parts, we can write N as
$$N = -\frac{\sin x\cos x}{x+1}\vert_0^{\frac{\pi}{4}}+\int_0^\frac{\pi}{4}\frac{\cos^2x-\sin^2x}{x+1}dx=-\frac{2}{\pi+4}+\int_0^{\frac{\pi}{4}}\frac{\cos2x}{x+1}dx$$
In the second integral, let $x \to 2x \implies dx \to 2dx$
$$\therefore N=-\frac{2}{\pi+4}+\int_0^\frac{\pi}{2}\frac{\cos x}{x+2}dx=-\frac{2}{\pi+4}+M$$
$$\therefore M-N=\frac{2}{\pi+4}$$

P.S Thanks to Claude Leibovici for the corrected expression.
</s>