Short and Sweet Calculus

3.6 How to Differentiate

You can differentiate functions that you face in calculus if you remember the following table and the differentiation rules presented in this section.

3.2. Suppose \(u=f(x)\) and \(v=g(x)\) are differentiable functions of \(x\). Then

  1. The Constant Multiple Rule: If \(c\) is a constant, then \[\frac{d}{dx}(cu)=c\frac{du}{dx}.\]

  2. The Sum Rule: \[\frac{d}{dx}(u+v)=\frac{du}{dx}+\frac{dv}{dx}.\]

  3. The Product Rule: \[\frac{d}{dx}(uv)=\frac{du}{dx}v+u\frac{dv}{dx}.\]

  4. The Quotient Rule: \[\frac{d}{dx}\left(\frac{u}{v}\right)=\frac{\dfrac{du}{dx}v-\dfrac{dv}{dx}u}{v^{2}}\] for all values of \(x\) where \(v\neq0\).

We can generalize the above theorem and say:

  • The derivative of the sum of a finite number of functions is equal to the sum of the derivatives of the functions. That is, if \(y=f_{1}(x)+f_{2}(x)+\cdots+f_{n}(x)\), then \[y’=f_{1}'(x)+f_{2}'(x)+\cdots+f_{n}'(x).\]

  • The derivative of a constant times a function is equal to the constant times the derivative of the function.

  • The derivative of the product of a finite number of functions is equal to the sum of the products obtained by multiplying the derivative of each factor by all the other functions. That is, if \(y=f_{1}(x)f_{2}(x)\cdots f_{n}(x)\) then \[y’=\left[f_{2}(x)f_{3}(x)\cdots f_{n}(x)\right]\frac{df_{1}}{dx}+[f_{1}(x)f_{3}(x)\cdots f_{n}(x)]\frac{df_{2}}{dx}+\cdots+[f_{1}(x)f_{2}(x)\cdots f_{n-1}(x)]\frac{df_{n}}{dx}.\tag{a}\]

  • The derivative of a fraction is equal to the denominator times the derivative of the numerator minus the numerator times the derivative of the denominator, all divided by the square of the denominator. 5

  • Notice the minus sign in the numerator in the formula of part (d). Because of this minus sign, the order here matters (unlike the product rule in part c).

\(f(x)\) \(f'(x)\)
\(c\) (\(c\) is a constant) \(0\)
\(x^{r}\) (\(r\) is any real number) \(rx^{r-1}\)
\(\sin x\) \(\cos x\)
\(\cos x\) \(-\sin x\)
\(\tan x\) \(\sec^{2}x=1+\tan^{2}x\)
\(\ln x\) \({\displaystyle \frac{1}{x}}\)
\(e^{x}\) \(e^{x}\)
\(\sin^{-1}x=\arcsin x\) \({\displaystyle \frac{1}{\sqrt{1-x^{2}}}}\)
\(\tan^{-1}x=\arctan x\) \({\displaystyle \frac{1}{1+x^{2}}}\)

Also you need to know the derivatives of the following functions (called hyperbolic functions), which are introduced later in this chapter, although you can easily find their derivatives using the above table and differentiation rules.

\(f(x)\) \(f'(x)\)
\(\sinh x\) \(\cosh x\)
\(\cosh x\) \(\sinh x\)
\(\tanh x\) \(\text{sech}^{2}x=1-\tanh^{2}x\)

Example 3.6. Given \({\displaystyle y=\frac{1}{x^{3}}}\), find \(\dfrac{dy}{dx}\).

Solution

Because \(y=x^{-3}\), we have \[\frac{dy}{dx}=-3x^{-3-1}=-3x^{-4}=-\frac{3}{x^{4}}.\]

Example 3.7. Given \(y=\sqrt{x}\) (\(x>0\)), find \(\dfrac{dy}{dx}\).

Solution

We can write \(y=\sqrt{x}=x^{1/2}\). So here \(r=\frac{1}{2}\) and \[\frac{dy}{dx}=\underbrace{\frac{1}{2}}_{r}x^{\overbrace{\tfrac{1}{2}-1}^{r-1}}=\frac{1}{2}x^{-1/2}=\frac{1}{2x^{1/2}}=\frac{1}{2\sqrt{x}}.\]

Example 3.8. Given \(f(x)=4\sqrt[3]{x}+e^{x}+\frac{3}{x^{5}}\ln x\), find \(f'(x)\).

Solution

We can write \(f(x)=4x^{1/3}-\sqrt{2}e^{x}+3x^{-5}\ln x\). Therefore, \[\begin{aligned} \frac{d}{dx}f(x) & =4\frac{d}{dx}x^{1/3}-\sqrt{2}\frac{d}{dx}e^{x}+3\frac{d}{dx}\left(x^{-5}\ln x\right)\\ & =\frac{4}{3}x^{1/3-1}-\sqrt{2}e^{x}+3\left(\frac{d}{dx}x^{-5}\right)\ln x+3x^{-5}\frac{d}{dx}\ln x\tag{\small product rule}\\ & =\frac{4}{3}x^{-2/3}-\sqrt{2}e^{x}+3(-5)x^{-5-1}\ln x+3x^{-5}\frac{1}{x}\\ & =\frac{4}{3}x^{-2/3}-\sqrt{2}e^{x}-15x^{-6}\ln x+3x^{-6}\tag{\small\ensuremath{\frac{1}{x}=x^{-1}}}\end{aligned}\] The result can be written as \[f'(x)=\frac{4}{3\sqrt[3]{x^{2}}}-\sqrt{2}e^{x}-\frac{15\ln x}{x^{6}}+\frac{3}{x^{6}}.\]

Example 3.9. Differentiate \(f(x)=\dfrac{x^{2}-1}{x^{3}+1}\).

Solution

\[\begin{aligned} f'(x)=\dfrac{df}{dx} & =\frac{\dfrac{d(x^{2}-1)}{dx}(x^{3}+1)-(x^{2}-1)\dfrac{d(x^{3}+1)}{dx}}{(x^{3}+1)^{2}}\tag{\small\ensuremath{\left(\frac{u}{v}\right)’=\frac{u’v-v’u}{v^{2}}}}\\ & =\frac{2x(x^{3}+1)-(x^{2}-1)\left(3x^{2}\right)}{(x^{3}+1)^{2}}\\ & =\frac{-x^{4}+3x^{2}+2x}{(x^{3}+1)^{2}}.\end{aligned}\]

Example 3.10. Find \((\cot x)’\).

Solution

To differentiate the cotangent function, we write \(\cot x\) as \(\frac{\cos x}{\sin x}.\) Then we use \[\frac{d}{dx}\left(\frac{u}{v}\right)=\frac{u’v-v’u}{v^{2}}.\] Therefore,

\[\begin{aligned} \frac{d}{dx}\cot x & =\frac{d}{dx}\frac{\cos x}{\sin x}\\ & =\frac{-\sin x\times\sin x-\cos x\times\cos x}{\sin^{2}x}\\ & =-\frac{\sin^{2}x+\cos^{2}x}{\sin^{2}x}\\ & =-\frac{1}{\sin^{2}x}\\ & =-\csc^{2}x.\end{aligned}\]

\[\frac{d}{dx}\cot x=-\csc^{2}x\] Because \[\frac{1}{\sin^{2}x}=\frac{\sin^{2}x+\cos^{2}x}{\sin^{2}x}=1+\cot^{2}x,\] we have \[\boxed{\frac{d}{dx}\cot x=-\csc^{2}x=-(1+\cot^{2}x).}\]

3.3. The Chain Rule: If \(f\) and \(g\) are two differentiable functions and \(h(x)=f(g(x))\), then \(h(x)\) is also differentiable and its derivative is given by \[h'(x)=f'(g(x))g'(x).\] In the Leibniz notation, if \(y=f(u)\) where \(u=g(x)\), then \[\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}=f'(u)g'(x).\]

  • If \(y=f(u)\) and \(u=g(x)\), expressing the chain rule as \(\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}\) is sloppy. To be more precise, we have to write the chain rule as \[\left(\frac{dy}{dx}\right)_{x_{0}}=\left(\frac{dy}{du}\right)_{g(x_{0})}\left(\frac{du}{dx}\right)_{x_{0}}.\] This notation tells us that the derivative of \(y\) with respect to \(x\) at \(x_{0}\) is equal to the derivative of \(y\) with respect to \(u\) at \(g(x_{0})\) multiplied by the derivative of \(u\) with respect to \(x\) at \(x_{0}\).

  • If \(y=f(u)\) where \(u=g(v)\) and \(v=h(x)\), or \(y=f(g(h(x))\) then \[\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dv}\frac{dv}{dx}=f'(g(h(x)))g'(h(x))h'(x).\]

Example 3.11. Evaluate \({\displaystyle \frac{d}{dx}\sqrt{1-3x^{2}}}\).

Solution

Let \(u=1-3x^{2}\) and \(y=\sqrt{u}\). Then \[\begin{aligned} \frac{dy}{dx} & =\frac{dy}{du}\frac{du}{dx}\\ & =\left(\frac{1}{2\sqrt{u}}\right)(-6x)\\ & =\frac{-6x}{2\sqrt{1-3x^{2}}}\\ & =\frac{-3x}{\sqrt{1-3x^{2}}}.\end{aligned}\]

In general, if \(u\) is a function of \(x\), using the Chain Rule we have \[\boxed{\frac{du^{r}}{dx}=ru^{r-1}\frac{du}{dx}.}\]

Example 3.12. Evaluate \({\displaystyle \frac{d}{dx}\sqrt{x+\sqrt{x+\sqrt{x}}}}\).

Solution

Let \(y=\sqrt{\underbrace{x+\sqrt{x+\sqrt{x}}}_{u}}\). Then \[\frac{dy}{dx}=\frac{1}{2\sqrt{u}}\frac{du}{dx}.\] \[u=x+\sqrt{\underbrace{x+\sqrt{x}}_{v}}\Rightarrow\frac{du}{dx}=1+\frac{1}{2\sqrt{v}}\frac{dv}{dx}.\] \[v=x+\sqrt{x}\Rightarrow\frac{dv}{dx}=1+\frac{1}{2\sqrt{x}}.\] Therefore \[\frac{du}{dx}=1+\frac{1}{2\sqrt{\underbrace{x+\sqrt{x}}_{v}}}\underbrace{\left(1+\frac{1}{2\sqrt{x}}\right)}_{dv/dx}\] and finally \[\frac{dy}{dx}=\frac{1}{2\sqrt{\underbrace{x+\sqrt{x+\sqrt{x}}}_{u}}}\underbrace{\left[1+\frac{1}{2\sqrt{x+\sqrt{x}}}\left(1+\frac{1}{2\sqrt{x}}\right)\right]}_{du/dx}.\]

Example 3.13. If \(z=\cos(\sin^{3}x^{2})\), find \(dz/dx\).

Solution

Let \(z=\cos u,\ u=v^{3},\ v=\sin w,\) and \(w=x^{2}.\) Then \[\begin{aligned} \frac{dz}{dx} & =\frac{dz}{du}\frac{du}{dv}\frac{dv}{dw}\frac{dw}{dx}\\ & =(-\sin u)\left(3v^{2}\right)(\cos w)(2x).\end{aligned}\] Now we write \(u,v,\) and \(w\) in terms of \(x\): \[\begin{aligned} \frac{dz}{dx} & =\left(-\sin v^{3}\right)\left(3\sin^{2}w\right)\left(\cos x^{2}\right)(2x)\\ & =\left[-\sin\left(\sin^{3}w\right)\right]\left(3\sin^{2}x^{2}\right)\left(\cos x^{2}\right)(2x)\\ & =-6\sin\left(\sin^{3}x^{2}\right)\left(\sin^{2}x^{2}\right)\left(\cos x^{2}\right)x.\end{aligned}\]

Example 3.14. Evaluate \(\dfrac{d}{dt}(1+\tan\sqrt{t})^{2}.\)

Solution

Let \(y=u^{2},u=1+\tan v\), and \(v=\sqrt{t}=t^{1/2}\). We want to find \(dy/dt\) and by the chain rule, we have \[\begin{aligned} \frac{dy}{dt} & =\frac{dy}{du}\frac{du}{dv}\frac{dv}{dt}\\ & =(2u)(0+\sec^{2}v)\frac{1}{2}t^{-1/2}\end{aligned}\] Now we write \(u\) and \(v\) in terms of \(t\): \[\begin{aligned} \frac{dy}{dt} & =\cancel{2}(1+\tan v)(\sec^{2}\sqrt{t})\frac{1}{\cancel{2}\sqrt{t}}\\ & =(1+\tan\sqrt{t})\frac{\sec^{2}\sqrt{t}}{\sqrt{t}}.\end{aligned}\] Because \(\sec^{2}\theta=1+\tan^{2}\theta\), the result may be also written as \[\frac{d}{dt}(1+\tan\sqrt{t})^{2}=\frac{(1+\tan\sqrt{t})(1+\tan^{2}\sqrt{t})}{\sqrt{t}}.\]


  1. Here is a shortcut to remember the Quotient Rule. Let’s call the top function \(u\) the “high” function and the bottom function \(v\) the “low” function. Then the Quotient Rule becomes “low dee high minus high dee low all over low low” which means “the low function times the derivative of the high function minus the high function times the derivative of the low function and then divide the result by the low function squared.”↩︎


[up][previous][table of contents][next]