letx=

Calculus basics

Derivatives of sin and cos

Sine differentiates to cosine and cosine to minus sine, with x in radians.

ddxsin⁡(kx)=kcos⁡(kx), ddxcos⁡(kx)=−ksin⁡(kx)
Tangentddxtan⁡x=1cos2⁡x

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

See it move

−3−2−1123−2−112
  • At x = 1: f(x) = 0.28224, slope f′(x) = −5.94 (coral tangent). Dashed: the derivative f′.

What the symbols mean

D
the value of f′(x) at the chosen x
A
the coefficient of sin⁡(kx)
B
the coefficient of cos⁡(kx)
k
the number multiplying x inside (angular frequency)
x
the point, in radians

When to use it

Use it for anything that oscillates (springs, waves, alternating current, tides) and for finding the maxima and minima of trig expressions. The calculator differentiates Asin⁡(kx)+Bcos⁡(kx). Always work in radians: in degrees every derivative picks up an extra factor π/180.

Worked example

Find the derivative of f(x) = 2 sin(3x) at x = 1 radian (A = 2, B = 0, k = 3).

  1. For f(x)=2⁢sin⁡(3⁢x), differentiate each part: sin(kx) becomes k cos(kx) and cos(kx) becomes −k sin(kx) (chain rule).

    f′(x)=A⁢k⁢cos⁡(k⁢x)−B⁢k⁢sin⁡(k⁢x)
  2. Substitute and work it out (x in radians):

    D=2·3⁢cos⁡(3·1)−0·3⁢sin⁡(3·1)
    =6⁢cos⁡(3)−0⁢sin⁡(3)
    ≈6·(−0.989992)−0·0.14112
    ≈6·(−0.989992)−0
    ≈−5.93995
  3. Angles are in radians: the rule d/dx sin x = cos x is only true in radians (in degrees an extra factor π/180 appears).

Answer f′(1) ≈ −5.940 (that is 2 × 3 × cos 3)

Why it works

The slope of the sine curve is largest at 0, zero at the peaks and negative on the way down: exactly the pattern of cosine. Formally it follows from limh→0sin⁡hh=1, which is only true when h is measured in radians.

Common mistakes

  • Using degrees: cos⁡(3°) is not cos⁡3. Calculus with trig needs radian mode.
  • Losing the minus sign: the derivative of cos is −sin⁡.
  • Forgetting the chain-rule factor k: ddxsin⁡(3x)=3cos⁡(3x).