Trig Derivatives

On this page we find ddxsin(x), ddxcos(x) and ddxtan(x). We use the unit-circle definitions of sin(x) and cos(x): Interpret x as an angle, and rotate that amount counter-clockwise on the unit circle starting at (1,0). Then cos(x) is the x-coordinate of the resulting point and sin(x) is the y-coordinate.

This is confusing, because x usually means the x coordinate, not an angle. To avoid this confusion, I often name the angle something like t or θ instead of x.

On this page, and in calculus in general, we don't use degrees as the unit of the angle. In fact, the resulting derivative formulas don't work if your angles are represented as degrees. Instead, we use radians, which are simply arc length on the unit circle: an angle θ, as radians, means the angle that a unit circle arc of length θ makes. For example, 360 degrees would be the unit circle's circumference 2π.

Derivatives of sin and cos, with physics

Let t represent time as seconds. Let's say you are walking around in a circle of radius 1 metre so that after t seconds of walking, the distance traveled so far is t metres. In other words, your speed is 1 metre per second.

Because the arc length is the time t, and because the radius of the circle is 1 (metre), the angle on the unit circle is t radians and so your location is (cos(t),sin(t)). The derivative of this vector is the velocity, i.e. a vector indicating in which direction and how fast you are moving: velocity vector=ddt(cos(t),sin(t))=(ddtcos(t),ddtsin(t)) So to find ddtcos(t) and ddtsin(t), for any number t, we only need to know the x and y components of the velocity vector. The velocity vector always points along the circle, because you are moving along the circle:

The length of the velocity vector is 1, because your speed is 1 (metre per second). The length of the location vector (cos(t),sin(t))=cos(t)i+sin(t)j is also 1, because you are on the unit circle. Looking at the picture, it is now clear that we can get the velocity vector by rotating the location vector 90 degrees counter-clockwise.

To figure out how to rotate a vector by 90 degrees, we first figure out how to rotate ai and bj, and then any vector ai+bj (similarly to how it's done in linear algebra). Rotating ai 90 degrees counter-clockwise gives the vector aj. With positive a, it looks like this:

With negative a, it looks like this:

Rotating bj 90 degrees counter-clockwise gives the vector bi. With positive b, the vector ends up pointing left:

With negative b, the vector ends up pointing right, but bi is still correct because b is now positive:

Any vector ai+bj rotated 90 degrees counter-clockwise is now bi+aj, because we can rotate the ai and bj parts individually.

Let's put it all together: (ddtcos(t),ddtsin(t))=velocity vector=rotate90deg(location vector)=rotate90deg(cos(t)i+sin(t)j)=rotate90deg(ai+bj),where a=cos(t) and b=sin(t)=bi+aj=(b,a)=(sin(t),cos(t)) We can now compare the x and y coordinates of the first and last vectors.

ddxsin(x)=cos(x),ddxcos(x)=sin(x)

An advantage of this derivation is that it very clearly shows why one of the derivatives has a minus in front and the other doesn't: that comes from how 90-degree rotations work. A disadvantage is that because it relies on physics, it is not convincing from a purely mathematical point of view.

Derivative of tan

Because tan(x)=sin(x)cos(x) (TODO), we can use the quotient rule and plug in the derivatives of sin(x) and cos(x) that we just derived. ddxtan(x)=ddxsin(x)cos(x)=(ddxsin(x))cos(x)sin(x)(ddxcos(x))(cos(x))2=cos(x)cos(x)sin(x)(sin(x))cos2(x)=sin2(x)+cos2(x)cos2(x) There are two ways to simplify this from here:

ddxtan(x)=tan2(x)+1=1cos2(x)

Both ways to write the derivative have their own advantages and disadvantages. You can use whichever is more convenient. For example, tan2(x)+1 is useful if you will need to compute the value of tan(x) anyway, but things like cos(x)ddxtan(x) simplify better if you write the derivative as 1cos2(x).