# Evaluating Definite integral

1. May 14, 2013

### Saitama

1. The problem statement, all variables and given/known data
If $\displaystyle P=\int_0^{\pi} \frac{\cos x}{(x+4)^2}dx$ and $\displaystyle I=\int_0^{\pi/2} \frac{\sin (2x)}{2x+4}dx$, then the value of $P+2I-\frac{1}{\pi+4}$ is equal to

2. Relevant equations

3. The attempt at a solution
By substituting 2x=t i.e 2dx=dt, and replacing t with x, I can be rewritten as
$$I=\frac{1}{2}\int_0^{\pi} \frac{\sin x}{x+4}dx$$
$$P+2I=\int_0^{\pi} \frac{\cos x+x\sin x+4\sin x}{(x+4)^2}dx$$

How should I proceed from here?

Any help is appreciated. Thanks!

2. May 14, 2013

### CompuChip

Try computing $$\frac{d}{dx} \frac{\cos x}{x + 4}$$.

3. May 15, 2013

### Saitama

Ah yes, but how did you think of this?

So $P+2I=1/4+1/(4+\pi)$, hence the answer is $1/4$.

Thanks CompuChip!

4. May 15, 2013

### CompuChip

Having f/T² in one term and f'/T in other was a pretty big hint, which reminded me of the quotient rule
$$\left( \frac{f}{g} \right)' = \frac{f'}{g} - \frac{f g'}{g^2}$$
So I tried that hoping it would get me somewhere, and luckily it worked out exactly (if you don't get the minus signs wrong, as I initially did - there the -1/(pi + 4) was the clue that something might need to cancel out).

5. May 15, 2013

### Saitama

Thank you again! That is very helpful.