Chapter VI · Derivatives and integrals

Derivatives of algebraical and trigonometrical functions

§§119–120 35 min

Rational powers, implicit functions, the six trigonometrical functions and their inverses, with the sign conventions that Hardy’s many-valued inverse functions require.

Why this matters

§119 and §120 complete the table of standard derivatives for every function so far defined in the book: powers with rational exponents, functions defined implicitly by an algebraic equation, the trigonometrical functions, and their inverses. Two ideas carry most of the weight. The inverse-function rule produces the derivatives of xq\sqrt[q]{x}, arcsin⁡x\arcsin x and arctan⁡x\arctan x from those of xqx^q, sin⁡x\sin x and tan⁡x\tan x. Implicit differentiation finds the slope of a curve such as x3+y3=3axyx^3 + y^3 = 3axy without solving for yy.

The idea

The inverse-function rule says that reflecting a graph in the line y=xy = x turns each tangent slope mm into 1/m1/m. Every derivative of an inverse function in this lesson is that one picture, plus a formula that rewrites 1/ψ′(y)1/\psi'(y) in terms of xx.

Explore Reflect the graph, invert the slope

Try this. With sin and arc sin, move yy and compare the two slopes in the read-out. Then push yy all the way to 12π\tfrac12\pi. Switch to y3y^3 and x3\sqrt[3]{x} and move yy through 00.

x=ψ(y)=sin⁡yx = \psi(y) = \sin y, inverse y=ϕ(x)=arcsin⁡xy = \phi(x) = \arcsin x
xy
  • y = φ(x), the inverse
  • its mirror image, the graph of ψ
  • tangent to φ
  • the mirror line y = x
At y=0.6y = 0.6, x=ψ(y)=0.5646x = \psi(y) = 0.5646. Slope of ψ\psi: ψ′(y)=0.8253\psi'(y) = 0.8253. Slope of ϕ\phi: ϕ′(x)=1/ψ′(y)=1.212\phi'(x) = 1/\psi'(y) = 1.212, in general ϕ′(x)=1cos⁡y=11−x2\phi'(x) = \frac{1}{\cos y} = \frac{1}{\sqrt{1-x^2}}.
What to notice

The two tangents are mirror images, so their slopes are reciprocal: ϕ′(x)=1/ψ′(y)\phi'(x) = 1/\psi'(y). When ψ′(y)=0\psi'(y) = 0 (sine at y=12πy = \tfrac12\pi, cube at y=0y = 0) the reflected tangent is vertical, and the inverse function has no derivative there. That is why (arcsin⁡x)′=1/1−x2(\arcsin x)' = 1/\sqrt{1 - x^2} blows up at x=±1x = \pm 1 and (x3)′(\sqrt[3]x)' at 00.

Rational powers. For y=xp/qy = x^{p/q}, with q>0q > 0 and x>0x > 0, put z=x1/qz = x^{1/q}. Then x=zqx = z^q and y=zpy = z^p are integer powers of zz, and the rules for those combine:

dydx=dydz/dxdz=pzp−1qzq−1=pqzp−q=pqx(p−q)/q=mxm−1,m=pq.\frac{dy}{dx} = \frac{dy}{dz}\Big/\frac{dx}{dz} = \frac{pz^{p-1}}{qz^{q-1}} = \frac{p}{q}z^{p-q} = \frac{p}{q}x^{(p-q)/q} = mx^{m-1}, \qquad m = \frac pq.

Implicit functions. If yy is defined by an equation such as x3+y3−3axy=0x^3 + y^3 - 3axy = 0, we differentiate the equation through, treating yy as a function of xx and using the chain rule on y3y^3 and the product rule on xyxy:

3x2+3y2dydx−3a(y+xdydx)=0,sodydx=ay−x2y2−ax.3x^2 + 3y^2\frac{dy}{dx} - 3a\left(y + x\frac{dy}{dx}\right) = 0, \qquad\text{so}\qquad \frac{dy}{dx} = \frac{ay - x^2}{y^2 - ax}.

Hardy notes that this method takes for granted that yy is a differentiable function of xx near the point in question. That is a real theorem (the implicit function theorem), and he returns to it in Chapter VII. In practice the calculation is exactly as shown.

Precise statements

Theorem Rational powers Hardy: §119

For every rational mm, ddxxm=mxm−1\dfrac{d}{dx}x^m = mx^{m-1} when x>0x > 0, and also for x<0x < 0 whenever xmx^m is defined there. More generally ddx(ax+b)m=ma(ax+b)m−1\dfrac{d}{dx}(ax + b)^m = ma(ax + b)^{m-1}.

Theorem Trigonometrical functions Hardy: §120
Dxsin⁡x=cos⁡x,Dxcos⁡x=−sin⁡x,Dxtan⁡x=sec⁡2x,Dxcot⁡x=−cosec⁡2x,Dxsec⁡x=tan⁡xsec⁡x,Dxcosec⁡x=−cot⁡xcosec⁡x.\begin{aligned} D_x\sin x &= \cos x, & D_x\cos x &= -\sin x, & D_x\tan x &= \sec^2 x,\\ D_x\cot x &= -\operatorname{cosec}^2 x, & D_x\sec x &= \tan x\sec x, & D_x\operatorname{cosec} x &= -\cot x\operatorname{cosec} x. \end{aligned}
Theorem Inverse trigonometrical functions Hardy: §120
Dxarcsin⁡x=±11−x2,Dxarccos⁡x=∓11−x2,Dxarctan⁡x=11+x2,Dxarc cot⁡x=−11+x2,Dxarc sec⁡x=±1∣x∣x2−1,Dxarc cosec⁡x=∓1∣x∣x2−1.\begin{aligned} D_x\arcsin x &= \pm\frac{1}{\sqrt{1 - x^2}}, & D_x\arccos x &= \mp\frac{1}{\sqrt{1 - x^2}},\\ D_x\arctan x &= \frac{1}{1 + x^2}, & D_x\operatorname{arc\,cot} x &= -\frac{1}{1 + x^2},\\ D_x\operatorname{arc\,sec} x &= \pm\frac{1}{|x|\sqrt{x^2 - 1}}, & D_x\operatorname{arc\,cosec} x &= \mp\frac{1}{|x|\sqrt{x^2 - 1}}. \end{aligned}

Here yy denotes the value of the inverse function in question. For arc sin and arc cos the upper sign holds when cos⁡y>0\cos y > 0 and when sin⁡y>0\sin y > 0 respectively; for arc sec and arc cosec, when sin⁡y>0\sin y > 0 and when cos⁡y>0\cos y > 0 respectively. For the usual principal values (−12π≤arcsin⁡x≤12π-\tfrac12\pi \le \arcsin x \le \tfrac12\pi, 0≤arccos⁡x≤π0 \le \arccos x \le \pi, 0≤arc sec⁡x≤π0 \le \operatorname{arc\,sec} x \le \pi, −12π≤arc cosec⁡x≤12π-\tfrac12\pi \le \operatorname{arc\,cosec} x \le \tfrac12\pi) the upper signs hold: for example (arcsin⁡x)′=1/1−x2(\arcsin x)' = 1/\sqrt{1 - x^2} and (arccos⁡x)′=−1/1−x2(\arccos x)' = -1/\sqrt{1 - x^2} for −1<x<1-1 < x < 1.

Combined with the chain rule these give, for a≠0a \ne 0, ddxarcsin⁡xa=±1a2−x2\dfrac{d}{dx}\arcsin\dfrac{x}{a} = \pm\dfrac{1}{\sqrt{a^2 - x^2}} and ddxarctan⁡xa=ax2+a2\dfrac{d}{dx}\arctan\dfrac xa = \dfrac{a}{x^2 + a^2}, which return in Hardy’s integration sections.

Proofs

Proof Dxtan⁡x=sec⁡2xD_x\tan x = \sec^2 x and Dxsec⁡x=tan⁡xsec⁡xD_x\sec x = \tan x\sec x
Strategy

Write each function as a quotient or reciprocal of sin⁡\sin and cos⁡\cos, whose derivatives are known (Examples XXXIX, 4), and apply rules (4) and (5).

Tangent

tan⁡x=sin⁡x/cos⁡x\tan x = \sin x/\cos x, so wherever cos⁡x≠0\cos x \ne 0, (tan⁡x)′=cos⁡xcos⁡x−sin⁡x(−sin⁡x)cos⁡2x=1cos⁡2x=sec⁡2x(\tan x)' = \dfrac{\cos x\cos x - \sin x(-\sin x)}{\cos^2 x} = \dfrac{1}{\cos^2 x} = \sec^2 x.

Secant

sec⁡x=1/cos⁡x\sec x = 1/\cos x, so (sec⁡x)′=−−sin⁡xcos⁡2x=sin⁡xcos⁡x⋅1cos⁡x=tan⁡xsec⁡x(\sec x)' = -\dfrac{-\sin x}{\cos^2 x} = \dfrac{\sin x}{\cos x}\cdot\dfrac{1}{\cos x} = \tan x\sec x.

The other two

cot⁡x=cos⁡x/sin⁡x\cot x = \cos x/\sin x and cosec⁡x=1/sin⁡x\operatorname{cosec} x = 1/\sin x are handled in the same way, giving −cosec⁡2x-\operatorname{cosec}^2 x and −cot⁡xcosec⁡x-\cot x\operatorname{cosec} x.

Proof Dxarcsin⁡x=±1/1−x2D_x\arcsin x = \pm 1/\sqrt{1 - x^2}, with the right sign
Strategy

Apply rule (7) to x=sin⁡yx = \sin y on an interval where sine is strictly monotonic, then express cos⁡y\cos y in terms of xx. The square root loses the sign of cos⁡y\cos y, which is where the ambiguous sign comes from.

Choose a branch

On an interval of yy such as −12π<y<12π-\tfrac12\pi < y < \tfrac12\pi (or 12π<y<32π\tfrac12\pi < y < \tfrac32\pi, and so on), sin⁡y\sin y is continuous and strictly monotonic, so it has a continuous inverse y=arcsin⁡xy = \arcsin x there (§110).

Apply rule (7)

dx/dy=cos⁡y≠0dx/dy = \cos y \ne 0 inside such an interval, so dy/dx=1/cos⁡ydy/dx = 1/\cos y.

Express in terms of xx

cos⁡2y=1−sin⁡2y=1−x2\cos^2 y = 1 - \sin^2 y = 1 - x^2, so cos⁡y=±1−x2\cos y = \pm\sqrt{1 - x^2}, with the sign of cos⁡y\cos y. On the principal branch cos⁡y>0\cos y > 0 and (arcsin⁡x)′=1/1−x2(\arcsin x)' = 1/\sqrt{1 - x^2}; on the branch 12π<y<32π\tfrac12\pi < y < \tfrac32\pi, cos⁡y<0\cos y < 0 and the derivative is −1/1−x2-1/\sqrt{1 - x^2}. At x=±1x = \pm1, cos⁡y=0\cos y = 0: vertical tangents, no derivative.

Proof Dxarctan⁡x=1/(1+x2)D_x\arctan x = 1/(1 + x^2)
Strategy

The same argument with x=tan⁡yx = \tan y. This time no square root appears, so there is no ambiguity of sign.

Rule (7)

On any branch, say −12π<y<12π-\tfrac12\pi < y < \tfrac12\pi, tan⁡y\tan y is strictly increasing with dx/dy=sec⁡2y>0dx/dy = \sec^2 y > 0. So dy/dx=1/sec⁡2ydy/dx = 1/\sec^2 y.

In terms of xx

sec⁡2y=1+tan⁡2y=1+x2\sec^2 y = 1 + \tan^2 y = 1 + x^2. Hence (arctan⁡x)′=1/(1+x2)(\arctan x)' = 1/(1 + x^2) on every branch.

Explore Drill: powers, trigonometry and inverses

Try this. Work each derivative on paper first. For arc sin, think about which sign the principal value needs. For the last one, simplify before you choose.

1 of 5: differentiate ϕ(x)=tan⁡x\phi(x) = \tan x
xy
  • φ′(x) from chord slopes
Hint: use the quotient rule (sin x / cos x). The dashed curve is the true derivative, found numerically; pick the formula you think matches it.
Right first time: 0 of 0 tried.
What to notice

The last function, arctan⁡{(1+x)/(1−x)}\arctan\{(1 + x)/(1 - x)\}, has exactly the same derivative as arctan⁡x\arctan x. That is no accident: by the addition formula for tangents it equals arctan⁡x+14π\arctan x + \tfrac14\pi for x<1x < 1. Hardy’s Examples XLIV, 3 asks you to explain such simple results.

Worked examples and exercises

Exercise ●○○ Hardy: Examples XLIII, 1

Differentiate 1+x1−x\sqrt{\dfrac{1 + x}{1 - x}} for −1<x<1-1 < x < 1.

Hint
Write y=u1/2y = u^{1/2} with u=(1+x)/(1−x)u = (1 + x)/(1 - x), and use the chain rule and the quotient rule.

Solution

u′=(1−x)+(1+x)(1−x)2=2(1−x)2u' = \dfrac{(1 - x) + (1 + x)}{(1 - x)^2} = \dfrac{2}{(1 - x)^2}, so

y′=12u−1/2u′=121−x1+x⋅2(1−x)2=1(1−x)(1−x)(1+x)=1(1−x)1−x2.y' = \frac{1}{2}u^{-1/2}u' = \frac12\sqrt{\frac{1 - x}{1 + x}}\cdot\frac{2}{(1 - x)^2} = \frac{1}{(1 - x)\sqrt{(1 - x)(1 + x)}} = \frac{1}{(1 - x)\sqrt{1 - x^2}}.
Exercise The folium of Descartes ●●○ Hardy: §119

For the curve x3+y3=3axyx^3 + y^3 = 3axy (a>0a > 0), find dy/dxdy/dx, and find the points where the tangent is horizontal.

Hint
Differentiate implicitly, as in the text. A horizontal tangent needs ay−x2=0ay - x^2 = 0; substitute y=x2/ay = x^2/a back into the equation of the curve.

Solution

As in the text, dy/dx=(ay−x2)/(y2−ax)dy/dx = (ay - x^2)/(y^2 - ax) wherever y2≠axy^2 \ne ax. The slope is 00 where ay=x2ay = x^2 (and y2≠axy^2 \ne ax). Substituting y=x2/ay = x^2/a into x3+y3=3axyx^3 + y^3 = 3axy gives x3+x6/a3=3x3x^3 + x^6/a^3 = 3x^3, so x3(x3−2a3)=0x^3(x^3 - 2a^3) = 0. The root x=0x = 0 gives the origin, where also y2=ax=0y^2 = ax = 0 and the formula is 0/00/0: the origin is a node where the curve crosses itself, and the method says nothing there. The other root is x=21/3ax = 2^{1/3}a, y=x2/a=22/3ay = x^2/a = 2^{2/3}a, and there y2−ax=24/3a2−21/3a2=21/3a2≠0y^2 - ax = 2^{4/3}a^2 - 2^{1/3}a^2 = 2^{1/3}a^2 \ne 0. So the tangent is horizontal at (21/3a,22/3a)(2^{1/3}a, 2^{2/3}a), the highest point of the loop.

Exercise ●●○ Hardy: Examples XLIV, 3

Differentiate arcsin⁡x+arccos⁡x\arcsin x + \arccos x, arctan⁡x+arc cot⁡x\arctan x + \operatorname{arc\,cot} x and arctan⁡a+x1−ax\arctan\dfrac{a + x}{1 - ax}, and explain why the results are so simple.

Hint
For principal values, what is sin⁡(12π−arccos⁡x)\sin(\tfrac12\pi - \arccos x)? For the third, compute 1+u21 + u^2 with u=(a+x)/(1−ax)u = (a + x)/(1 - ax) and factorise.

Solution

With principal values, (arcsin⁡x+arccos⁡x)′=1/1−x2−1/1−x2=0(\arcsin x + \arccos x)' = 1/\sqrt{1 - x^2} - 1/\sqrt{1 - x^2} = 0, and (arctan⁡x+arc cot⁡x)′=1/(1+x2)−1/(1+x2)=0(\arctan x + \operatorname{arc\,cot} x)' = 1/(1 + x^2) - 1/(1 + x^2) = 0. Both sums are constant: 12π\tfrac12\pi in each case, since sin⁡(12π−y)=cos⁡y\sin(\tfrac12\pi - y) = \cos y and tan⁡(12π−y)=cot⁡y\tan(\tfrac12\pi - y) = \cot y.

For the third, with u=(a+x)/(1−ax)u = (a + x)/(1 - ax): u′=(1−ax)+a(a+x)(1−ax)2=1+a2(1−ax)2u' = \dfrac{(1 - ax) + a(a + x)}{(1 - ax)^2} = \dfrac{1 + a^2}{(1 - ax)^2} and 1+u2=(1−ax)2+(a+x)2(1−ax)2=(1+a2)(1+x2)(1−ax)21 + u^2 = \dfrac{(1 - ax)^2 + (a + x)^2}{(1 - ax)^2} = \dfrac{(1 + a^2)(1 + x^2)}{(1 - ax)^2}. So the derivative is u′/(1+u2)=1/(1+x2)u'/(1 + u^2) = 1/(1 + x^2). The reason: by the addition formula tan⁡(A+B)=(tan⁡A+tan⁡B)/(1−tan⁡Atan⁡B)\tan(A + B) = (\tan A + \tan B)/(1 - \tan A\tan B), the function equals arctan⁡a+arctan⁡x\arctan a + \arctan x (up to a multiple of π\pi on each interval where ax≠1ax \ne 1), which differs from arctan⁡x\arctan x by a constant.

Exercise ●○○ Hardy: Examples XLIV, 12

Show that the derivative of y=(tan⁡x+sec⁡x)my = (\tan x + \sec x)^m is mysec⁡xmy\sec x.

Solution

By the chain rule, y′=m(tan⁡x+sec⁡x)m−1(sec⁡2x+sec⁡xtan⁡x)=m(tan⁡x+sec⁡x)m−1sec⁡x(sec⁡x+tan⁡x)=m(tan⁡x+sec⁡x)msec⁡x=mysec⁡xy' = m(\tan x + \sec x)^{m-1}(\sec^2 x + \sec x\tan x) = m(\tan x + \sec x)^{m-1}\sec x(\sec x + \tan x) = m(\tan x + \sec x)^m\sec x = my\sec x.

Exercise ●●○ Hardy: Examples XLIV, 16

Let ϕ(x)=x2sin⁡(1/x)\phi(x) = x^2\sin(1/x) for x≠0x \ne 0 and ϕ(0)=0\phi(0) = 0. Find ϕ′(x)\phi'(x) for x≠0x \ne 0 and for x=0x = 0, and show that ϕ′\phi' is not continuous at 00.

Hint
For x≠0x \ne 0 use the product and chain rules; at x=0x = 0 go back to the definition.

Solution

For x≠0x \ne 0: ϕ′(x)=2xsin⁡(1/x)+x2cos⁡(1/x)⋅(−1/x2)=2xsin⁡(1/x)−cos⁡(1/x)\phi'(x) = 2x\sin(1/x) + x^2\cos(1/x)\cdot(-1/x^2) = 2x\sin(1/x) - \cos(1/x). At 00 the rules do not apply (the formula for ϕ\phi is different there), so use the definition: {ϕ(h)−ϕ(0)}/h=hsin⁡(1/h)→0\{\phi(h) - \phi(0)\}/h = h\sin(1/h) \to 0, so ϕ′(0)=0\phi'(0) = 0. As x→0x \to 0, 2xsin⁡(1/x)→02x\sin(1/x) \to 0 while cos⁡(1/x)\cos(1/x) oscillates between −1-1 and 11. So ϕ′(x)\phi'(x) oscillates between −1-1 and 11 and has no limit: ϕ′\phi' exists everywhere but is discontinuous at 00. This example returns in §125 and §129.

Exercise ●○○ Hardy: Examples XLIV, 17

Find the tangent and normal to the circle x2+y2=a2x^2 + y^2 = a^2 at (x0,y0)(x_0, y_0), and reduce them to xx0+yy0=a2xx_0 + yy_0 = a^2 and xy0−yx0=0xy_0 - yx_0 = 0.

Solution

Differentiating implicitly, 2x+2y dy/dx=02x + 2y\,dy/dx = 0, so the slope at (x0,y0)(x_0, y_0) is −x0/y0-x_0/y_0 (when y0≠0y_0 \ne 0). The tangent is y−y0=−(x0/y0)(x−x0)y - y_0 = -(x_0/y_0)(x - x_0), that is, yy0−y02=−xx0+x02yy_0 - y_0^2 = -xx_0 + x_0^2, or xx0+yy0=x02+y02=a2xx_0 + yy_0 = x_0^2 + y_0^2 = a^2. The normal has slope y0/x0y_0/x_0 and passes through (x0,y0)(x_0, y_0): y−y0=(y0/x0)(x−x0)y - y_0 = (y_0/x_0)(x - x_0), that is, x0y=y0xx_0y = y_0x, or xy0−yx0=0xy_0 - yx_0 = 0, the line through the centre, as it should be. Both final forms also cover the points where y0=0y_0 = 0 or x0=0x_0 = 0.

Check yourself

Check yourself Enter a number

Using principal values, what is the derivative of arcsin⁡x\arcsin x at x=12x = \tfrac12? (Give a decimal.)

Why

1/1−14=1/3/4=2/3≈1.15471/\sqrt{1 - \tfrac14} = 1/\sqrt{3/4} = 2/\sqrt3 \approx 1.1547. The principal value arcsin⁡12=16π\arcsin\tfrac12 = \tfrac16\pi has cos⁡y>0\cos y > 0, so the sign is ++.

Check yourself Enter a number

What is dy/dxdy/dx for the circle x2+y2=25x^2 + y^2 = 25 at the point (3,4)(3, 4)?

Why

Implicitly, 2x+2y y′=02x + 2y\,y' = 0, so y′=−x/y=−3/4y' = -x/y = -3/4. The tangent is perpendicular to the radius, whose slope is 4/34/3.

Check yourself True or false?

The rule (xm)′=mxm−1(x^m)' = mx^{m-1} with m=13m = \tfrac13 shows that x3\sqrt[3]{x} has a derivative at x=0x = 0.

Why

False. The rule is proved for x≠0x \ne 0, and at 00 the formula 13x−2/3\tfrac13 x^{-2/3} is not even defined. Directly: the chord slope h−2/3h^{-2/3} tends to +∞+\infty, a vertical tangent. In the language of rule (7): ψ(y)=y3\psi(y) = y^3 has ψ′(0)=0\psi'(0) = 0, so the inverse has no derivative there.

Check yourself Choose one

With the principal value 0≤arccos⁡x≤π0 \le \arccos x \le \pi, which is the derivative of arccos⁡x\arccos x for −1<x<1-1 < x < 1?

Why

x=cos⁡yx = \cos y gives dy/dx=−1/sin⁡ydy/dx = -1/\sin y, and sin⁡y>0\sin y > 0 for 0<y<π0 < y < \pi. So the derivative is −1/1−x2-1/\sqrt{1 - x^2} throughout: the principal arc cos is a decreasing function. The sign changes only if we move to another branch, never within the principal one.

Hardy’s language

Summary

Summary
  • (xm)′=mxm−1(x^m)' = mx^{m-1} for every rational mm (with x≠0x \ne 0): write x=zqx = z^q, y=zpy = z^p and divide derivatives.
  • Implicit differentiation: differentiate the defining equation through, treating yy as a function of xx, then solve for y′y'.
  • sin⁡′=cos⁡\sin' = \cos, cos⁡′=−sin⁡\cos' = -\sin, tan⁡′=sec⁡2\tan' = \sec^2, sec⁡′=tan⁡sec⁡\sec' = \tan\sec, and so on, from the quotient rule.
  • Inverse functions: reflect the graph, invert the slope. (arctan⁡x)′=1/(1+x2)(\arctan x)' = 1/(1 + x^2); (arcsin⁡x)′=±1/1−x2(\arcsin x)' = \pm 1/\sqrt{1 - x^2}, with ++ on the principal branch.
  • Where ψ′=0\psi' = 0 the inverse function has a vertical tangent and no derivative.