24  Elementary Functions

In this section we look at how to find derivatives of functions which are defined not explicitly, but by the functional equations defining exponentials, logarithms and trigonometric functions.

24.1 Exponentials

Proposition 24.1 Let E(x) be an exponential function. Then E is differentiable on the entire real line, and E(x)=E(0)E(x)

First we show that this formula holds so long as E is actually differentiable at zero. Thus, differentiability at a single point is enough to ensure differentiability everywhere and fully determine the formula!

Proof. Let xR, and hn0. Then we compute E(x) by the following limit: E(x)=limE(x+hn)E(x)hn

Using the property of exponentials and the limit laws, we can factor an E(x) out of the entire numerator:

=limE(x)E(hn)E(x)hn=E(x)limE(hn)1hn

But, E(0)=1 so the limit here is actually the *derivative of E at zero$!

E(x)=E(x)E(0)

Next, we tackle the slightly more subtle problem of showing that E is in fact differentiable at zero. This is tricky because all we have assumed is that E is continuous and satisfies the law of exponents: how are we going to pull differentiability out of this? One trick is two parts (1) show the right and left hand limits defining the derivative exist, and (2) show they’re equal.

In fact, E(0) is a known number, its the natural log of a (Cite where we’ll prove this later)

Proof. Because E is convex () so the difference quotient is monotone increasing and so the limit limx0 exists (as a sup) and limx0+ exists (as an inf). Now that we know each of these limits exist, let’s show they are equal using the definition: To compute the lower limit, we can choose any sequence approaching 0 from below: let hn be a positive sequence with hn0, then hn will do:

limh0E(h)1h=limE(hn)1hn As E(hn)=1/E(hn), we compute
limE(hn)1hn=lim1E(hn)1hn=lim1E(hn)hn1Ehn=limE(hn)1hn1E(hn)

But, since E is continuous (by definition) and E(0)=1 the limit theorems imply lim1E(hn)=1limE(hn)=1E(limhn)=1E(0)=1 Thus, lim(E(hn)1hn1E(hn))=(limE(hn)1hn)(lim1E(hn))=limE(hn)1hn But this last limit evaluates exactly to the limit from above since hn>0 and hn0. Stringing all of this together, we finally see limh0E(h)1h=limh0+E(h)1h As both one sided limits exist and are equal the entire limit exists: E is differentiable at 0.

When studying the functional equations for logs and exponentials we saw there is not one solution but a whole family of them. While the functional equation itself gave no preference to any exponential over any other, the derivative selects an obvious natural candidate:

Definition 24.1 We write exp(x) for the exponential function which has exp(0)=1. This exponential satisfies the simple differential identity exp(x)=exp(x)

Note that by the chain rule we know such a thing exists so long as any exponential exists. If E(x) is any exponential then E(x/E(0)) has derivative 1 at x=0!

24.1.1 A Series Representation

To work with the natural exponential efficiently, we need to find a formula that lets us compute it. And this is exactly what power series are good at! However, the theory of power series is a little tricky, as we saw in the last chapter. Not every function has a power series representation, but if a function does, there’s only one possibility:

Proposition 24.2 If the natural exponential has a power series representation, then it is p(x)=k0xkk!

Proof. We know the only candidate series for a function f(x) is k0f(k)(0)k!xk, so for exp this is

p(x)=k0exp(k)(0)k!xk

However, we know that exp=exp and so inductively exp(k)=exp, and so exp(k)(0)=exp(0)=1 Thus p(x)=k01k!xk

Since p is a power series, this really means that the limit of its partial sums equals exp(x), or

xRexp(x)=limNpN(x)

For any finite partial sum pN, we know that it is not exactly equal to exp(x) (as this finite sum is just a polynomial!). Thus there must be some error term RN=exppN, or

exp(x)=pN(x)+RN(x)

This is helpful, as we know from the previous chapter how to calculate such an error, using the Taylor Error Formula: for each fixed xR and each fixed NN, there is some point cN[0,x] such that

RN(x)=exp(N+1)(cN)(N+1)!xN+1

And, to show the power series becomes the natural exponential in the limit, we just need to show this error tends to zero!

Proposition 24.3 As N, for any xR the Taylor error term for the exponential goes to zero: RN(x)0

Proof. Fix some xR. Then for an arbitrary N, we know RN(x)=exp(N+1)(cN)(N+1)!xN+1 where cN[0,x] is some number that we don’t have much control of (as it came from an existence proof: Rolle’s theorem in our derivation of the Taylor error). Because we don’t know cN explicitly, its hard to directly compute the limit and so instead we use the squeeze theorem:

We know that exp is an increasing function: thus, the fact that 0cNx implies that 1=exp(0)exp(cN)exp(x), and multiplying this inequality through by xN+1(N+1)! yields the inequality

xN+1(N+1)!RN(x)=exp(cN)xN+1(N+1)!exp(x)xN+1(N+1)!

(Here I have assumed that x0: if x<0 then the inequalities reverse for even values of N as xN+1 is negative and we are multiplying through by a negative number. But this does not affect the fact that the error term RN(x) is still sandwiched between the two.)

So now our problem reduces to showing that the upper and lower bounds converge to zero. Since exp(x) is a constant (remember, N is our variable here as we take the limit), a limit of both the upper and lower bounds comes down to just finding the limit

limNxN+1(N+1)

But this is just the N+1st term of the power series p(x)=n0xn/n! we studied above! And since this power series converges, we know that as n its terms must go to zero (the divergence test). Thus

limNxN+1(N+1)=0limNexp(x)xN+1(N+1)=0

and so by the squeeze theorem, RN(x) converges and

limNRN(x)=0

Now we have all the components together at last: we know that exp exists, we have a candidate power series representation, that candidate converges, and the error between it and the exponential goes to zero!

Theorem 24.1 The natural exponential is given by the following power series exp(x)=k0xkk!

Proof. Fix an arbitrary xR. Then for any N we can write exp(x)=pN(x)+RN(x) For pN the partial sum of p(x)=k0xk/k! and RN(x) the error. Since we have proven both pN and RN converge, we can take the limit of both sides using the limit theorems (and, as exp(x) is constant in N, clearly limNexp(x)=exp(x)):

exp(x)=limN(pN(x)+RN(x))=limNpN(x)+limNRN(x)=p(x)+0=k0xkk!

Its incredible in and of itself to have such a simple, explicit formula for the natural exponential. But this is just the beginning: this series actually gives us a means to express all exponentials:

Theorem 24.2 Let E(x) be an arbitrary exponential function. Then E has a power series representation on all of R which can be expressed for some real nonzero c as

E(x)=n0cnn!xn

Proof. Because E is an exponential we know E is differentiable, and that E(x)=E(0)E(x) for all x. Note that E(0) is nonzero; else we would have E(x)=0 constantly, and so E(x) would be constant. Set c=E(0).

Now, inductively take derivatives at zero: E(0)=cE(0)=c2E(n)(0)=cn

Thus, if E has a power series representation it must be n0cnn!xn=n01n!(cx)n

This is just the series for exp evaluated at cx: since exp exists and is an exponential, so is this function (as its defined just by a substitution). So there is such an exponential.

24.1.2 The Number e

Recalling our work with irrational exponents, we know that exponentials are powers: if E is an exponential with E(1)=a, then we may write E(x)=ax for any xR (defined as a limit of rational exponents). So, our special exponential exp comes with a special number as its base.

Definition 24.2 We denote by the letter e the base of the exponential exp(x): that is, e=exp(1), and exp(x)=ex

What is this natural base? We can estimate its value using the power series representation for exp, and the Taylor error formula.

Proposition 24.4 The base of the natural exponential is between 2 and 3.

Proof. The series defining e is all positive terms, so we see that e is greater than any partial sum. Thus 2=1+1=10!+11!<k01k!=e so we have the lower bound. To get the upper bound, we need to come up wtih a computable upper bound for our series. This turns out to be not that difficult: as the factorial grows so quickly, we can produce many upper bounds by just fining something that grows slower than the reciprocal and summing up their reciprocals. For instance, when k2 k(k1)k!

and so,

e=k01k!=1+1+k21k!1+1+k21k(k1)

But this upper bound now is our favorite telescoping series! After a rewrite with partial fractions, we directly see that it sums to 1. Plugging this in,

e<1+1+1=3

How can we get a better estimate? Since we do have a convergent infinite series just sitting here defining e for us, the answer seems obvious - why don’t we just sum up more and more terms of the series? And of course - that is part of the correct strategy, but it’s missing one key piece. If you add up the first 10 terms of the series and you get some number, how can you know how accurate this is?

Just because the first two digits are 2.7, who is to say that after adding a million more terms (all of which are positive) it won’t eventually become 2.8? To give us any confidence in the value of e we need a way of measuring how far off any of our partial sums could be.

Our usual approach is to try and produce sequences of upper and lower estimates: nested intervals of error bars to help us out. But here we have only one sequence (and producing even a single upper bound above was a bit of work!) so we need to look elsewhere. It turns out, the correct tool for the job is the Taylor Error formula once more!

Proposition 24.5 Adding up the first N terms of the series expansion of e results in a an estimate of the true value accurate to within 3/(N+1)!.

Proof. The number e is defined as exp(1), and so using x=1 we are just looking at the old equation

exp(1)=pN(1)+RN(1)

Where RN(1)=exp(cN)1N+1(N+1)! for cN[0,1]. Since exp is increasing, we can bound exp(cN) below by exp(0)=1 and above by exp(1)=e, and e above by 3: thus

1(N+1)!RN(x)3(N+1)!

And so, the difference |epN(1)|=|RN(1)| is bounded above by the upper bound 3/(N+1)!

This gives us a readily computable, explicit estimate. Precisely adding up to the N=5th term of the series yields

1+1+12+16+124+11202.71666

with the total error between this and e is less than 36!=1240=0.0041666. Thus we can be confident that the first digit after the decimal is a 7, as 2.71760.0041=2.7135e2.7176+0.0041=2.7217.

Adding up five more terms, to N=10 gives

1+1+12+13!++110!=2.71828180114638

now with a maximal error of 3/11!=0.000000075156. This means we are now absolutely confident in the first six digits:

e2.718281

Pretty good, for only having to add eleven fractions together! Thats the sort of calculation one could even manage by hand.

24.2 Logarithms

Having done all this work for exponentials, we can immediately confirm that logarithms are also differentiable, and give a simple formula.

Proposition 24.6 Let L be a logarithm function, then L is differentiable and L(x)=L(1)x

Proof. Let L be a logarithm, with inverse the exponential E(x). We know that E is differentiable and E(x)0 as its a constant multiple of the everywhere-positive E(x) itself. Thus by the function L is also differentiable. Choosing b>0 and setting L(b)=a gives L(b)=1E(a)=1E(0)E(a)=1E(0)b Where the last equality follows as L(b)=a implies E(a)=b

Now we apply the theorem on differentiability of inverses one more time to remove the mention of E in the final answer, and express everything in terms of the logarithm itself. Since E(0)=1 and L(1)=0, we have L(1)=1E(0) and substituting this in gives the claimed form.

Thus every logarithm has as its derivative some multiple of 1/x. While the functional equation doesn’t distinguish between these different logarithms, calculus finds one of them most natural: when this constant is equal to 1!

Definition 24.3 (The Natural Log) We write log for the logarithm function which has log(1)=1. This logarithm satisfies the simple differential identity log(x)=1x

Furthermore the two notions of “naturalness” picking out a logarithm and an exponential are compatible with one another!

Corollary 24.1 The natural exponential and natural log are inverses of one another.

We will make much use of this pair of special functions, and their exeedingly simple differentiation rules. As a first application, we give a re-proof of the power rule avoiding difficult limiting arguments:

Theorem 24.3 (The General Power Rule) If aR and f(x)=xa. Then f is differentiable for all x>0, and (xa)=axa1

Proof. Let exp be the natural exponential, and log be the natural log. Then exp(log(x))=x, and so exp(log(xa))=xa. Using the property of logarithms and powers (?cor-log-exponent) this simplifies

xn=exp(log(xa))=exp(alog(x))

By the chain rule,

[exp(alog(x))]=exp(alog(x))[alog(x)]=exp(alog(x))alog(x)=exp(alog(x))a1x

But, recalling that exp(alog(x))=exp(log(xa))=xa this simplifies to

=xaa1x=axa1

Unfortunately our newfound tool does not apply so well to giving a formula for the logarithm: power series are always defined on some symmetric interval (r,r) about 0, but the domain of the logarithm is (0,). Thus there is no simple power series that will equal log(x)!. We will come up with formulas to compute the logarithm later on, first as an integral; and then as a series (that converges only for some values of x).

24.3 Trigonometric Functions

Recall our definition of trigonometric functions: two functions s(x),c(x) are trigonometric if they satisfy the angle difference identities s(xy)=s(x)c(y)c(x)s(y)c(xy)=c(x)c(y)+s(x)s(y)

In one option for the final project in this class, you prove that such functions exist by taking a proposed power series, and showing directly that it satisfies these identities. Our goal in this section is to build up the work that leads to proposing that power series via a sequence of exercises

Exercise 24.1 Assume that a pair s(x),c(x) of trigonometric functions are differentiable at zero (so s(0), c(0) exist). Use the functional equations defining them to show that they are differentiable at every xR.

Hint: Write out the difference quotients, as a limit h0 for f(x+h)f(x). Additionally, we know s,c are continuous by definition, and have previously shown c(0)=1, s(0)=0.

We will not prove that s and c are differentiable at zero here (though that can be done, much like we did for the exponential above!). Since our goal is simply to propose a power series,

Exercise 24.2 Prove that if s(x),c(x) are differentiable at zero, then c(0)=0 and s(0)0.
Then deduce the following differentiation laws: s(x)=λc(x)c(x)=λs(x)

for λ some nonzero constant.

Hint: recall the definition that s,c are nonconstant and continuous. Also recall Fermat’s Theorem.

This singles out an obvious ‘best’ set of trigonometric functions, setting the arbitrary constant parameter that appears equal to one!

Definition 24.4 (The Natural Trigonometric Functions) The natural trigonometric functions are the pair sin(x),cos(x) with sin(x)=cos(x)cos(x)=sin(x)

Exercise 24.3 Show that if the natural trigonometric functions have a series representation they must be sin(x)=n0(1)n(2n+1)!x2n+1 cos(x)=n0(1)n(2n)1x2n

As part of the optional final project, you show these functions do satisfy the angle identities, and are periodic. This defines a natural number associated to trigonometry, much as we had the natural number e associated to exponentiation.

Definition 24.5 (π) The natural trigonometric functions are periodic, and we define their half period as π.

That is, π is the smallest positive number such that sin(x+2π)=sin(x) and cos(x+2π)=cos(x) for all xR.

Exercise 24.4 Prove that π/2 is the smallest positive zero of cos(x).

Exercise 24.5 (Approximating π with Newton’s Method) The first zero of cos(x) is π/2, so one might hope to use Newton’s method to produce an approximation for π. Show the sequence xn+1=N(xn)=xn+cos(xn)sin(xn) starting at x0=1 converges to π/2, and use a calculator to compute the first couple terms.

This of course is not very satisfying as we had to use a calculator to find values of sin and cos! But we know enough to approximate these values with a series expansion.

Exercise 24.6 How many terms of the series expansions of sin, cos are needed to evaluate at x=1 to within 0.0001? Use this many terms of the series expansion to approximate the terms appearing in the first two iterations of Newtons method 1,N(1),N(N(1)) What is your approximate value for π resulting from this?

24.4 Existence of Exponentials: an Alternative Proof

Our argument above used that we had previously confirmed the existence of exponential functions, together with the Taylor Error formula to find a series representation. But as often happens, the amount of new technology we have developed along the way gives a new self-contained means of both proving the existence of exponentials, and constructing their series in one stroke! We give this alternative argument here.

The idea essentially turns some of our previous reasoning on its head: we start by looking at solutions to the equation y=y and (1) show they satisfy the law of exponents, then (2) construct an explicit solution as a power series. First, a helpful lemma about this differential equation:

Proposition 24.7 Let f,g be two solutions to the differential equation y=y. Then they are constant multiples of one another.

Proof. Consider the function h(x)=f(x)g(x). Differentiating with the quotient rule,

h(x)=f(x)g(x)f(x)g(x)g(x)2=f(x)g(x)f(x)g(x)g(x)2=0g(x)2=0

Thus h(x)=0 for all x, which implies h=f/g is a constant function, and g is a constant multiple of f as claimed.

Now we’re ready for the main theorem:

Theorem 24.4 Let g be any differentiable function which solves g=g and has g(0)=1. Then g is an exponential.

Proof. Let g:RR solve Y=Y and satisfy g(0)=1. We wish to show that g(x+y)=g(x)g(y) for all x,yR.

So, fix an arbitrary y, and consider each of these separately, defining functions L(x)=g(x+y) and R(x)=g(x)g(y).
Differentiating,

L(x)=(g(x+y))=g(x+y)(x+y)=g(x+y)=L(x)

R(x)=(g(x)g(y))=(g(x))g(y)=g(x)g(y)=R(x)

Thus, both L and R satisfy the differential equation Y=Y. Our previous proposition implies they are constant multiples of one another,

L(x)R(x)=kxR

To find this constant we evaluate at x=0 where (using g(0)=1) we have L(0)=g(0+y)=g(y) R(0)=g(0)g(y)=g(y)

They are equal at 0 so the constant is 1:

L(x)R(x)=L(0)R(0)=g(y)g(y)=1 L=R

But these two functions are precisely the left and right side of the law of exponents for g. Thus their equality is equivalent to g sayisfying the law of exponents for this fixed value of y:

x,L(x)=g(x+y)=g(x)g(y)=R(x)

As y was arbitrary, this holds for all y, and g is an exponential.

This proof does not establish the existence of a solution to this equation, it only says if you have a solution then its an exponential. But we may now use the theory of power series to directly construct a solution!

Proposition 24.8 The series E(x)=n0xnn! satisfies E(x)=E(x) and E(0)=1. Thus, it defines an exponential function.

Proof. This series converges on the entire real line via the ratio test (as checked above). Thus it defines a continuous and differentiable function on R, which can be differentiated term-by-term (?thm-pseries-differentiation) to yield E(x)=(1+x+x22+x36++xnn!+)=(1)+(x)+(x22)+(x36)++(xnn!)+=0+1+x+3x26++nxn1n!+=1+x+x22++xn1(n1)!+=E(x)

Finally, plugging in zero yields E(0)=1+0+022!+=1, finishing the argument.