30  Elementary Functions

We derive the integrals of familiar functions, and along the way finally discover a formula for the logarithm.

Using the fundamental theorem of calculus we can effortless find the integrals of many important functions, simply because we know their derivatives! This is much much quicker than working directly from the definition (as one can appreciate by looking at the optional chapter examples in the last part).

30.1 Polynomials and Power Series

We begin with perhaps the first example one sees in a Calculus I course :::{#prp-integrating-x} The function x is integrable on any interval [a,b]R, and [a,b]x=b22a22 :::

Proof. The function x is continuous, thus its integrable. We know by the power rule for differentiation that (x2)=2x. Thus by linearity of the derivative, if F(x)=x2/2, we have F=x, and we can use this antiderivative to evaluate the integral via the fundamental theorem: [a,b]x=F(b)F(a)=b22a22

This technique of inverting the power rule works for all n1 to give a general formula

Theorem 30.1 For any n>0 the function xn is integrable on [a,b] for any [a,b]R. For x<1, xn is not defined at 0 but is integrable on any interval [a,b] not containing zero. In both cases, there is a uniform formula for the integral: [a,b]xn=1n+1xn+1|[a,b]

Proof. The monomial xn is continuous, hence integrable, and has as an antiderivative xn+1n+1. Thus we can use this to evaluate the integral [a,b]xn=xn+1n+1|[a,b]

Using linearity of the integral, this gives an immediate calculation of the antiderivative of any polynomial:

Theorem 30.2 If p(x)=k=1Nakxk is any polynomial, then p is integrable on any interval [a,b] and [a,b]p(x)=k=1Nakk+1xk+1|[a,b]

Proof. Polynomials are continuous, hence integrable. We know an antiderivative of each term, so we compute one at a time via linearity of the integral on continuous functions: [a,b](a0+a1x+a2x2+anxn)=[a,b]a0+[a,b]a1x+[a,b]a2x2++[a,b]anxn =a0[a,b]1+a1[a,b]x+a2[a,b]x2++an[a,b]xn =a0x|[a,b]+a1x22|[a,b]+a2x33|[a,b]++anxn+1n+1|[a,b]

30.1.1 Power Series

As we remember well from differentiation, things that are true for finite sums don’t always carry over easily to the limit. Indeed, the proof of differentiability of polynomials was identical to their integration above, a direct corollary of linearity. But we cannot use linearity to conclude things about limits, so for power series we instead needed to refine our tools of dominated convergence. A similar strategy goes through without fail here for integration: one can use dominated convergence for integrals () to prove power series can be integrated term by term within their radius of converence.

But the fundamental theorem also makes a much easier technique available to us, given that we know the differentiation case! We follow that line of reasoning here.

Proposition 30.1 Let anxn be a power series with radius of convergence r. Then the series ann+1xn+1 also has radius of convergence r.

Proof. Like for the differentiable case, we prove this here under the assumption that the Ratio test succeeds in computing the radius of convergence for the original series. (As an exercise, show everything still works even if the ratio test fails, by doing the fully general argument with limsup of the root test). So for any x(R,R) lim|an+1an||x|<1

We now turn to compute the ratio test for our new series ann+1xn+1: the ratio in question is

an+1n+2xn+2ann+1xn+1=(an+1an)(n+1n+2)x

Since (n+1)/(n+2)1 we can compute the overall limit using the limit theorems and see we end up with the exact same limit as for the original series! Thus integrating term by term does not change the radius of convergence at all.

Having confirmed that ann+1xn converges when the original series does, we can provide a direct proof of the term-by-term integrability of power series, avoiding the use of dominated convergence:

Theorem 30.3 (Integrating Power Series) Let f(x)=anxn be a power series with radius of convergence r. Then f is integrable on (r,r) and for any 0<x<r [0,x]f=n0ann+1xn+1

Proof. The function anxn is continuous on (r,r) and thus integrable by . Define F(x)=ann+1xn. This converges on (r,r) by , and defines a differentiable function on this interval; whose derivative can be calculated term-by-term, giving F(x)=(n0ann+1xn+1)=n0anxn=f(x) Thus F is an antiderivative of f, and by the fundamental theorem of calculus [0,x]f=F(x)F(0) Since F has no constant term, F(0)=0 and so [0,x]f=n0ann+1xn+1 as claimed.

30.2 Exponentials and Trigonometric Functions

We put a good amount of work into defining exponential and trigonometric functions from their functional equations, proving they are continuous and eventually finding their differentiation laws. Now we reap some of the benefits, and find their integrals as effortless as we did the polynomials.

Theorem 30.4 (The Natural Exponential) THe natural exponential exp(x) is integrable and [a,b]exp=exp(b)exp(a)

Proof. The function exp is continuous, hence integrable, and its its own derivative. Thus, its also its own antiderivative, and [a,b]exp=exp|[a,b]=exp(b)exp(a)

Theorem 30.5 Let E(x) be any exponential function. Then E is integrable, and [a,b]E=E(b)E(a)E(0)

Proof. We proved that every exponential is continuous and differentiable, wtih E(x) a multiple of E(x): specifically, E=E(0)E. Dividing by the constant value E(0) and using linearity of the derivative, we see (E(x)E(0))=1E(0)(E(x))=1E(0)E(0)E(x)=E(x)

Thus we’ve found an antiderivative! The fundametnal theorem fo calculus then quickly finishes the job: [a,b]E=E(x)E(0)|[a,b]=E(b)E(a)E(0)

We succeed equally quickly for the basic trigonometric functions:

Theorem 30.6 (Integrating Sine and Cosine) [a,b]cos=sin(b)sin(a)[a,b]sin=cos(a)cos(b)

Proof. We know sin=cos and cos=sin from previous homework, Thus, cos has sin as an antiderivative, and [a,b]cos=sin|[a,b]=sin(b)sin(a) Similarly, sin has cos as an antiderivative, so [a,b]sin=cos|[a,b]=(cos(b)cos(a))=cos(a)cos(b)

These two formulae, together with the trigonometric identities are enough to fully determine all trigonometric integrals.

30.3 Logarithms

In this section we finally develop a formula for the logarithm: we proved it existed some time ago as we had already proven the inverses of exponentials were logarithms, and we proved that exponentials exist. But this did not give us any way to compute a logarithm. This is in stark contrast to the exponential, where right from the beginning we had some means of computing it (via the cumbersome task of taking limits of rational powers), and now we have a nice extremely efficient power series. We will remedy all of this in this subsection, by studying the simple function 1/x.

We already know there is something rather unique about this function, because it is the only case where the power rule fails us, and we can’t simply use our knowledge of differentiation to invert. To start, we prove a rather simple lemma that is key to unlocking the logarithm properties:

Lemma 30.1 If [a,b] is an interval of positive numbers and k>0 then the integral of 1/x on the intervals [a,b] and [ka,kb] are the same.

Proof. Intuitively this is plausible: when we multiply by k the length of our interval increases by a factor of k but the height of our function 1/x decreases by a factor of k at each point, leaving the area fixed.

To prove it, we (surprise!) invoke the fundamental theorem of calculus. Let F be an antiderivative of 1/x, so F(x)=1/x. Then look at F(kx): taking its derivative, we see by the chain rule F(kx)=F(kx)(kx)=kF(kx) And using that F=1/x, =k1kx=1x

Thus both F(x) and F(kx) are antiderivatives of 1/x! This means we can use either to evaluate our integral: so, using F(kx), [a,b]1x=F(kx)|[a,b]=F(kb)F(ka) But this quantity is exactly an antiderivative of 1/x evalluated at kb and ka, so F(kb)F(ka)=F(x)|[ka,kb]=[ka,kb]1x

Stringing these equalities together yields the result.

We can immediately use this to show the integral of 1/x has the logarithm property.

Theorem 30.7 (The Logarithm as an Integral) The function f(x)=1/x is integrable on (0,), and its integral L(x)=[1,x]1x satisfies the law of logarithms L(xy)=L(x)+L(y)$ for x,y>1.

Proof. The function 1/x is continuous on (0,) so it is integrable on any closed subinterval [a,b]. Let x,y>1 and consider the interval [1,xy]. We can decompose this into two intervals [1,x][x,xy] and so by subdivision L(xy)=[1,xy]1t=[1,x]1t+[x,xy]1t The first of these terms is by definition L(x), and the second can be calculated via our lemma: [x,xy]1t=[1,y]1t=L(y) Thus, L(xy)=L(x)+L(y), as claimed!

Exercise 30.1 Confirm this also works for arbitrary x,yR if we interpret our integral as an oriented integral ().

Using the fundamental theorem we can easily calculate the derivative of this logarithm at 1:

Corollary 30.1 (The Natural Logarithm) The integral of 1/x is the natural logarithm log(x)[1,x]1x

Proof. By the fundamental theorem log(x)=1x so evaluating at 1, \log(x)^\prime\Bigg_{x=1}=\frac{1}{1}=1

As is, this is not a very useful formula for the logarithm, as we can’t use antidifferentiation to compute it: the function we care about is defined as the antiderivative! But this does have dramatic implications: we can use this to derive a formula for the logarithm, via power series.

Theorem 30.8 (Logarithm Power Series) The function log(1+x) has a power series representation for x(1,1) log(1+x)=xx22+x33x44+x55

Proof. The geometric series converges on (1,1) to 11x=n0xn Making the substitution xx we can rewrite this as 11+x=n0(x)n=n0(1)nxn

This power series converges on (1,1) still, and so is integrable term-by-term along this entire interval: [0,x]11+x=[0,x]n0(1)nxn=n0[0,x](1)nxn=n0(1)nxn+1n+1

Since the integral of 1/x is log(x), its easy to see the antiderivative of 1/(1+x) is log(1+x), by differentiation using the chain rule: (log(1+x))=11+x(1+x)=11+x

Thus our power series is indeed a logarithm!

log(1+x)=n0(1)nxn+1n+1=xx22+x33

Example 30.1 (Integrating the Tangent) The function tan(x)=sin(x)/cos(x) is continuous on (π/2,π/2) and hence integrable on any [a,b](0,π/2). To find the value of the integral, we notice that

tan(x)=sin(x)cos(x)=1cos(x)sin(x)=1cos(x)(cos(x))

Since 1/x is the derivative of the natural logarithm function, we see this is the result of a chain rule! log(cos(x))=1cos(x)(cos(x)), and so log(cos(x))=tan(x) We have found an antiderivative for tangent, so the fundamental theorem yields its integral: [a,b]tan(x)=log(cos(x))|[a,b]=log(cos(b))+log(cos(a)) Using the rules of logarithms we can simplify this a bit to [a,b]tan(x)=log(fraccos(a)cos(b))

30.4 Inverse Trigonometric Functions

Understanding the inverse trigonometric functions will prove exceedingly useful to us in our end goal of calculating π: we have defined π as a particular input to the trigonometic functions (the first positive input at which sine is zero, for example), and so we don’t have a way to compute π by plugging something into a function: we’ve had to resort to methods like Newton’s approximation scheme, which requires a lot of calculation since we are working with a power series!

Our lives would be much easier if we had functions that yielded π as an output (of a simple value): we could then simply derive a means of computing this function! The natural such functions would be the inverse trigonometric functions, and so we take a moment to study these here.

30.4.1 The ArcSine

Our first fundamental problem of course is we have no idea how to get a formula for the inverse trigonometric functions! To get one, we will use the fact that we understand differentiation quite well, and then apply the fundamental theorem.

Proposition 30.2 The derivative of the inverse sine function is (arcsinx)=11x2

Proof. Let f(x)=arcsin(x). Then where defined, f(sin(θ))=θ by definition, and we may differentiate via the chain rule: on the left side ddθf(sin(θ))=f(sin(θ))cos(θ) and on the right ddθθ=1. Equating these and solving for f yields f(sin(θ))=1cos(θ) The only remaining problem is that we want to know f as a function of x and we only know its value implicitly, as a function of sin(θ). But setting x=sinθ we can express cosθ=1x2 via the pythagorean identity sin2θ+cos2θ=1. Thus

f(x)=11x2

Before integration this would have been a mere curiosity. But, armed wtih the fundamental theorem this is an extremely powerful fact: indeed, it directly gives us a representation as an integral:

Corollary 30.2 The inverse sine function is defined on the interval [0,1] by the integral arcsin(x)=[0,x]11x2

Proof. Since (arcsinx)=11x2, the inverse sine is an antiderivative of 11x2, and also sin(0)=0 implies arcsin(0)=0, so it is zero at x=0. Thus, it is exactly the area function arcsin(x)=[0,x]11t2

Exercise 30.2 Carry out the analogous reasoning to derive an integral expression for the inverse cosine function.

30.4.2 The ArcTangent

Proposition 30.3 (arctanx)=11+x2

Proof. We again proceed by differentiating the identity arctan(tanθ)=θ. This yields arctan(tanθ)1cos2θ=1 and multiplying through by cos2 we can solve for the derivative of arctangent: arctan(tanθ)=cos2θ

The only problem is again we have the derivative as a function implicitly of of tanθ, and we need it in terms of just an abstract variable x. Setting x=tanθ we see that x2=tan2θ and (using the pythagorean identity) x2+1=tan2θ+1=1cos2θ. Thus cos2θ=11+x2 and putting these two together, we reach what we are after

arctan(x)=11+x2

Proposition 30.4 The inverse function arctan(x) to the tangent tan(x)=sin(x)/cos(x) admits an integral representation arctan(x)=[0,x]11+t2

Proof. This follows as arctan(x)=1/(1+x2), so both arctan and this integral have the same derivative. As antiderivatives of the same function this means that they differ by a constant. Finally, this constant is equal to zero as arctan(0)=0 and [0,0]11+x2=0 as it is an integral over a degenerate interval.

This integral expression is quite nice - the arctangent like the logarithm is shown to be the integral of a rather simple rational function. But like arcsine, an integral expression is rather difficult to use for computing actual values: we’d need to actually compute (or estimate) some Riemann sums. So it’s helpful to look for other expressions as well, and here arctan has a particularly nice power series.

Recall the geometric series 11x=n0xn

We can substitute x2 for the variable here to get a series for 1/(1+x2):

11+x2=n0(x2)n=n0(1)nx2n =1x2+x4x6+x8

This power series has radius of convergence 1 (inherited from the original geometric series) and converges at neither endpoint. We know from the above that this function is the derivative of the arctangent, so we should integrate it!

arctan(x)=[0,x]11+t2dt=[0,x]n0(1)nt2ndt

Inside its radius of convergence we can exchange the order of the sum and the integral:

[0,x](n0(1)nt2n)dt=n0[0,x](1)nt2ndt=n0(1)n[0,x]t2ndt=n0(1)nx2n+12n+1

Theorem 30.9 For x(1,1), arctan(x)=n0(1)nx2n+12n+1 =xx33+x55x77+x99