Trigonometry

Trigonometric Substitution and Product Formulas

The area under the normal distribution ∫e^{-x²}dx is computed by switching to polar coordinates - a trick used in ML when computing normalizing constants of Bayesian models. Trigonometric substitution is the universal tool for such computations.

  • Gaussian integration: normalizing constants in Bayesian models
  • Fourier analysis: coefficients computed via integrals of products of sinusoids
  • Signal convolution: convolution through product-to-sum formulas
  • Random Fourier Features: kernel approximation in kernel machines

Предварительные знания

  • Inverse Trigonometric Functions
  • Law of Sines and Cosines

Product-to-Sum Formulas: Signals and Integrals

The Gaussian integral trick - computing ∫e^(-x²)dx via polar coordinates - gives √π. PyTorch uses this in torch.special.erf, called millions of times per training step in GELU activations (used by GPT-2, BERT, and T5). The same product-to-sum identity powers FFT-based convolutions in CNNs: O(n log n) instead of O(n²).

**Product to Sum:** sin A · cos B = ½[sin(A+B) + sin(A-B)] cos A · cos B = ½[cos(A-B) + cos(A+B)] sin A · sin B = ½[cos(A-B) - cos(A+B)] **Sum to Product:** sin A + sin B = 2·sin((A+B)/2)·cos((A-B)/2) cos A + cos B = 2·cos((A+B)/2)·cos((A-B)/2)

Practical use: computing ∫ sin(3x)·cos(2x) dx. Direct integration is hard; through the product formula it becomes trivial: ½∫[sin(5x) + sin(x)] dx = -cos(5x)/10 - cos(x)/2 + C.

Using the product-to-sum formula, what is ∫₀^π sin(3x)·cos(2x) dx?

sin(3x)·cos(2x) = ½[sin(5x) + sin(x)]. Integrating: ½∫₀^π [sin(5x) + sin(x)] dx = ½[−cos(5x)/5 − cos(x)]₀^π = ½[(1/5 + 1) − (−1/5 − 1)] = ½[6/5 + 6/5] = 6/5.

Trigonometric Substitution: Three Cases

When the integrand contains √(a²-x²), √(a²+x²), or √(x²-a²), trig substitution eliminates the radical via the Pythagorean identity. This is a standard tool in Bayesian statistics when computing normalizing constants.

**Three substitutions:** √(a²-x²): x = a·sin θ -> radical = a·cos θ √(a²+x²): x = a·tan θ -> radical = a/cos θ √(x²-a²): x = a/cos θ -> radical = a·tan θ **Key identities:** 1 - sin²θ = cos²θ 1 + tan²θ = 1/cos²θ 1/cos²θ - 1 = tan²θ

For ∫ dx/√(x²+9), which substitution is used and what is the result?

For √(a²+x²): use x = a tan θ. With a=3: x = 3 tan θ, dx = 3/cos²θ dθ, √(x²+9) = 3/cos θ. Integral = ∫ (3/cos²θ)/(3/cos θ) dθ = ∫ dθ/cos θ = ln|tan θ + sec θ| + C = ln|x/3 + √(x²+9)/3| + C = ln|x + √(x²+9)| + C.

Weierstrass Substitution: Rationalization

The substitution t = tan(θ/2) converts any rational trigonometric integral into a rational function of t. This is a universal tool: sin x = 2t/(1+t²), cos x = (1-t²)/(1+t²), dx = 2dt/(1+t²). The same principle appears in SciPy's adaptive integration routines.

Via Weierstrass substitution t = tan(x/2), how are cos x and dx expressed in terms of t?

From the double-angle formula: cos x = cos²(x/2) − sin²(x/2). Dividing numerator and denominator by cos²(x/2): cos x = (1 − tan²(x/2))/(1 + tan²(x/2)) = (1−t²)/(1+t²). For dx: x = 2 arctan(t), so dx = 2dt/(1+t²).

Key Ideas

  • sin A·cos B = ½[sin(A+B) + sin(A-B)] - product becomes sum, integral becomes elementary
  • sqrt(a²-x²): x = a·sin θ; sqrt(a²+x²): x = a·tan θ; sqrt(x²-a²): x = a/cos θ - three canonical cases
  • cos²x = (1+cos 2x)/2 - even powers of cosine integrate via this formula
  • Weierstrass t = tan(x/2): sin x = 2t/(1+t²), cos x = (1-t²)/(1+t²) - rationalizes any trig integral
  • Gaussian integral ∫e^{-x²}dx = sqrt(π) computed via polar coordinates and u = r² substitution

Related Topics

Trig substitutions connect trigonometry with calculus:

  • Inverse Trigonometric Functions — arcsin, arctan appear when back-substituting in answers
  • Spherical Trigonometry — Integration on the sphere uses the same substitutions

Связанные уроки

  • calc-11-definite
Trigonometric Substitution and Product Formulas

0

1

Sign In