Skip to content

Cheatsheet: Trig derivatives from geometry

d/dx( sin(x) ) = cos(x)
d/dx( cos(x) ) = -sin(x)

Minus sign on cosine. Derived, not memorized.

  1. A point at angle x on the unit circle sits at (cos x, sin x). Sine and cosine are its coordinates.
  2. Radians make arc length equal angle, so nudging x by dx moves the point arc length dx: unit speed.
  3. Moving on a circle, velocity is perpendicular to position (tangent), length 1, pointing 90° counterclockwise.
  4. Rotating (a, b) by 90° CCW gives (-b, a). So velocity = (-sin x, cos x).
  5. Velocity components are the coordinates’ rates of change:
    • horizontal coord cos x changes at -sin x -> d/dx(cos x) = -sin x
    • vertical coord sin x changes at cos x -> d/dx(sin x) = cos x
xsin / its slope coscos / its slope -sin
0sin 0 = 0, slope cos 0 = 1 (climbing)cos 0 = 1 peak, slope 0 (flat)
π/2sin = 1 peak, slope cos = 0 (flat)cos = 0, slope -sin = -1 (descending)

All match the curve shapes.

  • Small-angle: near 0, sin(x) ≈ x (slope at 0 is cos 0 = 1). First sliver of Taylor series.
  • Oscillation: d²/dx²(sin x) = -sin x, so f'' = -f. This is the equation of springs, pendulums, sound, AC current, light. Why sine is everywhere in physics.

The derivation needs unit speed, which needs arc length = angle, which is the definition of a radian. In degrees the point moves at speed π/180, and every trig derivative would carry an ugly π/180. Radians make calculus on trig clean.

  • Transformer positional encodings (Vaswani et al., 2017) use sin/cos waves of different frequencies to encode token position; differentiating through them uses these derivatives.
  • 3D rotations (differentiable rendering, pose estimation) use sin/cos in rotation matrices.
  • Signal processing / Fourier decomposes signals into sin/cos components.
  • Memorizing the pair (which gets the minus?). The picture decides: cosine’s coordinate shrinks as the point climbs, so the minus is on cosine.
  • Forgetting radians. Clean derivatives hold only in radians.
  • Treating trig as a separate topic. Same nudge-and-look method as the power rule, different shape.
  • Confusing velocity with position. Position (cos x, sin x); velocity (the derivative) (-sin x, cos x).

Sine and cosine are a circling point’s coordinates, and their derivatives are its velocity, the position rotated a quarter turn, so sin -> cos and cos -> -sin.