On this page
If a JEE or board paper asks for the integral of sin⁶x from 0 to π/2, you do not need to integrate by parts three times. Wallis's formula gives the answer in one line, and it also covers sinᵐx cosⁿx and the limits 0 to π.
What is the value of the integral of sinⁿx from 0 to π/2?
Wikipedia's article on Wallis' integrals defines Wₙ as the integral of sinⁿx from 0 to π/2 and notes that the integral of cosⁿx over that range is equal. So you can swap sin for cos.
Integrating by parts once gives the recurrence Wₙ = ((n − 1)/n) × Wₙ₋₂, with W₀ = π/2 and W₁ = 1. Applying it repeatedly gives:
n even: Wₙ = [(n − 1)(n − 3) … 3 · 1] / [n(n − 2) … 4 · 2] × π/2
n odd: Wₙ = [(n − 1)(n − 3) … 4 · 2] / [n(n − 2) … 5 · 3] × 1
Wolfram MathWorld writes this as (n − 1)!!/n!!, times π/2 for even n and 1 for odd n, where n!! multiplies every second number from n downwards. For example:
Integral of sin⁶x from 0 to π/2 = (5 · 3 · 1)/(6 · 4 · 2) × π/2 = 15/48 × π/2 = 5π/32.
Integral of cos⁷x from 0 to π/2 = (6 · 4 · 2)/(7 · 5 · 3) = 48/105 = 16/35.
Why does π/2 appear only for even powers?
Each use of the recurrence lowers the power by 2. An even power works down to W₀, the integral of 1 from 0 to π/2, which is π/2. An odd power works down to W₁, the integral of sin x from 0 to π/2, which is 1.
How do you integrate sinᵐx cosⁿx from 0 to π/2?
The Beta function can be written as B(a, b) = 2 × the integral of sin^(2a − 1)θ cos^(2b − 1)θ from 0 to π/2, with B(a, b) = Γ(a)Γ(b)/Γ(a + b). For whole-number powers, this works out to the form used in exams:
Integral of sinᵐx cosⁿx from 0 to π/2 = [(m − 1)(m − 3) …] × [(n − 1)(n − 3) …] / [(m + n)(m + n − 2) …] × K
Each bracket stops at 1 or 2. K = π/2 only when m and n are both even; otherwise K = 1. If m or n is 0, use the single-power formula above.
sin⁴x cos²x: numerator (3 · 1)(1) = 3, denominator 6 · 4 · 2 = 48. Both powers are even, so K = π/2. Answer: 3/48 × π/2 = π/32.
sin⁵x cos³x: numerator (4 · 2)(2) = 16, denominator 8 · 6 · 4 · 2 = 384. Both powers are odd, so K = 1. Answer: 16/384 = 1/24.
For the antiderivatives behind these results, read our explainer on integrating powers of sin and cos in the odd and even cases.
How do you extend the Wallis formula to 0 to π?
Use a symmetry property from the Class 12 chapter on integrals: the integral of f(x) from 0 to 2a equals twice the integral from 0 to a when f(2a − x) = f(x), and equals 0 when f(2a − x) = −f(x) (see these CBSE Class 12 integrals notes). Take a = π/2. Since sin(π − x) = sin x and cos(π − x) = −cos x:
The integral of sinⁿx from 0 to π is 2Wₙ. Example: sin⁵x gives 2 × 8/15 = 16/15.
The integral of cosⁿx from 0 to π is 2Wₙ for even n and 0 for odd n. Example: cos⁴x gives 2 × 3π/16 = 3π/8.
The integral of sinᵐx cosⁿx from 0 to π is 0 when n is odd, and twice the 0-to-π/2 value when n is even. Example: sin³x cos²x gives 2 × 2/15 = 4/15.
For 0 to 2π and longer ranges, see our post on integrating over n periods.
A checklist for Wallis questions in exams
Check the limits. The formula needs 0 to π/2; for 0 to π, use the symmetry step first.
For 0 to π, look for an odd power of cos. If there is one, the answer is 0.
Write the numerator chains and the denominator chain, each ending at 1 or 2.
Multiply by π/2 only if every power is even.
Check that an answer from 0 to π/2 lies between 0 and π/2.
If you keep picking the wrong method, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If the symmetry properties feel shaky, the Fermi Concept Library gives every concept in mathematics its own lesson.



