Assignment 12

Exercise 1 Prove that the following two definitions of the derivative are equivalent:

f(a)=limxaf(x)f(a)xaf(a)=limh0f(a+h)f(a)h

Hint: recall the definitions, in terms of sequences. Assume for every xna with xna the first limit exists. Show that for every hn0 with hn0 the second limit exists, and equals the same value.

Solution. First, assume the limit limxaf(x)f(a)xa exists. This means for every sequence xna with xna, we know limf(xn)f(a)xna exists, and its value is independent of the choice of sequence. Now, choose an arbitrary sequence hn0 with hn0 and consider the limit f(a+hn)f(x)hn Since hn0 we see xn=a+hna (with x+hnx) and we already know for all such sequences the limit exists and takes the same value. Thus, since hn was arbitrary, our new limit always exists, and takes this same value! So limh0(f(a+h)f(a))/h exists.

The converse is an identical argument, but now we assume the limit f(a+hn)f(x)hn for all hn0, and setting xn=a+hn, we conclude the limit of (f(xn)f(a))/(xna) always exists.

Exercise 2 Let f:RR be a differentiable function and assume f(x)0 anywhere. Prove that f is monotone.

Hint: the mean value theorem

Proof. We prove the contrapositive: that if f is not monotone, then there must be a point where f=0. Note that its enough to find two points x,y in the domain with f(x)=f(y): if such a pair exists, then since f is continuous on [x,y] and differentiable on (x,y) we can apply Rolle’s theorem (or the Mean Value Theorem) to get a point z(x,y) with f(z)=0.

So, we need only show that if a function is not monotone there must exist a pair of points mapped to the same value. Since f is assumed to not be monotone, there must be some points a<b where f(a)<f(b) and other points c<d where f(c)>f(d). Let’s give names to these points how they’re ordered on the number line: x0 is the smallest, then x1,x2,x3 so we have x0<x1<x2<x3. In this list we must have at least one of f(x1),f(x2) being a “peak” (bigger than its neighbors) or a “valley” (smaller than its neighbors): if not, then either f is either increasing all the way along this sequence of xi’s or decreasing all the way, which leads to a contradiction with our original assumption (though requires a bit more writing to match up with cases and a,b,c,d).

Thus, without loss of generality (perhaps multiplying f by -1 if we had a valley) we can assume there are three points u<v<w where f(u)<f(v)>f(w). Now choose any y between f(v) and M=max{f(u),f(w)}. By the continuity of f on [u,v] we can use the intermediate value theorem to find a point in [u,v] which maps to y, and similarly by the intermediate value theorem on [v,w] we can find a point in this interval which maps to y. But now we have two points mapping to the same value, so our original argument applies and Rolles’ theorem furnishes a point in between where the derivative must be zero!

Exercise 3 The second derivative test in Calculus says that if f is a twice differentiable function with f(x)=0 and f(x)>0, then x is a minimum. Prove this

Hint: We proved Fermat’s theorem in class, and that f>0 implies f is increasing (using the Mean Value Theorem). Perhaps also remember that the second derivative is the derivative of the first derivative.

Solution.

Let x be a point such that f(x)=0, but f(x)>0. Since the derivative of f is positive, we know that f is increasing in a neighborhood (xδ,x+δ) of x (from a corollary of the mean value theorem). But since f(x)=0, this means that f must be negative immediately below x, and positive immediately above x. Thus, below x f must be decreasing on (xδ,x) and above x we must have f increasing on (x,x+δ). This means for all y(xδ,x) we know f(y)f(x) (as its decreasing) and for y(x,x+δ), f(x)f(y) (as its increasing). Putting this together, for all y(xδ,x+δ) we know f(x)f(y), so f(x) is a local minimum.

Trigonometric Functions

The majority of this assignment deals with the trigonometric functions starting from their functional equation definition.

Definition 1 (Angle Identities) A pair of two functions (c,s) are called trigonometric if they are a continuous nonconstant solution to the angle identities s(x+y)=s(x)c(y)+c(x)s(y) c(x+y)=c(x)c(y)s(x)s(y)

Starting from these two identities, much can be proven. For those of you completing the optional final project on trigonometry, you’ll do some of that there. But for these problems it will be helpful to remember a couple rather immediate corollaries of these that we proved in the text:

Proposition 1 If s,c are trigonometric functions, then s(x)2+c(x)2=1c(0)=1s(0)=0

In these problems instead of algebraic identities we consider differential ones

Exercise 4 Let s,c be trigonometric functions. Prove that if they are differentiable at zero (so s(0) and c(0) exist), that s and c are differentiable at every x on the real line.

Hint: use the angle identites, and the limit definition of the derivative, f(x)=limh0f(x+h)f(x)h

Solution. Assume that s,c are differentiable at zero, and let xR be arbitrary. Then computing s(x) from the limit definition, s(x)=limh0s(x+h)s(x)h=limh0s(x)c(h)+c(x)s(h)s(x)h =limh0(s(x)c(h)s(x)h+c(x)s(h)j) Factoring out s(x) from the first term, and using that s(0)=0, c(0)=1 we can rewrite this as limh0(c(x)c(h)1h+c(x)s(x)0h)=limh0(c(x)c(h)c(0)h+c(x)s(x)s(0)h) Using the fact that we know the derivatives at zero exist, we recognize the two limits appearing here! Knowing they exist allows us to apply the limit laws: =s(x)limh0c(h)c(0)h+c(x)limh0s(x)s(0)h=s(x)c(0)+c(x)s(0)

Thus, s(x) exists, and even better we have a formula for it! A similar calculation with tha angle sum identity for cosine implies that the derivative of cosine also exists.

Exercise 5 Assuming that s,c are differentiable trigonometric functions, prove that c(0)=0 and s(0)0.

Hint: we already know some things about c at 0… For s, what would happen of c(0)=s(0)=0, given what you learned in the previous problem?

Proof. We know that s2+c2=1 for all x, so c2(x)=1s2(x): thus c2(x)1 for all x, and so c(x)1 for all x. Since c(0)=1, we know this must be a maximum value, and by Fermat’s theorem the derivative of a differentiable function at a local max or min is zero. Thus c(0)=0

Now we consider s. Assume for the sake of contradiction that s(0)=0. Then using our derivative formula above, we see that for all x, s(x)=s(x)c(0)+c(x)s(0)=s(x)0+c(x)0=0+0=0

But as we’ve proven via the Mean Value Theorem, any function whose derivative is everywhere zero is constant, and a trigonometric pair of functions s,c were defined as nonconstant solutions to the angle sum identities. Thus s must be nonconstant, and we have a contradiction. This means s(0) must be nonzero.

Exercise 6 Let s(0)=λ be the derivative at zero. Combine what you’ve learned in the previous problems to show that differentiable trigonometric functions satisfy the identities s(x)=λc(x)c(x)=λs(x)

Further, prove that if s,c are trigonometric functions so are s(kx) and c(kx) for k0, and use differentiation laws to conclude that s(0) can take on any nonzero real value.

Proof. Let s,c be trigonometric and kR. Then the functions S(x)=s(kx),C(x)=c(kx) are continuous as they are the composition of continuous functions, and are nonconstant as s,c are nonconstant. Furthermore, they satisfy the trigonometric identities as S(x+y)=s(k(x+y))=s(kx+ky)=s(kx)c(ky)c(kx)s(ky)=S(x)C(y)C(x)S(y) and similarly for C.

Now let λR, λ0 be arbitrary. We want to show that its possible to build a trigonometric pair such S,C such that S(0)=λ. Using our original pair s,c we know about, since s(0)0 we can divide by it, and λ/s(0)R. Consider the trigonometric functions S(x)=(λs(0)x)C(x)=c(λs(0)x)

Using the chain rule,

S(x)=s(λs(0)x)λs(0)

So at x=0 S(0)=λs(0)s(0)=λ as required.

This tells us that just like exponentials, while the functional equation itself doesn’t pick out a specific function (but rather a whole one parameter family of them) calculus selects a natural choice: where the arbitrary constant that shows up in differentiation is unity!

Definition 2 The sine and cosine are defined by the conditions sin(0)=0, cos(0)=1 and sin(x)=cos(x)cos(x)=sin(x)

Exercise 7 Use the definition above to compute the taylor series for sine and cosine, and prove the series converge on the entire real line.

Solution. I’ll give the solution for sin(x), the cosine is analogous. The Taylor series is computed by finding hte nth derivatives at zero: sin=cos,sin=sinsin=cossin=sin Thus, after four cycles, the pattern repeats! Using the fact that we know the values of sine and cosine at zero we see the derivative terms in the taylor series are periodic with period 4, repeating the pattern sin(0)=0,cos(0)=1,sin(0)=0,cos(0)=1 Plugging these in yields 0+(1)x+0x22!+(1)x331+ where the pattern repeats again. We see all the even terms are zero, and the odd terms alternate between +1 and 1, so this gives xx33!+x55!x77!++(1)nx2n+1(2n+1)!+

Our investigation here started from the most basic trigonometric identity - the sum of angles - and came up with an explicit formula for two natural functions sin and cos. But there is still a gap in our argument! We have not proved that the series we derived actually do satisfy the angle sum identities we began with! This is where the trigonometry final project picks up: it starts with these infinite series, and proves they are in fact trigonometric! In the optional project you also prove that these functions are periodic which gives us a rigorous definition of π, as their half period.

Theorem 1 (From the Optional Project) The functions sin(x) and cos(x) defined above are trigonometric, and satisfy the trig identities. They are also periodic, and π is their half period.

From here, its immediate using the angle-sum identity to show that 1/4 the period of the trigonometric functions is the first zero of cosine. So we may also think of π as being defined by the fact that π/2 is the first positive zero of cos(x). This helps us estimate its value.

Exercise 8 The first zero of cos(x) is π/2, so one might hope to use Newton’s method to produce an approximation for π.

Find the function N(x) for Newton iteration, and use a calculator to compute iterates starting with x0=1. How many iterations do you need to preform to get 10 digits of accuracy?

Solution. This is just a numerical calculation, but you get there quickly: after 3 iterations already gives 10 digits of accuracy!

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 9 How many terms of the series expansions of sin, cos are needed to evaluate at x=1 to within 0.0001? (Estimate this using Taylor’s Error Formula)

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?

Solution. To figure out how many terms of the series we need, we use the Taylor Error formula. This guarantees that the difference between the Nth partial sum and f at 1 is equal to EN=f(n+1)(c)(n+1)! Where c[0,1]. Since both sine and cosine have all of their derivatives also being ±sin or ±cos and we know the sine and cosine to each be bounded in magnitude by 1, this means EN1(n+1)! We want the error to be less than 0.0001, so we are trying to solve 1/(n+1)!<0.0001: this is satisfied by n=7, as 1/8!=0.00002 (and this is the smallest such: n=6 gives 1/7!=0.000198). Working to this level of precision we have sin(x)xx36+x5120x75040 cos(x)1x22+x424x6720

From here it is just a calculation:

x1=N(1)1.6421 x2=N(1.64121)1.570681

Thus, we get our estimate for π by doubling:

π3.14136