This was tough. Perhaps there is a simpler method for this..I did this as follows...
As the power of terms in the numerator is higher than those in the denominator, First find the partial fractions. Then integrate.
let (π/4 + x) = y
we use the identities as below:
cos x + sin x = √2 Sin (π/4 +x)
cos x - sin x = √2 Sin (π/4 - x) = √2 Cos (π/4 + x)
(cos x - sin x)² = 2 (1 - Sin² y)
Now integrate the expression easily now. The answer is :Now you can verify this answer by differentiating and adding the terms.
I hope that is understood with not much difficulty. It seems a bit lengthy and tough.