Skip to content
Family Table Math
Auto

The Quotient Rule and Trig Derivatives

The quotient rule differentiates one function divided by another, like xx2+1\dfrac{x}{x^2 + 1} or exx2\dfrac{e^x}{x^2}. It also unlocks the derivatives of the other four trig functions, since tan⁡x\tan x, cot⁡x\cot x, sec⁡x\sec x, and csc⁡x\csc x can all be written as quotients of sin⁡x\sin x and cos⁡x\cos x. As always in calculus, angles are in radians.

If ff and gg are differentiable and g(x)≠0g(x) \ne 0, then

ddx[f(x)g(x)]=f′(x) g(x)−f(x) g′(x)[g(x)]2\frac{d}{dx}\left[\frac{f(x)}{g(x)}\right] = \frac{f'(x)\,g(x) - f(x)\,g'(x)}{\big[g(x)\big]^2}

A popular memory aid, with “hi” for the top and “lo” for the bottom: “lo d-hi minus hi d-lo, over lo squared.”

Unlike the product rule, order matters here, because of the minus sign. Always start with the derivative of the top.

If the denominator is a constant or a single power of xx, it’s usually faster to rewrite and use the power rule:

  • x3+14=14x3+14\dfrac{x^3 + 1}{4} = \dfrac{1}{4}x^3 + \dfrac{1}{4}, so the derivative is 34x2\dfrac{3}{4}x^2.
  • x2−6x=x−6x−1\dfrac{x^2 - 6}{x} = x - 6x^{-1}, so the derivative is 1+6x21 + \dfrac{6}{x^2}.

Write tan⁡x=sin⁡xcos⁡x\tan x = \dfrac{\sin x}{\cos x} and use the quotient rule:

ddx[tan⁡x]=(cos⁡x)(cos⁡x)−(sin⁡x)(−sin⁡x)cos⁡2x=cos⁡2x+sin⁡2xcos⁡2x=1cos⁡2x=sec⁡2x\begin{aligned} \frac{d}{dx}[\tan x] &= \frac{(\cos x)(\cos x) - (\sin x)(-\sin x)}{\cos^2 x} \\ &= \frac{\cos^2 x + \sin^2 x}{\cos^2 x} \\ &= \frac{1}{\cos^2 x} = \sec^2 x \end{aligned}

The key step is the Pythagorean identity sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1.

For sec⁡x=1cos⁡x\sec x = \dfrac{1}{\cos x}, the top is the constant 11, whose derivative is 00:

ddx[sec⁡x]=(0)(cos⁡x)−(1)(−sin⁡x)cos⁡2x=sin⁡xcos⁡2x=1cos⁡x⋅sin⁡xcos⁡x=sec⁡xtan⁡x\frac{d}{dx}[\sec x] = \frac{(0)(\cos x) - (1)(-\sin x)}{\cos^2 x} = \frac{\sin x}{\cos^2 x} = \frac{1}{\cos x}\cdot\frac{\sin x}{\cos x} = \sec x \tan x
FunctionDerivative
sin⁡x\sin xcos⁡x\cos x
cos⁡x\cos x−sin⁡x-\sin x
tan⁡x\tan xsec⁡2x\sec^2 x
cot⁡x\cot x−csc⁡2x-\csc^2 x
sec⁡x\sec xsec⁡xtan⁡x\sec x \tan x
csc⁡x\csc x−csc⁡xcot⁡x-\csc x \cot x

A pattern to help you remember: the three “co” functions (cosine, cotangent, cosecant) have derivatives with a minus sign. Practice 4 and 5 ask you to derive cot⁡x\cot x and csc⁡x\csc x yourself.

Differentiate y=2x+1x−3y = \dfrac{2x + 1}{x - 3}.

Solution. Top: f=2x+1f = 2x + 1, f′=2f' = 2. Bottom: g=x−3g = x - 3, g′=1g' = 1.

dydx=(2)(x−3)−(2x+1)(1)(x−3)2=2x−6−2x−1(x−3)2=−7(x−3)2\begin{aligned} \frac{dy}{dx} &= \frac{(2)(x - 3) - (2x + 1)(1)}{(x - 3)^2} \\ &= \frac{2x - 6 - 2x - 1}{(x - 3)^2} \\ &= \frac{-7}{(x - 3)^2} \end{aligned}

Notice the brackets around (2x+1)(2x + 1): the minus sign applies to the whole thing.

Find the points where f(x)=xx2+1f(x) = \dfrac{x}{x^2 + 1} has a horizontal tangent.

Solution.

f′(x)=(1)(x2+1)−(x)(2x)(x2+1)2=1−x2(x2+1)2f'(x) = \frac{(1)(x^2 + 1) - (x)(2x)}{(x^2 + 1)^2} = \frac{1 - x^2}{(x^2 + 1)^2}

A fraction is 00 when its numerator is 00 (and its denominator isn’t). Here the denominator is never 00, so solve 1−x2=01 - x^2 = 0: x=±1x = \pm 1.

f(1)=12f(1) = \dfrac{1}{2} and f(−1)=−12f(-1) = -\dfrac{1}{2}. The points are (1,12)\left(1, \dfrac{1}{2}\right) and (−1,−12)\left(-1, -\dfrac{1}{2}\right).

The graph of y = x over (x squared plus 1). It has horizontal tangent lines at its highest point (1, 1/2) and its lowest point (-1, -1/2), and approaches the x-axis on both sides. (1, 1/2) (−1, −1/2) −4 −3 −2 −1 1 2 3 4
f(x)=xx2+1f(x) = \dfrac{x}{x^2 + 1} has horizontal tangents at (1,12)\left(1, \tfrac{1}{2}\right) and (−1,−12)\left(-1, -\tfrac{1}{2}\right), exactly where f′(x)=0f'(x) = 0.

Find the equation of the tangent line to y=tan⁡xy = \tan x at x=π4x = \dfrac{\pi}{4}.

Solution. Point: tan⁡π4=1\tan \dfrac{\pi}{4} = 1. Slope: sec⁡2π4=1cos⁡2(π/4)=11/2=2\sec^2 \dfrac{\pi}{4} = \dfrac{1}{\cos^2 (\pi/4)} = \dfrac{1}{1/2} = 2.

y−1=2(x−π4)y - 1 = 2\left(x - \frac{\pi}{4}\right)

Let q(x)=f(x)g(x)q(x) = \dfrac{f(x)}{g(x)}, where f(2)=3f(2) = 3, f′(2)=−1f'(2) = -1, g(2)=4g(2) = 4, and g′(2)=2g'(2) = 2. Find q′(2)q'(2).

Solution.

q′(2)=f′(2)g(2)−f(2)g′(2)[g(2)]2=(−1)(4)−(3)(2)42=−1016=−58q'(2) = \frac{f'(2)g(2) - f(2)g'(2)}{\big[g(2)\big]^2} = \frac{(-1)(4) - (3)(2)}{4^2} = \frac{-10}{16} = -\frac{5}{8}

Swapping the order in the numerator. fg′−f′gg2\dfrac{fg' - f'g}{g^2} gives the negative of the right answer. Start with the derivative of the top: “lo d-hi” comes first.

Forgetting to square the denominator, or forgetting the denominator entirely. Write the fraction bar and [g(x)]2\big[g(x)\big]^2 before you fill in the numerator.

Dropping brackets in the numerator. In Example 1, −(2x+1)(1)-(2x + 1)(1) is −2x−1-2x - 1, not −2x+1-2x + 1.

Dividing the derivatives. (fg)′≠f′g′\left(\dfrac{f}{g}\right)' \ne \dfrac{f'}{g'}. Just like products, quotients need their own rule.

Mixing up the trig signs. The derivatives of cos⁡x\cos x, cot⁡x\cot x, and csc⁡x\csc x are negative. Also, ddx[sec⁡x]\dfrac{d}{dx}[\sec x] is sec⁡xtan⁡x\sec x \tan x, not sec⁡2x\sec^2 x (that’s tan⁡x\tan x).

Expanding the denominator. Leave (x2+1)2(x^2 + 1)^2 factored. Expanding it creates work and hides the fact that it’s never 00.

1. (Warm-up) Differentiate y=xx+1y = \dfrac{x}{x + 1}.

Solutiondydx=(1)(x+1)−(x)(1)(x+1)2=1(x+1)2\frac{dy}{dx} = \frac{(1)(x + 1) - (x)(1)}{(x + 1)^2} = \frac{1}{(x + 1)^2}

2. (Warm-up) Find ddx[sec⁡x+tan⁡x]\dfrac{d}{dx}\big[\sec x + \tan x\big].

Solutionsec⁡xtan⁡x+sec⁡2x\sec x \tan x + \sec^2 x

3. (Warm-up) Let q(x)=f(x)g(x)q(x) = \dfrac{f(x)}{g(x)}, where f(1)=6f(1) = 6, f′(1)=2f'(1) = 2, g(1)=3g(1) = 3, and g′(1)=−1g'(1) = -1. Find q′(1)q'(1).

Solutionq′(1)=(2)(3)−(6)(−1)32=6+69=43q'(1) = \frac{(2)(3) - (6)(-1)}{3^2} = \frac{6 + 6}{9} = \frac{4}{3}

4. (Core) Use the quotient rule to show that ddx[cot⁡x]=−csc⁡2x\dfrac{d}{dx}[\cot x] = -\csc^2 x.

Solution

Write cot⁡x=cos⁡xsin⁡x\cot x = \dfrac{\cos x}{\sin x}:

ddx[cot⁡x]=(−sin⁡x)(sin⁡x)−(cos⁡x)(cos⁡x)sin⁡2x=−(sin⁡2x+cos⁡2x)sin⁡2x=−1sin⁡2x=−csc⁡2x\begin{aligned} \frac{d}{dx}[\cot x] &= \frac{(-\sin x)(\sin x) - (\cos x)(\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}

5. (Core) Use the quotient rule to show that ddx[csc⁡x]=−csc⁡xcot⁡x\dfrac{d}{dx}[\csc x] = -\csc x \cot x.

Solution

Write csc⁡x=1sin⁡x\csc x = \dfrac{1}{\sin x}:

ddx[csc⁡x]=(0)(sin⁡x)−(1)(cos⁡x)sin⁡2x=−1sin⁡x⋅cos⁡xsin⁡x=−csc⁡xcot⁡x\frac{d}{dx}[\csc x] = \frac{(0)(\sin x) - (1)(\cos x)}{\sin^2 x} = -\frac{1}{\sin x}\cdot\frac{\cos x}{\sin x} = -\csc x \cot x

6. (Core) Find dydx\dfrac{dy}{dx} for y=exx2y = \dfrac{e^x}{x^2}, and simplify.

Solutiondydx=ex⋅x2−ex⋅2xx4=xex(x−2)x4=ex(x−2)x3\frac{dy}{dx} = \frac{e^x \cdot x^2 - e^x \cdot 2x}{x^4} = \frac{xe^x(x - 2)}{x^4} = \frac{e^x(x - 2)}{x^3}

7. (Core) Find the equation of the tangent line to y=x2−1x2+1y = \dfrac{x^2 - 1}{x^2 + 1} at x=1x = 1.

Solutiondydx=(2x)(x2+1)−(x2−1)(2x)(x2+1)2=2x3+2x−2x3+2x(x2+1)2=4x(x2+1)2\frac{dy}{dx} = \frac{(2x)(x^2 + 1) - (x^2 - 1)(2x)}{(x^2 + 1)^2} = \frac{2x^3 + 2x - 2x^3 + 2x}{(x^2 + 1)^2} = \frac{4x}{(x^2 + 1)^2}

At x=1x = 1: the point is (1,0)(1, 0) and the slope is 44=1\dfrac{4}{4} = 1.

y=x−1y = x - 1

8. (Challenge) Show that the derivative of y=sin⁡x1+cos⁡xy = \dfrac{\sin x}{1 + \cos x} simplifies to 11+cos⁡x\dfrac{1}{1 + \cos x}.

Solutiondydx=(cos⁡x)(1+cos⁡x)−(sin⁡x)(−sin⁡x)(1+cos⁡x)2=cos⁡x+cos⁡2x+sin⁡2x(1+cos⁡x)2=cos⁡x+1(1+cos⁡x)2=11+cos⁡x\begin{aligned} \frac{dy}{dx} &= \frac{(\cos x)(1 + \cos x) - (\sin x)(-\sin x)}{(1 + \cos x)^2} \\ &= \frac{\cos x + \cos^2 x + \sin^2 x}{(1 + \cos x)^2} \\ &= \frac{\cos x + 1}{(1 + \cos x)^2} \\ &= \frac{1}{1 + \cos x} \end{aligned}

9. (Challenge) Find the point where the graph of y=ln⁡xxy = \dfrac{\ln x}{x} has a horizontal tangent.

Solutiondydx=1x⋅x−(ln⁡x)(1)x2=1−ln⁡xx2\frac{dy}{dx} = \frac{\frac{1}{x}\cdot x - (\ln x)(1)}{x^2} = \frac{1 - \ln x}{x^2}

For x>0x \gt 0 the denominator is positive, so set the numerator to 00: ln⁡x=1\ln x = 1, so x=ex = e. Then y=ln⁡ee=1ey = \dfrac{\ln e}{e} = \dfrac{1}{e}.

The point is (e,1e)\left(e, \dfrac{1}{e}\right).

Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site. All angles in this homework are in radians. Retain domain restrictions when simplifying, and check the denominator before calling a zero derivative a horizontal tangent.

H1. (Foundations) Differentiate f(x)=(3x−2)/(x+4)f(x)=(3x-2)/(x+4) and state its domain. Show the numerator subtraction with brackets.

H2. (Foundations) Differentiate both expressions and state the trigonometric domain restrictions:

  • (a) tan⁡x−2sec⁡x\tan x-2\sec x.
  • (b) 3cot⁡x+csc⁡x3\cot x+\csc x.

H3. (Core) Let Q(x)=f(x)/g(x)Q(x)=f(x)/g(x), where f(1)=5f(1)=5, f′(1)=−2f'(1)=-2, g(1)=−3g(1)=-3, and g′(1)=4g'(1)=4. Find Q(1)Q(1) and Q′(1)Q'(1). Explain why the denominator in the derivative is positive even though g(1)g(1) is negative.

H4. (Core) Differentiate R(x)=(x3+4x)/(2x2)R(x)=(x^3+4x)/(2x^2) using the quotient rule. Check the result by rewriting the original expression as a sum of powers, keeping its excluded input.

H5. (Core) Derive the formula for the derivative of csc⁡x\csc x by writing it as 1/sin⁡x1/\sin x and applying the quotient rule. Explain the sign and specify where the derivation is valid.

H6. (Core) Find the tangent line to y=tan⁡x−cot⁡xy=\tan x-\cot x at x=π/4x=\pi/4. Calculate the point and slope separately.

H7. (Challenge) Find every horizontal-tangent point of F(x)=(x2+1)/(x−2)F(x)=(x^2+1)/(x-2). Solve the derivative equation exactly, reject any excluded inputs, and simplify the coordinates.

H8. (Challenge) For T(x)=sin⁡x/(2+cos⁡x)T(x)=\sin x/(2+\cos x), simplify the derivative and find all horizontal-tangent points with 0≤x<2π0\le x\lt2\pi. Check that the original denominator is nonzero at every candidate.

H9. (Challenge) Let P(x)=(ax+b)/(x+1)P(x)=(ax+b)/(x+1).

  • (a) Choose a,ba,b so that the tangent at 00 is y=3x−2y=3x-2, and decide whether this chosen function has any horizontal tangents.
  • (b) For arbitrary real a,ba,b, classify all horizontal-tangent inputs. Include the special case where the quotient becomes constant but still has an excluded input.

H10. (Challenge) For any real parameter cc, let Hc(x)=(ln⁡x+c)/xH_c(x)=(\ln x+c)/x on x>0x\gt0. Find its derivative and its unique horizontal-tangent point in terms of cc. Can any choice of cc make that horizontal tangent coincide with the xx-axis? Verify the coordinates rather than assuming zero slope means zero height.