Derivatives of Trigonometric Functions

Engineering Context:

  • MAE: One of the most common motions seen in physics and throughout the world is harmonic motion. You see harmonic motion in a swing, a car’s suspension, and even in sound waves of musical instruments. The position of an object in harmonic motion can be mapped by a trigonometric function. The derivative of that trigonometric function will yield the velocity of the object in harmonic motion. And beyond that, the second derivative will yield the acceleration of the object in harmonic motion.

    These relationships are important to understand for cases like a reciprocating engine, similar to the one in your car or lawnmower. The engine runs by lowering a piston, sucking in a mixture of air and fuel, then igniting that fuel-air mixture in an explosion which pushes the piston back down, creating the force that travels down the driveshaft and drives your car forward. This up and down motion happens very fast and has many forces to take into account.

    The speed at which a piston moves upward or down is a limiting factor for how many revolutions per minute an engine can handle. If an engine wants higher torque, it is important for a piston to have a longer stroke. A longer stroke gives more opportunity for the piston to accelerate to a higher speed. By shortening the stroke of the piston, the top speed of the piston is lower than the top speed of a longer stroke piston, resulting in less force acting on the head of the piston and allowing for a higher RPM at the expense of torque at a lower speed.

    Increasing the RPM is very important in cars with high end power, like a Formula 1 race car. The power of an engine can be calculated by multiplying the torque with the RPM. By shortening the stroke, the RPM can be increased dramatically (from 5000 to close to 20,000 RPM).

    By mapping the position of the pistons with a trigonometric function, it is possible to take the derivative of that function and find exactly what the velocity is at each position of the piston’s stroke. The interior of the engine can be designed according to what how heavy the piston is allowed to be, how much lubricating oil is required, and how tight the tolerances must be to achieve the required power.

  • ECE: In electrical engineering, the voltage and current of AC (alternating current) circuits can be modeled by sinusoidal functions of time. In other words, the voltage and current alternate between between two polarities over time, and thus can be represented by the trigonometric functions sine and cosine. In an AC circuit with a capacitor, a principle similar to Ohm’s law states that

    i = C dv dt

    where i is the instantaneous current through the capacitor, C is the capacitance, and dv dt is the rate of change of voltage over time. Since voltage is sinusoidal in an AC circuit, solving problems using this equation involves taking dv dt , which is a derivative of a trigonometric function.

  • BE: Trigonometric functions are frequently used in the modeling of oscillatory behavior, such as the movement of a microorganism’s flagella. The movement of bacteria without flagella can also be modeled by trigonometric motion. For example, organisms known as gliding bacteria move through sinusoidal undulation of their cell envelope. Mathematical models of the movement of these bacteria involve trigonometric functions and their derivatives. These models can be used by biological engineers to analyze and predict the velocity and movement patterns of bacteria.

  • CEE: Derivatives of trigonometric functions are involved in the study of undamped forcing and resonance, which is of great importance to civil engineers. Resonance is a phenomenon that occurs when the internal frequency of a system matches exactly with the forcing frequency of the system, causing overall frequency to oscillate and grow without bound. For example, for a structure such as a bridge, resonance occurs when the structure is subjected to an external force such as the wind, and its internal frequency matches the frequency of the force. This essentially transfers the energy of the external force to the structure itself, causing the structure to vibrate with increasing amplitude. If there is no damping or energy dispersion built into the structure, the amplitude of vibration can grow without bound, causing structural failure. The internal frequencies and external forces that affect a structure can be modeled by trigonometric functions and their derivatives, so it is vital for a civil engineer to understand how to work with these derivatives.

The Essentials

The derivative of each basic trigonometric function:

Function Derivative
sin(x) cos(x)
cos(x) -sin(x)
tan(x) sec2(x)
csc(x) -csc(x)cot(x)
sec(x) sec(x)tan(x)
cot(x) -csc2(x)

A Deeper Dive

If we are to understand how exactly to find the derivative of a trig function, then it is necessary to understand Euler’s formulas. Euler’s formulas create the relationship between complex exponential functions and trig functions.

In 1714, a mathematician named Roger Cotes noticed a relationship while studying complex geometry. The mathematical relationship he found was:

i x = ln ( cos ( x ) + i sin ( x )

Later, the mathematician Leonhard Euler was made aware of this relationship and found that if he formatted it as an exponential equation instead of a logarithmic equation, it became more convenient to work with. Euler modified the formula to be:

e ix = cos ( x ) + i sin ( x )

This formula is now known as Euler’s formula. He took the definition one step further and found that his formula added to its own inverse made another useful definition.

e ix + e - ix = 2 cos ( x )

or

e ix + e - ix 2 = cos ( x )

If we return to the original Euler’s formula and solve for sin(x) by substituting the value above for cos(x), we find:

sin ( x ) = e ix - e - ix 2 i

This definition is what allows us to find the derivative of trig functions. We can easily take the derivative of this complex definition of cosine, just using simple calculus knowledge:

  1. Split the fraction for simplicity

    cos ( x ) = e i x 2 + e - i x 2
  2. Take the derivative of the function

    \[ \cos'(x) = \frac{i e^{ix}}{2} + \frac{-i e^{-ix}}{2} \]
  3. Combine and factor out an i from the numerator.

    \[ \cos'(x) = \frac{i(e^{ix} - e^{-ix})}{2} \]
  4. Multiply the fraction by i i (remember that i 2 = - 1 )

    cos ( x ) = - 1 ( e ix e −ix ) 2 i
    cos ( x ) = - sin ( x ) = - e i x + e i x 2 i

Now we can see that this expression is just the negative value of our definition for sin ( x ) above. This is one way to prove that d d x cos ( x ) = - sin ( x )

The derivative of tangent can also be found with these definitions by understanding that tan ( x ) is simply sin ( x ) cos ( x ) , or if we substitute their Euler definitions in:

\[ \tan(x) = \frac{{\frac{e^{ix} - e^{-ix}}{2i}}}{{\frac{e^{ix} + e^{-ix}}{2}}} \]

I will spare you the details, but evaluating the derivative of that lovely fraction will give us:

tan ( x ) = 1 cos 2 ( x )

Which is exactly the same as:

tan ( x ) = sec 2 ( x )

These trig derivatives that we just derived are consistent with the established values in the table above. The other trig derivatives ( sec ( x ) , cot ( x ) , etc) can be further explored using these known relationships.

Another method to find the derivative of trig functions that may be more intuitive and less math intensive is to find the slope of each point along the function’s curve. We know by now that the derivative is just the rate of change, or the slope, at a given value of x. If the right tools are available, this is a quick and easy way to find the derivative of a trig function.

Practice

  1. Recognize the difference between the derivatives of sin ( x ) and cos ( x )

  2. Try finding the derivative of the Euler expression of tan ( x ) used above Hint: The fraction has not been simplified.

    \[ \tan(x) = \frac{{\frac{e^{ix} - e^{-ix}}{2i}}}{{\frac{e^{ix} + e^{-ix}}{2}}} \]