Euler Hall — free maths guides

Differentiate sine and cosine

State and use the derivatives of sine and cosine. The idea in plain words, a worked example, and a check with the answers shown — part of the free Calculus I guides.

The two derivatives, and where the minus comes from

ddxsin⁡x=cos⁡x,ddxcos⁡x=−sin⁡x.\frac{d}{dx}\sin x = \cos x, \qquad \frac{d}{dx}\cos x = -\sin x.

Both follow from the definition, the addition formulas and the two limits of the previous skill. Expanding sine:

sin⁡(x+h)=sin⁡xcos⁡h+cos⁡xsin⁡h.\sin(x+h) = \sin x\cos h + \cos x\sin h.

After subtractingsin⁡x\sin x and dividing byhh:

sin⁡x⋅cos⁡h−1h+cos⁡x⋅sin⁡hh.\sin x\cdot\frac{\cos h - 1}{h} + \cos x\cdot\frac{\sin h}{h}.

The first fraction tends to00 and the second to11, leavingcos⁡x\cos x.

For cosine the same expansion iscos⁡(x+h)=cos⁡xcos⁡h−sin⁡xsin⁡h\cos(x+h) = \cos x\cos h - \sin x\sin h, and the minus sign comes from that formula, not from the function. The surviving term is−sin⁡x-\sin x.

Notice the pattern: each derivative moves the wave a quarter cycle ahead. Four derivatives return you to the start.

Why only one term survives

After dividing byhh, each of the two fractions is a limit you already know. The cosine one is zero and the sine one is one — so the expansion's cosine term drops out and its sine term passes through untouched.

That is not an accident of the algebra; it is the same statement as "sine is first order and cosine's defect is second order". The derivative of a trigonometric function is the coefficient of the first-order term in its own addition formula.

The four-fold cycle follows:sin⁡→cos⁡→−sin⁡→−cos⁡→sin⁡\sin \to \cos \to -\sin \to -\cos \to \sin. After four derivatives you are back, which is why a sine wave satisfiesy′′′′=yy'''' = y — and whyy′′=−yy'' = -y, the equation of every oscillation, holds for both sine and cosine.

Worked example: a combination, differentiated and checked

Differentiatef(x)=3sin⁡x−2cos⁡xf(x) = 3\sin x - 2\cos x and evaluate atx=0x = 0 andx=π/2x = \pi/2.

The derivative. Term by term, with the minus of cosine's derivative:

f′(x)=3cos⁡x+2sin⁡x.f'(x) = 3\cos x + 2\sin x.

Atx=0x=0.f′(0)=3⋅1+2⋅0=3f'(0) = 3\cdot1 + 2\cdot0 = 3.

Atx=π/2x=\pi/2.f′(π/2)=3⋅0+2⋅1=2f'(\pi/2) = 3\cdot0 + 2\cdot1 = 2.

Check against the values.f(0)=−2f(0) = -2 andff is rising there at rate 3, so just to the right it should be near−2+3h-2 + 3h. Ath=0.01h=0.01: 3sin⁡(0.01)−2cos⁡(0.01)≈0.03−1.9999=−1.96993\sin(0.01) - 2\cos(0.01) \approx 0.03 - 1.9999 = -1.9699, and−2+0.03=−1.97-2 + 0.03 = -1.97. Agreement to four decimal places.

A trap avoided. The derivative of−2cos⁡x-2\cos x is+2sin⁡x+2\sin x, because the minus in cosine's derivative cancels the minus of the coefficient. Sign errors here are the commonest mistake in this topic.

By the end you can
  • State and use the derivatives of sine and cosine
  • Derive both from the definition and the two trigonometric limits
  • Explain the source of the minus sign in cosine's derivative
  • Check a trigonometric derivative against the graph at one point
Check yourself

1. Differentiate2sin⁡x+3cos⁡x2\sin x + 3\cos x. 2. Evaluate that derivative atx=0x=0 andx=πx=\pi. 3. Sketch-check: iscos⁡\cos increasing or decreasing just to the right of zero, and does your derivative agree?

Answers

1.2cos⁡x−3sin⁡x2\cos x - 3\sin x. 2. At00:22. Atπ\pi:−2−0=−2-2 - 0 = -2. 3. Just right of zerocos⁡\cos is decreasing, so its slope must be negative;−sin⁡-\sin of a small positive angle is negative. Agrees.

Work out where to start — free, no accountAnswer six real questions — free, no account