Expressing $\int_0^{\pi/2}\frac{\sin 2x}{x+1}\,dx$ using $A = \int_0^\pi\frac{\cos x}{(x+2)^2}\,dx$ If $$A = \int_0^\pi\frac{\cos x}{(x+2)^2}\,dx,$$ 
then find the value of $$\int_0^{\pi/2}\frac{\sin 2x}{x+1}\,dx$$ in terms of $A$.

As pointed out in the comments, the substitution $x \mapsto 2x $ gives
$$ \int_0^{\pi/2} \frac{\sin 2x}{2x+2}2dx = \int_0^\pi \frac{\sin x}{x+2}dx $$
Integration by parts gives
$$ \int_0^\pi \frac{\sin x}{x+2}dx = -\frac{\cos x}{x+2}\Bigg\vert_0^\pi - \int_0^\pi \frac{\cos x}{(x+2)^2}dx = \frac{1}{\pi+2} + \frac12 - A $$
