Trigonometric Integral Calculator

Odd-power substitution, power reduction, and product-to-sum, the right identity chosen for you.

Trigonometric Integral Calculator

Integrating Trigonometric Products and Powers

Integrals like ∫sin³x cos²x dx, ∫sin²x dx, and ∫sin 3x cos 5x dx form a family with a shared personality: none yields to a single textbook rule, yet all fall to a small kit of identities used as preprocessing. The kit has three tools, and choosing the right one is the entire skill:

Odd power present → peel one factor for du, convert the rest with sin² + cos² = 1, substitute.
All powers even → power-reduction identities sin²x = (1 − cos 2x)/2, cos²x = (1 + cos 2x)/2.
Different frequencies (sin ax · cos bx) → product-to-sum identities.

Each maneuver converts the trig product into terms integrable by the basic rules, powers of u, or single sines and cosines of multiples of x. This calculator diagnoses the form, announces the strategy, and executes it symbolically.

How to Use This Calculator

Enter an integrand built from sine, cosine, and tangent: powers like sin(x)^3 * cos(x)^2, pure even powers like cos(x)^4, frequency products like sin(3x)*cos(5x), or tangent powers up to tan³. The steps identify which of the three strategies applies and why, show the transformed integral, and print the antiderivative, verified numerically at the end by comparing F(b) − F(a) against Simpson's rule on a test interval, so every symbolic answer carries its own receipt. The plot shows the integrand and its antiderivative together over one period.

Worked Example

∫sin³x cos²x dx. The sine power is odd, strategy one. Peel off one sin x (it will become −du), and convert the remaining sin²x = 1 − cos²x:

∫sin³x cos²x dx = ∫(1 − cos²x) cos²x · sin x dx → −∫(1 − u²)u² du, u = cos x

Now it's polynomial: −∫(u² − u⁴)du = −u³/3 + u⁵/5, giving −cos³x/3 + cos⁵x/5 + C. The odd factor's job was to be the du; the identity's job was to make everything else speak u. This two-role decomposition works for any odd power, however large, ∫sin⁷x dx runs the same play with a bigger binomial expansion, which the calculator carries out in full.

Why Even Powers Need a Different Idea

With sin²x, no factor can be spared for du, peeling one sin leaves an odd sin count that u = cos can't absorb. The escape is the power-reduction identity, which trades squares for double angles: sin²x = (1 − cos 2x)/2 integrates immediately to x/2 − sin 2x/4. Higher even powers iterate the trade (sin⁴x needs it twice), and the mixed case sin²x cos²x collapses fastest through sin x cos x = ½sin 2x. These identities are Fourier analysis in miniature: they rewrite powers as sums of pure frequencies, and "integrate each frequency separately" is exactly how the definite integrals ∫₀^π sin²x dx = π/2 that fill physics (average power of AC current!) get computed in one line.

Common Mistakes to Avoid

  • Substituting without a spare factor. u = sin x in ∫sin²x dx leaves dx unexpressed, there's no cos x dx available to become du. Substitution needs the derivative present; that's precisely what "peel an odd factor" arranges.
  • Sign slips with u = cos x. du = −sin x dx: the peeled sine brings a minus. Dropping it flips the entire answer, check by differentiating the result once, mentally.
  • Averaging away the double angle wrongly. sin²x = (1 − cos 2x)/2, not (1 − cos x)/2, the frequency doubles. The wrong identity produces an antiderivative whose derivative audibly disagrees with the integrand at x = π/2.
  • Treating sin 3x cos 5x by parts. Integration by parts loops forever here; product-to-sum resolves it in one line: sin 3x cos 5x = ½[sin 8x + sin(−2x)] = ½ sin 8x − ½ sin 2x. Frequency products want identities, not parts.

Real-World Applications

These integrals are the arithmetic of waves. The RMS (root-mean-square) voltage on every electrical panel is √(average of sin²), the power-reduction integral ∫sin²ωt dt made standard; "230 V" mains is an RMS figure, this page's mathematics in your wall. Product-to-sum integrals underwrite the orthogonality relations ∫sin mx sin nx dx = 0 for m ≠ n over a period, which are the reason Fourier series work at all: they let every signal be split into frequencies whose coefficients are computed by exactly these integrals. Radio mixers physically multiply signals of different frequencies; the resulting sum-and-difference tones are the product-to-sum identity performed by hardware.

Mechanical and optical engineering integrate trig powers in Fourier coefficients of cam profiles, in antenna radiation patterns (powers of cosines integrated over angles), and in intensity calculations where amplitude-squared means a sin² integral. And in the calculus curriculum itself, these techniques gate u-substitution mastery and set up trigonometric substitution, where integrals like ∫√(1 − x²)dx are deliberately converted into the even-power trig integrals this page solves.

Frequently Asked Questions

Both powers odd, which substitution do I take?

Either works; convention peels from the smaller odd power for lighter algebra. sin³x cos³x via u = sin (peel a cosine) gives u³(1 − u²), degree 5; via u = cos, the mirror. Answers may look different but differ by a constant, as trig identities guarantee.

How do tangent and secant integrals fit this family?

Parallel kit, different identity: 1 + tan²x = sec²x. tan²x integrates as ∫(sec²x − 1) = tan x − x; tan³x splits as tan x(sec²x − 1). Even secant powers peel sec²x for u = tan x; odd ones (the notorious ∫sec³x) need integration by parts once. This tool covers tan through tan³.

Why does my answer differ from the textbook's?

Trig antiderivatives have many equivalent costumes: −cos³x/3 + cos⁵x/5 versus a sin-based expression can differ by a constant while both being correct. The reliable check is differentiation (or this tool's numeric verification), never visual comparison of formulas.

What happens with sin(ax)cos(ax), equal frequencies?

The product-to-sum difference term sin(a−b)x degenerates to sin 0 = 0, leaving ½ sin 2ax alone, equivalently the double-angle shortcut sin ax cos ax = ½ sin 2ax. The calculator detects a = b and drops the vanishing term automatically (avoiding the 0/0 in the general formula).

Where do these integrals appear in Fourier series?

Coefficient formulas are exactly ∫f(x)·sin nx dx over a period; when f is itself trigonometric, product-to-sum evaluates them, and orthogonality (the m ≠ n integrals vanishing) is what isolates each coefficient. Every equalizer bar on a music app traces back to these integrals.

Can the tool handle sin^6 or cos^8 (large even powers)?

It tabulates even cases through fourth powers; beyond that it explains the iterated power-reduction route rather than printing pages of terms. Odd powers, by contrast, are handled at any size, the binomial expansion does the work in one pass.