# Calculus

## Derivatives of the Trigbonometric Functions

Before we depend on memorizing the derivatives of the sine and cosine functions. Let's use the definition of the derivative to explore what they are.

Let $$y=\sin x$$, where $$x$$ is expressed in radians. If $$x$$ changes by an amount $$h$$, from the definition of the derivative, we have

$\frac{dy}{dx}=\lim_{h\to 0}\frac{\sin(x+h)-\sin x}{h}$

If we expand using the addition of two angles identity, $$\sin(x+h)=\sin x\cos h + \cos x \sin h$$

\begin{align} \frac{dy}{dx}&=\lim_{h\to 0}\frac{\sin(x+h)-\sin x}{h} \\ &= \lim_{h\to 0}\frac{\sin x\cos h + \cos x \sin h-\sin x}{h} \\ &=  \lim_{h\to 0}\frac{\sin x(\cos h -1)+ \cos x \sin h}{h} \\&= \lim_{h\to 0}\frac{\sin x(\cos h -1)}{h} + \lim_{h\to 0}\frac{\cos x \sin h}{h} \\ &= \sin x\lim_{h\to 0}\frac{\cos h -1}{h} + \cos x\lim_{h\to 0}\frac{\sin h}{h} \\&= \sin x\lim_{h\to 0}\frac{\cos h -1}{h}\times\frac{\cos h+1}{\cos h+1} + \cos x\lim_{h\to 0}\frac{\sin h}{h} \\ &= \sin x\lim_{h\to 0}\frac{-\sin ^2 h}{h(\cos h+1)} + \cos x\lim_{h\to 0}\frac{\sin h}{h} \\&= \sin x\left(\lim_{h\to 0}(-\sin h)\cdot \lim_{h\to 0}\frac{\sin h}{h} \cdot \lim_{h\to 0}\frac{1}{\cos h+1}\right) + \cos x\lim_{h\to 0}\frac{\sin h}{h}\end{align}

By the squeeze theorem, $$\lim_{h\to 0}\frac{\sin h}{h} = 1$$. Thus,

\begin{align} \frac{dy}{dx} &= \sin x(0)(1)(\frac{1}{2}) + \cos x(1)\\&=0+\cos x=\cos x\end{align}

Knowing that $$\frac{d}{dx}\sin x=\cos x$$, you can use trigonometric identifies to prove the following.

\begin{align} \frac{d}{dx}\cos x&=-\sin x \\ \frac{d}{dx}\tan x&=\sec ^2x \\ \frac{d}{dx}\csc x&=-\csc x\cot x \\ \frac{d}{dx}\sec x&=-\sec x\tan x \\ \frac{d}{dx}\cot x&=-\csc ^2x \end{align}

Example 1: Find the derivative of $y=4\cos x\csc x^2$

Solution: Two trigonometric functions are multiplied together, so we need to apply the product rule. While performing the product rule, we have to use the chain rule for the derivative of $$\csc x^2$$.

\begin{align} y'&=4(-\sin x)(\csc x^2)+4(\cos x)(-\csc x^2\cot x^2)(2x) \\ &= -4\csc x^2\left(\sin x+2\cos x\cot x^2\right)\end{align}

Example 2: Use implicit differentiation to find the derivative of $x\sec y-2y=\sin 2x$

Solution: We need to apply the product rule implicitly for $$x\sec y$$ along with the chain rule for $$\sin 2x$$

\begin{align} \left(\sec y+x(-\sec y\tan y\frac{dy}{dx})\right)-2\frac{dy}{dx} &= 2\cos 2x \\ \frac{dy}{dx}\left(-x\sec y\tan y-2\right) &= 2\cos 2x -\sec y \\ \frac{dy}{dx} &= \frac{2\cos 2x -\sec y}{-x\sec y\tan y-2} \end{align}

Example 3: The electric charge $$q$$ (in C) passing a given point in a circuit is given by $$q=t\sec \sqrt{0.20t^2+1.0}$$, where $$t$$ is the time (in s). Find the current $$i$$ (in A) for $$t=0.80s$$.

Solution: The current is the first derivative of the charge of a circuit. After finding the derivative, we need to substitute the given time.

\begin{align} i(t)=q'(t)&=\sec \sqrt{0.20t^2+1.0}+t\left(-sec \sqrt{0.20t^2+1.0}\tan\sqrt{0.20t^2+1.0} \left(\frac{1}{2}\sec\left( 0.20t^2+1.0\right)^{-1/2} (0.4t) \right)\right) \\ &=\sec \sqrt{0.20t^2+1.0} -0.2t^2 \tan\sqrt{0.20t^2+1.0}\end{align}

Now we want to find the current at $$t=0.80s$$

\begin{align} i(0.8)&=\sec \sqrt{0.20(0)^2+1.0} -0.2(0)^2 \tan\sqrt{0.20(0)^2+1.0} \\&= \sec \sqrt{1}=1 \end{align}

The current at 0.8 seconds is 1 ampere.