Week 5 Differentiating ln, xb, sin and cos

Version 2025/02/26 Week 5 in PDF All notes in PDF To other weeks

We start this chapter by differentiating ln(x), the natural logarithm function. Since we introduced ln as the inverse function of ex, we will need the following result.

The Inverse Rule of differentiation

Theorem 5.1: The Inverse Rule.

Let f(x) be strictly monotonic and continuous on [a,b], and let g be the inverse of f so that g is strictly monotonic and continuous by the Inverse Function Theorem.

Suppose f is differentiable at (a,b) and that the derivative f() is not zero.

Then g is differentiable at k=f(), and g(k)=1f().

  • Proof. We begin in the same way as in the proof of the Chain Rule: using Proposition 4.6, write f(x)f()=F(x)(x) for all x and in particular for x=g(y), so

    f(g(y))f(g(k))=F(g(y))(g(y)g(k)).

    Since f and g are inverse to each other, f(g(y))=y, so

    yk=F(g(y))(g(y)g(k)).

    When yk, we have yk0, and the equation shows that F(g(y))0 (because the left-hand side is not 0). When y=k, we have F(g(y))=F()=f() which is not 0 by assumption. Hence F(g(y)) is never zero, and we can divide by it:

    1F(g(y))(yk)=g(y)g(k).

    Since 1F(g(y)) is continuous at y=k by Algebra of Continuous Functions and continuity of composition, by Proposition 4.6 g(y) is differentiable at k with

    1F(g(k))=1F()=1f()

    as derivative.

We immediately deduce

Corollary 5.2: inverse of a function differentiable on an interval.

If f is strictly monotone and differentiable on an open interval, its inverse function f1 is differentiable everywhere it is defined except the points f() with f()=0, and

d(f1)dy(y)=1dfdx(f1(y)).\qed

Can the derivative of a strictly increasing function be zero at some points? Yes:

Example: a point where the inverse to a monotone function is not differentiable.

Construct a continuous strictly increasing function f(x) such that f()=0 for some point . Check that f1 is not differentiable at f() in your example.

Solution: for example, f(x)=x3 and =0. We have f(0)=0. For the inverse function y3, the limit limy00y3y03y0=limy01(y3)2 is . This suggests “infinite derivative” at 0, yet formally means that y3 is not differentiable at 0. Figure 5.1 shows horizontal tangent to the graph of x3, and vertical tangent for x3, at (0,0).

(-tikz- diagram)

Figure 5.1: x3 has zero derivative at 0, the inverse function is not differentiable at 0

Corollary: derivative of ln.

ddyln(y)=1y for all y(0,+).

Indeed, ln is the inverse function to exp, so, using the Inverse Rule and the Theorem which says that exp=exp, we calculate

ln(y)=1exp(ln(y))=1exp(ln(y))=1y.

Functions xb and ax

Definition: ab.

For positive real a and real b we define

ab=eblna.

Remark: this satisfies the exponent laws ab+c=abac, (ac)b=abcb, a0=1 and ab=1/ab (exercise: deduce these from the properties of the functions ln and exp). In particular, an defined as aaa (n factors) coincides with enlna.

Example: derivative of xb.

Fix bR. The function xb is defined for positive x. Show that

ddx(xb)=bxb1.

Solution. Indeed, by Chain Rule ddx(xb)=ddx(exp(bln(x))=exp(bln(x))bln(x). Using the derivatives of exp(x) and of ln(x) obtained earlier, this is exp(bln(x))bx1=xbbx1=bxb1 where we use the exponent laws.

Exercise. Let a>0. Use the Chain Rule to show that ddx(ax)=axlna.

The limit definition of ex (optional material)

The section “The limit definition of ex” was not covered in class and is not examinable.

Although in this course we define ex as the sum k0xk/k!, originally it was defined via the following limit.

Proposition 5.3: the limit definition for ex (not examinable).

For all xR, ex=limn(1+xn)n. In particular, e=limn(1+1n)n.

  • Proof. The function ln(1+y) is differentiable (by Chain Rule), and its derivative at y=0 is 11+0=1. By Proposition 4.6 we can write ln(1+y)=F0(y)y where the slope function F0 is continuous at 0 with F0(0)=1. Then for a fixed xR,

    (1+xn)n=enln(1+xn)=enF0(xn)xn=eF0(xn)x.

    The sequence yn=xn is monotone with limit 0 so Lemma 1.1 and its Corollary tell us that limneF0(yn)x is limy0eF0(y)x. Since eF0(y)x is a continuous function of y, by criterion of continuity its limit as y0 equals its value at 0, which is eF0(0)x=e1x=ex.

End of the non-examinable section.

The functions sin and cos

In this course, sin𝛼 and cos𝛼 are defined as the ratio of sides in a right-angled triangle. Thus, if P𝛼 is the point on the unit circle centred at the origin O such that the angle between the x axis and OP𝛼 is 𝛼, then P𝛼 has coordinates (cos𝛼,sin𝛼). This defines the sine and cosine of all 𝛼R, see Fig. 5.2. Note that 𝛼 is in radians: the angle equal to the full revolution (full circle) is 2𝜋. The definition implies that for all 𝛼R,

cos(𝛼)=cos𝛼, sin(𝛼)=sin𝛼, cos𝛼=sin(𝜋2𝛼).

We also define tan𝛼=sin𝛼cos𝛼 whenever cos𝛼0. When 𝛼(𝜋2,𝜋2), the straight line OP𝛼 intersects the tangent to the circle at P0 at the point T𝛼(1,tan𝛼), see Fig. 5.2.

(-tikz- diagram)

Figure 5.2: definition of sin𝛼, cos𝛼 and tan𝛼

Lemma 5.4: the sine-angle-tangent inequality.

0sin𝛼𝛼tan𝛼 for all 𝛼(0,𝜋2).

  • Proof. In Fig. 5.2, area(OP0P𝛼) = 12 × base × height =12×1×sin𝛼=12sin𝛼.

    The area of the sector OP0P𝛼 with central angle 𝛼 is 𝛼2𝜋 × area(circle) = 𝛼2𝜋×𝜋=12𝛼.

    Area(OP0T𝛼) is 12×1×tan𝛼. We have OP0P𝛼 sector OP0P𝛼 OP0T𝛼, therefore 12sin𝛼12𝛼12tan𝛼.

Remark. Graphs in Fig. 5.3 illustrate the behaviour of sinx, x and tanx for small x.

(-tikz- diagram)

Figure 5.3: graphs of sinx, x and tanx for small x

Corollary 5.5: limit of sine at 0.

limx0|sinx|=0.

  • Proof.

    The inequality in Lemma 5.4 can be written as 0|sinx|x when x(0,𝜋2), as sinx is positive for these x. Since limx0+0=limx0+x=0, we have limx0+|sinx|=0 by Sandwich Rule.

    Putting t=x, we have limx0|sinx|=limt0+|sin(t)|=limt0+|sint|=0.

    The one-sided limits exist and are equal, so limx0|sinx| is their common value 0.

We need another result about sin and cos with a geometric proof.

Lemma 5.6: sine and cosine subtraction formulas.

i. sinysinx=2sin(yx2)cos(y+x2);
ii. cosycosx=2sin(yx2)sin(y+x2).

(-tikz- diagram)

Figure 5.4: proof of the sine addition formula for sin𝛼+sin𝛽

  • Proof of Lemma 5.6 — proof not examinable. If M is the midpoint of the segment P𝛼P𝛽, the vector OM is 12(OP𝛼+OP𝛽) and so the y-coordinate of M is 12(sin𝛼+sin𝛽). On the other hand, see Fig. 5.4, OM is proportional to OP(𝛼+𝛽)/2 and, from the right-angled triangle OMP𝛽 we can see that OM=cos(𝛼𝛽2)OP(𝛼+𝛽)/2. This expresses the y-coordinate of M via the y-coordinate of P(𝛼+𝛽)/2:

    12(sin𝛼+sin𝛽)=cos(𝛼𝛽2)sin(𝛼+𝛽2).

    This sine addition formula holds for all 𝛼,𝛽R. Substitute 𝛼=y, 𝛽=x to obtain the sine subtraction formula i. as claimed.

    Substitute 𝛼=𝜋2y, 𝛽=x𝜋2: the LHS becomes 12(sin(𝜋2y)sin(𝜋2x)) which is 12(cosycosx), the RHS becomes cos(𝜋2y+x2)sin(y+x2)=sin(y+x2)sin(yx2), equivalent to the cosine subtraction formula ii.

Proposition 5.7: continuity of sin and cos.

sinx and cosx are continuous functions on R.

  • Proof. In the sine subtraction formula (Lemma 5.6), we bound the modulus of cos by 1:

    |sinysinx|=2|sinyx2||cosy+x2|2|sinh|,

    where we put h=(yx)/2. Opening out the modulus, we get

    2|sinh|sinysinx2|sinh|.

    Taking the limit as yx, equivalently h0, we have limh02|sinh|=0 by Corollary 5.5. Hence by Sandwich Rule

    limyxsin(y)sin(x)=0limyxsin(y)=sin(x),

    so by the criterion of continuity, sin is continuous at x.

    Continuity of cos is proved similarly and is left to the student.

Comparing the graphs of sinx and x in Fig. 5.3, we suspect that these two functions have the same gradient at 0. Let us formalise this.

Proposition 5.8: special limit for sine.

limx0sinxx=1.

  • Proof. We compute the one-sided limits. If x(0,𝜋2), we have

    cosx=sinxtanxsinxxsinxsinx=1

    from the sine-angle-tangent inequality in Lemma 5.4. As x0+, cosxcos0=1 because cos is a continuous function. Hence by Sandwich Rule limx0+sinxx=1.

    In limx0sinxx, change the variable, x=y. The limit becomes limy0+sin(y)y=limy0+sinyy=1.

    Both one-sided limits are equal to 1, so limx0sinxx exists and equals 1, as claimed.

Theorem 5.9: differentiation of sin and cos.

Functions sinx and cosx are differentiable everywhere on R, and

sinx=cosx,cosx=sinx.

  • Proof. Use the sine subtraction formula to write sinysinx=2sinhcos(x+h) with h=(yx)/2. Then

    sinysinxyx=2sinhcos(x+h)2h=sinhhcos(x+h),

    and so

    sinx=limh0sinhh×limh0cos(x+h)=1×cos(x+0)=cosx

    by AoL, the Special Limit for sine and continuity of cos.

    To differentiate cos, use cosycosx=2sinhsin(x+h) and conclude similarly.

Version 2025/02/26 Week 5 in PDF All notes in PDF To other weeks