Lemma
← All topics
Pure mathematics

Trigonometry

Angles, triangles, circles and waves.

Introduction

Trigonometry starts with triangles and grows into the language of anything that repeats: sound, light, tides, alternating current. This topic covers the sine and cosine rules for any triangle, radian measure with arc length and sector area, the graphs of sin⁡\sin, cos⁡\cos and tan⁡\tan, exact values, solving equations in a given interval, small angle approximations and the inverse functions arcsin⁡\arcsin, arccos⁡\arccos, arctan⁡\arctan. Identities and the reciprocal functions are in Trigonometric identities.

Why it matters

Surveyors find the height of a mountain from two angle measurements using the sine rule. Engineers describe rotation in radians, because then the speed of a point on a wheel is simply radius ×\times angular speed. And every periodic signal can be built from sines and cosines, which is the basis of music compression and Wi-Fi.

Intuitive explanation

IntuitionThe unit circle

Walk anticlockwise round a circle of radius 1, starting at (1,0)(1, 0). After turning through angle θ\theta you are at the point (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta). This one picture explains everything: why sin⁡2θ+cos⁡2θ=1\sin^2\theta + \cos^2\theta = 1 (Pythagoras), why the graphs repeat every 360°360°, and which quadrants make each function positive.

IntuitionRadians measure angle by distance

One radian is the angle at which the arc length equals the radius. A full turn is an arc of 2πr2\pi r, so 360°=2π360° = 2\pi radians. Measuring angles this way makes arc=rθ\text{arc} = r\theta and makes calculus with trig functions work cleanly.

Formal definitions

DefinitionTrigonometric functions of any angle

For the point PP at angle θ\theta on the unit circle, cos⁡θ\cos\theta is its xx-coordinate, sin⁡θ\sin\theta its yy-coordinate, and tan⁡θ=sin⁡θcos⁡θ\tan\theta = \dfrac{\sin\theta}{\cos\theta} for cos⁡θ≠0\cos\theta \neq 0.

DefinitionRadian

π radians=180°\pi \text{ radians} = 180°, so 1 rad=180°π≈57.3°1 \text{ rad} = \dfrac{180°}{\pi} \approx 57.3°.

DefinitionInverse functions

arcsin⁡x\arcsin x is the angle in [−π2,π2]\left[-\frac\pi2, \frac\pi2\right] whose sine is xx; arccos⁡x\arccos x is in [0,π][0, \pi]; arctan⁡x\arctan x is in (−π2,π2)\left(-\frac\pi2, \frac\pi2\right).

Notation

  • sin⁡2θ\sin^2\theta means (sin⁡θ)2(\sin\theta)^2; but sin⁡−1θ\sin^{-1}\theta means arcsin⁡θ\arcsin\theta, not 1sin⁡θ\frac{1}{\sin\theta}.
  • In triangle ABCABC, side aa is opposite angle AA, and so on.
  • Angles in radians are often written without units: θ=π3\theta = \frac\pi3.

Key formulae

IdentitiesTriangles
asin⁡A=bsin⁡B=csin⁡C,a2=b2+c2−2bccos⁡A,Area=12absin⁡C\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}, \qquad a^2 = b^2 + c^2 - 2bc\cos A, \qquad \text{Area} = \tfrac12 ab\sin C
IdentitiesArcs and sectors (θ\theta in radians)
s=rθ,A=12r2θs = r\theta, \qquad A = \tfrac12 r^2\theta
IdentitiesExact values
θ\theta00π6\frac\pi6π4\frac\pi4π3\frac\pi3π2\frac\pi2
sin⁡θ\sin\theta0012\frac1222\frac{\sqrt2}232\frac{\sqrt3}211
cos⁡θ\cos\theta1132\frac{\sqrt3}222\frac{\sqrt2}212\frac1200
tan⁡θ\tan\theta0033\frac{\sqrt3}3113\sqrt3—
IdentitiesSmall angles (θ\theta in radians)
sin⁡θ≈θ,cos⁡θ≈1−θ22,tan⁡θ≈θ\sin\theta \approx \theta, \qquad \cos\theta \approx 1 - \frac{\theta^2}{2}, \qquad \tan\theta \approx \theta

Key results

TheoremSymmetries
sin⁡(180°−θ)=sin⁡θ,cos⁡(360°−θ)=cos⁡θ,tan⁡(180°+θ)=tan⁡θ\sin(180° - \theta) = \sin\theta, \quad \cos(360° - \theta) = \cos\theta, \quad \tan(180° + \theta) = \tan\theta
PropositionThe ambiguous case

When you use the sine rule to find an angle, sin⁡B=k\sin B = k has two solutions in (0°,180°)(0°, 180°): BB and 180°−B180° - B. Both can give valid triangles if the angle sum allows it.

Proofs

ProofThe sine rule

Drop the perpendicular from CC to ABAB, of height hh. Then h=bsin⁡Ah = b\sin A and h=asin⁡Bh = a\sin B, so asin⁡A=bsin⁡B\frac{a}{\sin A} = \frac{b}{\sin B}. The same with another altitude gives the third ratio.

∎
ProofThe cosine rule

Put AA at the origin and ABAB along the xx-axis, so B=(c,0)B = (c, 0) and C=(bcos⁡A,bsin⁡A)C = (b\cos A, b\sin A). Then

a2=(bcos⁡A−c)2+b2sin⁡2A=b2(cos⁡2A+sin⁡2A)−2bccos⁡A+c2=b2+c2−2bccos⁡A.a^2 = (b\cos A - c)^2 + b^2\sin^2 A = b^2(\cos^2 A + \sin^2A) - 2bc\cos A + c^2 = b^2 + c^2 - 2bc\cos A.
∎
ProofSector area

A sector of angle θ\theta is the fraction θ2π\frac{\theta}{2\pi} of the circle, so its area is θ2ππr2=12r2θ\frac{\theta}{2\pi}\pi r^2 = \frac12 r^2\theta.

∎

The limit behind the small angle approximations

Theorem

For θ\theta in radians,  lim⁡θ→0sin⁡θθ=1\ \displaystyle\lim_{\theta \to 0}\frac{\sin\theta}{\theta} = 1.

ProofSqueeze between areas

Take 0<θ<π20 < \theta < \frac\pi2 on the unit circle, with OO the centre, A=(1,0)A = (1, 0), P=(cos⁡θ,sin⁡θ)P = (\cos\theta, \sin\theta), and T=(1,tan⁡θ)T = (1, \tan\theta) where OPOP extended meets the tangent at AA. Then

triangle OAP ⊂ sector OAP ⊂ triangle OAT,\text{triangle } OAP \ \subset\ \text{sector } OAP \ \subset\ \text{triangle } OAT,

so  12sin⁡θ<12θ<12tan⁡θ\ \frac12\sin\theta < \frac12\theta < \frac12\tan\theta. Dividing by 12sin⁡θ>0\frac12\sin\theta > 0 and taking reciprocals,

cos⁡θ<sin⁡θθ<1.\cos\theta < \frac{\sin\theta}{\theta} < 1.

As θ→0+\theta \to 0^+, cos⁡θ→1\cos\theta \to 1, so the middle is squeezed to 11. Both sides are even functions, so the same holds as θ→0−\theta \to 0^-.

∎

The middle step uses the sector area 12r2θ\frac12 r^2\theta, which is only true in radians. That is the real reason calculus with trig functions is done in radians: in degrees the limit would be π180\frac{\pi}{180}, and ddxsin⁡x\frac{d}{dx}\sin x would be π180cos⁡x\frac{\pi}{180}\cos x.

ProofArea =12absin⁡C= \frac12ab\sin C

The height from AA to side BC=aBC = a is bsin⁡Cb\sin C (from the right-angled triangle with hypotenuse bb). Area =12×base×height=12absin⁡C= \frac12 \times \text{base} \times \text{height} = \frac12 ab\sin C. If CC is obtuse the foot of the altitude lies outside the triangle, and the height is bsin⁡(180°−C)=bsin⁡Cb\sin(180° - C) = b\sin C, so the formula still holds.

∎

Methods

MethodSolving sin⁡(ax+b)=k\sin(ax + b) = k in an interval
  1. Adjust the interval: if 0≤x≤2π0 \le x \le 2\pi, then b≤ax+b≤2πa+bb \le ax + b \le 2\pi a + b.
  2. Find the principal value with arcsin⁡k\arcsin k.
  3. Use symmetry to list all solutions for ax+bax + b in the adjusted interval.
  4. Undo the transformation to get xx.
MethodWhich rule for a triangle?
  • Two angles and a side, or two sides and a non-included angle: sine rule.
  • Three sides, or two sides and the included angle: cosine rule.
MethodSegment area

Segment == sector −- triangle =12r2θ−12r2sin⁡θ=12r2(θ−sin⁡θ)= \frac12 r^2\theta - \frac12 r^2\sin\theta = \frac12 r^2(\theta - \sin\theta).

Examples

ExampleConverting angles

135°=135×π180=3π4135° = 135 \times \frac{\pi}{180} = \frac{3\pi}{4}, and 5π6=150°\frac{5\pi}{6} = 150°.

The Worked examples tab has full solutions on triangles, sectors, equations and small angles.

Common mistakes

Common mistakeCalculator in the wrong mode

Arc length and sector formulas need radians. Check your calculator.

Common mistakeMissing solutions

sin⁡x=0.5\sin x = 0.5 for 0≤x≤2π0 \le x \le 2\pi has two solutions, π6\frac\pi6 and 5π6\frac{5\pi}{6}. A sketch shows you every one.

Common mistakeNot adjusting the interval

For cos⁡2x=12\cos 2x = \frac12, 0≤x≤π0 \le x \le \pi, solve for 2x2x in [0,2π][0, 2\pi] first, then halve.

Common mistakeIgnoring the ambiguous case

If the question says "there are two possible triangles", find both angles.

Common mistakeDividing by cos⁡x\cos x or sin⁡x\sin x

Factorise instead, otherwise you lose solutions where that function is zero.

Applications

  • Navigation and surveying: bearings problems use the sine and cosine rules.
  • Engineering: angular velocity ω\omega in rad/s gives linear speed v=rωv = r\omega.
  • Physics: small angle approximations give the period of a pendulum, 2πl/g2\pi\sqrt{l/g}.

Connections

Summary

  • Sine rule, cosine rule, area 12absin⁡C\frac12ab\sin C; watch the ambiguous case.
  • π\pi rad =180°= 180°; arc rθr\theta; sector 12r2θ\frac12 r^2\theta.
  • Know exact values at π6,π4,π3\frac\pi6, \frac\pi4, \frac\pi3 and the shapes of the graphs.
  • Equations: adjust the interval, find the principal value, use symmetry, transform back.
  • Small angles: sin⁡θ≈θ\sin\theta \approx \theta, cos⁡θ≈1−θ22\cos\theta \approx 1 - \frac{\theta^2}2, tan⁡θ≈θ\tan\theta \approx \theta.

Worked examples

Try each one yourself first, then open the solution.

Example 1Cosine rule for an angle

A triangle has sides 55, 77 and 88. Find the largest angle.

Show the solution
  1. 1Largest angle is opposite the longest side

    Let c=8c = 8 be opposite angle CC.

  2. 2Rearranged cosine rule

    cos⁡C=52+72−822×5×7=1070=17\cos C = \dfrac{5^2 + 7^2 - 8^2}{2 \times 5 \times 7} = \dfrac{10}{70} = \dfrac17.

  3. 3Angle

    C=arccos⁡17=81.8°C = \arccos\tfrac17 = 81.8° (1 d.p.).

Answer

81.8°81.8°

Example 2The ambiguous case

In triangle ABCABC, AB=10AB = 10 cm, BC=7BC = 7 cm and angle A=40°A = 40°. Find the two possible values of angle CC.

Show the solution
  1. 1Sine rule

    sin⁡C10=sin⁡40°7⇒sin⁡C=10sin⁡40°7=0.9183\dfrac{\sin C}{10} = \dfrac{\sin 40°}{7} \Rightarrow \sin C = \dfrac{10\sin40°}{7} = 0.9183.

  2. 2First solution

    C=arcsin⁡0.9183=66.7°C = \arcsin 0.9183 = 66.7°.

  3. 3Second solution

    C=180°−66.7°=113.3°C = 180° - 66.7° = 113.3°. Check: 40°+113.3°<180°40° + 113.3° < 180°, so both triangles exist.

Answer

C=66.7°C = 66.7° or 113.3°113.3°

Example 3Area from two sides and an angle

Find the area of triangle PQRPQR with PQ=6PQ = 6, PR=9PR = 9 and ∠QPR=30°\angle QPR = 30°.

Show the solution
  1. 1Formula

    Area =12×PQ×PR×sin⁡P= \tfrac12 \times PQ \times PR \times \sin P.

  2. 2Evaluate

    12×6×9×12=13.5\tfrac12 \times 6 \times 9 \times \tfrac12 = 13.5.

Answer

13.513.5 square units

Example 4Arc, sector and segment

A sector of a circle of radius 66 cm has angle 1.21.2 radians. Find the arc length, sector area and segment area.

Show the solution
  1. 1Arc length

    s=rθ=6×1.2=7.2s = r\theta = 6 \times 1.2 = 7.2 cm.

  2. 2Sector area

    12r2θ=12×36×1.2=21.6\tfrac12 r^2\theta = \tfrac12 \times 36 \times 1.2 = 21.6 cm2^2.

  3. 3Segment

    Triangle: 12×36×sin⁡1.2=16.78\tfrac12 \times 36 \times \sin 1.2 = 16.78 cm2^2. Segment =21.6−16.78=4.82= 21.6 - 16.78 = 4.82 cm2^2.

Answer

7.27.2 cm, 21.621.6 cm², 4.824.82 cm²

Example 5An equation with a multiple angle

Solve sin⁡2x=32\sin 2x = \dfrac{\sqrt3}{2} for 0≤x≤2π0 \le x \le 2\pi.

Show the solution
  1. 1Adjust the interval

    0≤2x≤4π0 \le 2x \le 4\pi.

  2. 2Principal value and symmetry

    2x=π32x = \frac\pi3 or π−π3=2π3\pi - \frac\pi3 = \frac{2\pi}3, then add 2π2\pi: 7π3,8π3\frac{7\pi}{3}, \frac{8\pi}3.

  3. 3Halve

    x=π6,π3,7π6,4π3x = \frac\pi6, \frac\pi3, \frac{7\pi}6, \frac{4\pi}3.

Answer

x=π6,π3,7π6,4π3x = \frac\pi6, \frac\pi3, \frac{7\pi}6, \frac{4\pi}3

Example 6A quadratic in cos

Solve 2cos⁡2θ−cos⁡θ−1=02\cos^2\theta - \cos\theta - 1 = 0 for 0°≤θ<360°0° \le \theta < 360°.

Show the solution
  1. 1Factorise

    (2cos⁡θ+1)(cos⁡θ−1)=0(2\cos\theta + 1)(\cos\theta - 1) = 0.

  2. 2cos⁡θ=1\cos\theta = 1

    θ=0°\theta = 0°.

  3. 3cos⁡θ=−12\cos\theta = -\frac12

    θ=120°\theta = 120° or 240°240°.

Answer

θ=0°,120°,240°\theta = 0°, 120°, 240°

Example 7Using tan

Solve 3sin⁡x=cos⁡x3\sin x = \cos x for −180°<x≤180°-180° < x \le 180°.

Show the solution
  1. 1Divide by cos⁡x\cos x

    cos⁡x=0\cos x = 0 would force sin⁡x=0\sin x = 0 too, which is impossible, so dividing is safe: tan⁡x=13\tan x = \tfrac13.

  2. 2Principal value

    x=18.4°x = 18.4°.

  3. 3Period of tan

    x=18.4°−180°=−161.6°x = 18.4° - 180° = -161.6°.

Answer

x=18.4°x = 18.4° or −161.6°-161.6°

Example 8Small angle approximation

For small θ\theta, find an approximation for 1−cos⁡4θθsin⁡θ\dfrac{1 - \cos 4\theta}{\theta\sin\theta}.

Show the solution
  1. 1Approximate each part

    cos⁡4θ≈1−(4θ)22=1−8θ2\cos4\theta \approx 1 - \frac{(4\theta)^2}{2} = 1 - 8\theta^2, and sin⁡θ≈θ\sin\theta \approx \theta.

  2. 2Substitute

    1−(1−8θ2)θ×θ=8θ2θ2\dfrac{1 - (1 - 8\theta^2)}{\theta \times \theta} = \dfrac{8\theta^2}{\theta^2}.

  3. 3Simplify

    =8= 8.

Answer

88

Beyond the specification

University-level ideas and the deeper mathematics behind this topic. Not needed for exams, but this is where the subject really opens up.

Defining sine and cosine without triangles (university)

"The yy-coordinate of a point on the unit circle" relies on a notion of angle, which itself relies on arc length, which needs calculus. Analysts break the circle by defining the functions by power series:

sin⁡x=∑n=0∞(−1)nx2n+1(2n+1)!,cos⁡x=∑n=0∞(−1)nx2n(2n)!.\sin x = \sum_{n=0}^{\infty}\frac{(-1)^nx^{2n+1}}{(2n + 1)!}, \qquad \cos x = \sum_{n=0}^{\infty}\frac{(-1)^nx^{2n}}{(2n)!}.

Both converge for every real (indeed complex) xx, by the ratio test.

TheoremEverything follows from the series
  1. sin⁡′=cos⁡\sin' = \cos and cos⁡′=−sin⁡\cos' = -\sin (differentiate term by term).
  2. sin⁡2x+cos⁡2x=1\sin^2x + \cos^2x = 1, since its derivative is 2sin⁡cos⁡−2cos⁡sin⁡=02\sin\cos - 2\cos\sin = 0 and its value at 00 is 11.
  3. The addition formulae, by showing that f(x)=sin⁡(x+y)−sin⁡xcos⁡y−cos⁡xsin⁡yf(x) = \sin(x + y) - \sin x\cos y - \cos x\sin y satisfies f′′=−ff'' = -f with f(0)=f′(0)=0f(0) = f'(0) = 0, hence f≡0f \equiv 0.
Definitionπ\pi, analytically

cos⁡0=1\cos 0 = 1 and cos⁡2=1−2+23−445+⋯<0\cos 2 = 1 - 2 + \frac23 - \frac{4}{45} + \cdots < 0, so cos⁡\cos has a zero in (0,2)(0, 2). Define π2\frac\pi2 to be the smallest positive zero of cos⁡\cos. From the addition formulae, sin⁡\sin and cos⁡\cos then have period 2π2\pi, and the map t↦(cos⁡t,sin⁡t)t \mapsto (\cos t, \sin t) runs once round the unit circle at unit speed, so 2π2\pi really is the circumference.

IntuitionEuler's formula

Put ixix into the exponential series and separate the real and imaginary parts:

eix=cos⁡x+isin⁡x.e^{ix} = \cos x + i\sin x.

So the trigonometric functions are the exponential function looked at sideways. Every identity in this topic is a consequence of ei(a+b)=eiaeibe^{i(a+b)} = e^{ia}e^{ib}. For instance, taking imaginary parts gives sin⁡(a+b)=sin⁡acos⁡b+cos⁡asin⁡b\sin(a + b) = \sin a\cos b + \cos a\sin b.

The small angle approximations are just the first terms of these series: sin⁡θ=θ−θ36+⋯\sin\theta = \theta - \frac{\theta^3}{6} + \cdots and cos⁡θ=1−θ22+θ424−⋯\cos\theta = 1 - \frac{\theta^2}{2} + \frac{\theta^4}{24} - \cdots. The error in sin⁡θ≈θ\sin\theta \approx \theta is at most ∣θ∣36\frac{|\theta|^3}{6} (alternating series bound): for θ=0.1\theta = 0.1, less than 0.00020.0002.

Trigonometry on a sphere (university)

On the surface of a sphere the "straight lines" are great circles (circles whose centre is the centre of the sphere), and a triangle's sides are arcs of great circles. On a unit sphere a side's length is the angle it subtends at the centre.

TheoremSpherical cosine rule

For a spherical triangle with sides aa, bb, cc (as central angles) and angle CC opposite cc:

cos⁡c=cos⁡acos⁡b+sin⁡asin⁡bcos⁡C.\cos c = \cos a\cos b + \sin a\sin b\cos C.
ProofUsing vectors

Put CC at the north pole, c=(0,0,1)\mathbf c = (0, 0, 1), with AA and BB at polar angles bb and aa and longitudes differing by the angle CC:

a=(sin⁡b,0,cos⁡b),b=(sin⁡acos⁡C,sin⁡asin⁡C,cos⁡a).\mathbf a = (\sin b, 0, \cos b), \qquad \mathbf b = (\sin a\cos C, \sin a\sin C, \cos a).

The side cc is the angle between the unit vectors a\mathbf a and b\mathbf b, so cos⁡c=a⋅b=sin⁡asin⁡bcos⁡C+cos⁡acos⁡b\cos c = \mathbf a \cdot \mathbf b = \sin a\sin b\cos C + \cos a\cos b.

∎
IntuitionThe plane is a tiny sphere

For a small triangle, use cos⁡x≈1−x22\cos x \approx 1 - \frac{x^2}{2} and sin⁡x≈x\sin x \approx x:

1−c22≈(1−a22)(1−b22)+abcos⁡C.1 - \tfrac{c^2}{2} \approx \left(1 - \tfrac{a^2}{2}\right)\left(1 - \tfrac{b^2}{2}\right) + ab\cos C.

Dropping the fourth-order term gives c2≈a2+b2−2abcos⁡Cc^2 \approx a^2 + b^2 - 2ab\cos C: the ordinary cosine rule. Flat trigonometry is the small-triangle limit of spherical trigonometry.

ExampleGreat-circle distance

London (51.5°51.5°N, 0.1°0.1°W) to New York (40.7°40.7°N, 74.0°74.0°W). Take CC as the North Pole: a=90°−51.5°=38.5°a = 90° - 51.5° = 38.5°, b=90°−40.7°=49.3°b = 90° - 40.7° = 49.3°, C=73.9°C = 73.9°. Then cos⁡c=cos⁡38.5°cos⁡49.3°+sin⁡38.5°sin⁡49.3°cos⁡73.9°=0.5103+0.1309=0.6412\cos c = \cos38.5°\cos49.3° + \sin38.5°\sin49.3°\cos73.9° = 0.5103 + 0.1309 = 0.6412, so c=50.1°=0.875c = 50.1° = 0.875 rad, and the distance is 6371×0.875≈55706371 \times 0.875 \approx 5570 km. Flights follow this arc, which is why they head north over Ireland.

TheoremGirard (1629)

The angles of a spherical triangle on a sphere of radius RR add up to more than π\pi, and the excess measures its area:  A+B+C−π=AreaR2\ A + B + C - \pi = \dfrac{\text{Area}}{R^2}.

For example, the triangle with vertices at the North Pole and two points on the equator a quarter-turn apart has three right angles: excess π2\frac\pi2, area π2R2\frac\pi2R^2, one eighth of the sphere ✓. Curvature is detected by angle sums: this is the starting point of differential geometry and of general relativity.

Every periodic signal is a sum of sines: Fourier series (university)

A function ff with period 2π2\pi can (under mild conditions) be written as

f(x)=a02+∑n=1∞(ancos⁡nx+bnsin⁡nx).f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left(a_n\cos nx + b_n\sin nx\right).
TheoremOrthogonality

For positive integers m,nm, n:

∫−ππsin⁡mxsin⁡nx dx=∫−ππcos⁡mxcos⁡nx dx={πm=n0m≠n,∫−ππsin⁡mxcos⁡nx dx=0.\int_{-\pi}^{\pi}\sin mx\sin nx\,dx = \int_{-\pi}^{\pi}\cos mx\cos nx\,dx = \begin{cases}\pi & m = n\\ 0 & m \ne n\end{cases}, \qquad \int_{-\pi}^{\pi}\sin mx\cos nx\,dx = 0.
Proof

Use the product-to-sum identity sin⁡mxsin⁡nx=12[cos⁡(m−n)x−cos⁡(m+n)x]\sin mx\sin nx = \frac12[\cos(m - n)x - \cos(m + n)x]. Over a whole number of periods, ∫cos⁡kx dx=0\int\cos kx\,dx = 0 unless k=0k = 0. The other two are the same idea.

∎

Orthogonality acts like a dot product: to find a coefficient, "project" onto that wave. Multiplying the series by sin⁡nx\sin nx and integrating kills every term but one:

bn=1π∫−ππf(x)sin⁡nx dx,an=1π∫−ππf(x)cos⁡nx dx.b_n = \frac1\pi\int_{-\pi}^{\pi}f(x)\sin nx\,dx, \qquad a_n = \frac1\pi\int_{-\pi}^{\pi}f(x)\cos nx\,dx.
ExampleThe square wave

Let f(x)=1f(x) = 1 for 0<x<π0 < x < \pi and f(x)=−1f(x) = -1 for −π<x<0-\pi < x < 0. It is odd, so every an=0a_n = 0, and

bn=2π∫0πsin⁡nx dx=2(1−cos⁡nπ)nπ={4nπn odd0n even.b_n = \frac2\pi\int_0^\pi\sin nx\,dx = \frac{2(1 - \cos n\pi)}{n\pi} = \begin{cases}\frac{4}{n\pi} & n \text{ odd}\\ 0 & n \text{ even.}\end{cases}

So  f(x)=4π(sin⁡x+sin⁡3x3+sin⁡5x5+⋯ )\ f(x) = \dfrac4\pi\left(\sin x + \dfrac{\sin3x}{3} + \dfrac{\sin5x}{5} + \cdots\right). Putting x=π2x = \frac\pi2 gives Leibniz's series:  1−13+15−17+⋯=π4\ 1 - \frac13 + \frac15 - \frac17 + \cdots = \frac\pi4.

IntuitionGibbs' phenomenon

Partial sums of the square wave overshoot the jump by about 9%9\% of its size, however many terms are used. The overshoot gets narrower but never shorter. It shows up as "ringing" near sharp edges in compressed images and audio.

Fourier's idea, made in 1807 to solve the heat equation, now underlies MP3 and JPEG compression, MRI scanners, and the analysis of every kind of wave. The same orthogonality argument works for many families of functions, and the general theory, Hilbert spaces, is the mathematical setting of quantum mechanics.

Why does this work?

Why does this work?Why must calculus use radians?

ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x relies on sin⁡hh→1\frac{\sin h}{h} \to 1, which is true only when hh is in radians: in a unit circle, the arc of angle hh has length hh, and the chord's half-height sin⁡h\sin h becomes indistinguishable from the arc as h→0h \to 0. In degrees, ddxsin⁡x°=π180cos⁡x°\frac{d}{dx}\sin x° = \frac{\pi}{180}\cos x°: an ugly constant appears.

Beyond the syllabus

Beyond the syllabusFourier series: every periodic signal is built from sines

Under mild conditions a 2π2\pi-periodic function can be written f(x)=a02+∑n=1∞(ancos⁡nx+bnsin⁡nx)f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty(a_n\cos nx + b_n\sin nx), with an=1π∫−ππf(x)cos⁡nx dxa_n = \frac1\pi\int_{-\pi}^{\pi}f(x)\cos nx\,dx and bn=1π∫−ππf(x)sin⁡nx dxb_n = \frac1\pi\int_{-\pi}^\pi f(x)\sin nx\,dx. The formulas work because the functions sin⁡nx\sin nx and cos⁡nx\cos nx are orthogonal: ∫−ππsin⁡mxsin⁡nx dx=0\int_{-\pi}^\pi\sin mx\sin nx\,dx = 0 for m≠nm \ne n, like perpendicular vectors.

For the square wave the coefficients are bn=4nπb_n = \frac{4}{n\pi} for odd nn. Putting x=π2x = \frac\pi2 gives Leibniz's series 1−13+15−⋯=π41 - \frac13 + \frac15 - \dots = \frac\pi4.

Mathematical curiosities

Mathematical curiosityViète's infinite product (1593)
2π=22⋅2+22⋅2+2+22⋯\frac2\pi = \frac{\sqrt2}{2}\cdot\frac{\sqrt{2 + \sqrt2}}{2}\cdot\frac{\sqrt{2 + \sqrt{2 + \sqrt2}}}{2}\cdots

It comes from repeatedly applying sin⁡x=2sin⁡x2cos⁡x2\sin x = 2\sin\frac x2\cos\frac x2, the first infinite product in mathematics.

Further exploration

Further explorationInvestigations
  • Prove Ptolemy's theorem: for a cyclic quadrilateral, the product of the diagonals equals the sum of the products of opposite sides. Deduce sin⁡(A+B)\sin(A + B).
  • Find the exact value of cos⁡36°\cos 36° using a regular pentagon.
Now practise60 questions from Very easy to Extreme →