On this page
If you searched for this integral, the x in front is probably what stopped you: x sin x/(1 + cos²x) has no neat antiderivative. The way through is a property that makes the x cancel itself, followed by one substitution. The answer is π²/4.
What is the a + b − x property?
For a function integrable on [a, b], the integral of f(x) from a to b equals the integral of f(a + b − x) over the same limits; NCERT lists this as property P3 in section 7.10 of its Class 12 Mathematics Part II textbook, Chapter 7 Integrals. With the lower limit 0 it becomes P4: the integral of f(x) from 0 to a equals the integral of f(a − x) from 0 to a. Many students call it the King property.
Replacing x by a + b − x reads the same graph from the other end, so the area cannot change.
How do you evaluate x sin x/(1 + cos²x) from 0 to π, step by step?
This exact integral is Example 30 in the same chapter, solved with P4 and then t = cos x (NCERT Class 12 Mathematics, Chapter 7). Here is every step.
Name it: I = ∫₀^π x sin x/(1 + cos²x) dx.
Apply P4 with a = π. Since sin(π − x) = sin x and cos²(π − x) = cos²x, you get I = ∫₀^π (π − x) sin x/(1 + cos²x) dx.
Add the two forms. The x terms cancel: 2I = π ∫₀^π sin x/(1 + cos²x) dx, so I = (π/2) ∫₀^π sin x/(1 + cos²x) dx.
Put t = cos x, so dt = −sin x dx. When x = 0, t = 1; when x = π, t = −1. The integral becomes ∫ from −1 to 1 of dt/(1 + t²), because the minus sign from dt flips the reversed limits.
Evaluate: tan⁻¹(1) − tan⁻¹(−1) = π/4 + π/4 = π/2.
So I = (π/2) × (π/2) = π²/4, about 2.467.
Why does the x disappear?
Draw f(x) = x sin x/(1 + cos²x) and its mirror image f(π − x) across the line x = π/2, as in the graph at the top of this post. One curve leans right, the other leans left, and they enclose the same area. Their average is (π/2) sin x/(1 + cos²x): symmetric about π/2, with no x left outside the trig functions. Averaging two equal areas gives that same area, and that is all steps 2 and 3 do.
The trick works because everything except the lone x is unchanged when x becomes π − x. The general rule: if g depends only on sin x, the integral of x g(sin x) from 0 to π equals π/2 times the integral of g(sin x) over the same limits. Here 1 + cos²x = 2 − sin²x, so the integrand qualifies.
Started with parts instead? The boundary term gives π²/4, and the leftover integral of tan⁻¹(cos x) from 0 to π is 0 by P4, because it equals its own negative. You still need the property.
Where do students lose marks on this integral?
Writing cos(π − x) = cos x. It equals −cos x. Only the square is unchanged, which is why this integrand works.
Forgetting to add. After step 2 you have I on both sides; the move is I + I, not attacking the new integral directly.
Fixing only one of the two signs after t = cos x. The limits run from 1 down to −1, and dt carries a minus. Use one and drop the other and you get −π²/4, impossible for an integrand that is never negative here.
Using P4 on the wrong interval. With limits 0 to π/2 the swap is x → π/2 − x, which turns sin into cos and does not cancel the x.
If you keep reaching for the wrong method on problems like this, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Which other integrals fall to the same trick?
Each of these yields to x → π − x, then add.
∫₀^π x sin x dx. Answer: π.
∫₀^π x/(1 + sin x) dx. Answer: π, since the integral of 1/(1 + sin x) from 0 to π is 2.
∫₀^π x sin³x dx. Answer: 2π/3, since the integral of sin³x from 0 to π is 4/3.
The same swap-and-add move gives π/4 for the integral of 1/(1 + tan x) from 0 to π/2 and for sinⁿx/(sinⁿx + cosⁿx) over the same interval. For the whole set of properties and when each one helps, read our guide to the properties of definite integrals.
If the substitution step is the shaky part, the Fermi Concept Library gives every concept in mathematics its own lesson.
Tonight, work the three practice integrals without notes, then redo Example 30 from a blank page.



