EXAMPLE PROBLEMS
(done in the text)
•	A lake is stocked with 1000 fish. It is found that N(t), the number of fish after t years, increases so that its rate of increase is governed by the equation:  = k N (10,000 - N)  (called the "Logistic Equation"). Show that the rate of change, , is a maximum when the population is 5,000 fish.
•	The cost of manufacturing an item is $100 even if no items are manufactured ... and the cost decreases with each item; for x items the cost per item is 100 - .1x  (i.e. the cost decreases by $0.1 for each item). Graph C(x), the cost of producing x items.
•	An orchard contains 240 apple trees, each tree producing 30 bushels of apples. For each additional tree planted, the yield per tree decreases by 1/12 bushel (due to overcrowding). Sketch N(x), the total apple production as a function of x, the number of additional trees planted.
•	A conical drinking cup is formed from a circular piece of paper by removing a sector and joining the edges. If the radius of the piece of paper is 10 cm., what should be the angle q so as to yield a cup of maximum volume?
•	A man can run 10 times faster than he can swim. He begins in the water at a point P, swims to shore, then runs to Q. Describe his path so the total time is a minimum.
•	A certain amount of money is left in the bank to accumulate interest (compounded at i% per year). If you want to double your money in n years, what should the interest rate be?
•	In drilling a well, the cost per metre depends upon the type of sand, gravel or rock which must be excavated. Suppose the cost is C(x) dollars/metre at a depth x metres. (As x changes, the type of material changes, hence the cost changes.) Express, as a definite integral., the cost in digging a well of H metres.
•	The cost of manufacturing an item depends upon the number of items manufactured. For the first few items the cost is high and the profit low, but as we produce more items the cost decreases hence the profits (when we sell the items) increase. Suppose the profit for the nth item is p(n) dollars per item. Express, as a definite integral, the profit in producing (and selling) K items.
•	You invest $10,000 in a mutual fund, then, 5 months later you put an additional $15,000 into the fund, then, 3 months later put in an additional $5,000. At the end of a year, your investments (totalling $30,000) have grown to $31,470. What is the annual rate of return from this mutual fund?

ASSORTED PROBLEMS
(which you'll be able to solve by the end of this course)

1.	Evaluate:
	(a)				
	(b)	f'(2)  if f(x) = (x-2) sin  using the limit definition of derivative!
	(c)	f'(- )  if f(t) = | sin t |     (you needn't use the definition ... unless you want to)
2.	Compute the area bounded by the curves  y = and  x + 3y = 7.  (Include a sketch, and since this is a complicated evaluation with lots of room for errors, check for reasonableness.)
3.	Evaluate  
4.	Use Newton's Method to find approximations to the roots of the following equations, correct to five decimal places. In each case, make a reasonable plot of the function in order to obtain an the initial "guess", x1.
	(a)	x3 - x2 + x - 22 = 0		(b)	x ln x = 6
5.	Use l'Hopital's Rule to evaluate the following limits:
	(a)				(b)	
 6:	Express each of the following in terms of one or more definite integrals using both HORIZONTAL and VERTICAL rectangles. DO NOT EVALUATE  but include a sketch:
	(a)	The area bounded by  y = 0, y = x, y = ln x, and y = 1.
	(b)	The volume when the region described by 0 £ y £ 1 - x2, x ³ 0, is revolved about the y-axis.
7.	Evaluate each of the following limits (or explain why the limit does not exist):
	(a)			(b)	
8.	Evaluate:      
	(a)	cos		(b)	... and simplify your answer
9.	Calculate:
	(a)	the average value of  f(x) =  on 0 £ x £ 2		(b)	
10.	Evaluate: 	(a)		(b)	
11.	The function f(x) = , with domain x³ 0, has an inverse g(x).
	(a)	Test f(x) to verify that it does have an inverse when x ³ 0	
	(b)	Calculate g(2)		(c)	Calculate g'(2)

12.	The numbers p and e are both near "3". Which of ep or pe is larger?
13.	Determine the shortest distance from the origin to the curve y = (3 - x2)/2. Include a sketch!
14.	Find if :	(a)	y = 		(b)	y = x cos (ln x)
15.	Calculate the areas described (and include a sketch):	
	(a)	below y = and above y = 
	(b)	enclosed by y = , y = 0, x = -4  and x = -2.
16.	Evaluate	if  y = 
17.	(a)	If y = ax, determine by first taking the ln of each side.
	(b)	If y = xx, determine by first taking the ln of each side.
18.	Determine an approximate value  to 641/3 by using a linear approximation.
19.	Evaluate	
20.	Sketch the graph of f(x) = showing where f(x) is increasing, decreasing, asymptotes and all critical points.
21.	Find the area bounded by  y = and  y = tan x, between x = 0 and the first intersection of these two curves to the right of x = 0. (Include a reasonable sketch.)
22.	Calculate the area for each of the following regions (bounded by polar curves):
	(a)	inside r = sin q
	(b)	inside the cardioid  r = 1 + sin q and outside the circle r = 1
	(c)	inside the smaller loop of the limaçon r = 1 - 2 sin q
	(d)	inside the lemniscate  r2 = cos 2q
23.	Aluminum pop cans to hold 300 mL are made in the shape of right circular cylinders. Find the dimensions which minimize the amount of aluminum used.
24.	A rectangular field next to an ocean is to be fenced on three sides with 1000 m of fencing. (The fourth side, being the shoreline, is not fenced.) Determine the dimensions of the field so the area is as large as possible.
25.	A man 2m tall walks at 3 m/s directly away from a streetlight that is 8 m high. How fast is the length of his shadow changing?
26.	The hour and minute hands of a clock are 3 cm and 4 cm long respectively. How fast are their tips approaching each other at 3 o'clock?
27.	Obtain a cubic polynomial approximation to cos x at x = and use it to approximate cos 57°
28.	A picture 2 m tall hangs on a vertical wall, the lower edge being 1 m above your eyes. How far from the wall should you stand in order to obtain the "best view" of the picture? (i.e the angle subtended by the picture, at your eye, should be a maximum.)
29.	Show that the curves xy = and  x2 - y2 = 1 intersect so that, at the point(s) of intersection, their tangent lines are perpendicular.
30.	A tangent line, drawn to the curve + = 1, has x- and y-intercepts at P and Q. Show that the sum of the intercepts is a constant, independent of where the tangent line is drawn.
31.	Determine where the polar curves r = q and r = cos q intersect, for q > 0. (You'll need to use Newton's method!)
32.	Prove that p (1 - x) is always larger than 2x ln . 
	Hint: consider f(x) = p (1 - x) - 2x ln . Is it always positive?
33.	Evaluate the following integrals:
	(a)   	(b)   	(c)   		(d)   
	(e)   		(f)   		(g)   		(h)   

LECTURE 0

	This is an introduction to the ideas of the calculus. Many students will have had a previous calculus course and been exposed to the idea of a limit, differentiation "rules" (product, quotient, chain rule, implicit differentiation, etc.), derivative of trig, exponential and log functions, optimization and related rate problems, some curve sketching, Riemann sums and the calculation of area. So, nearly all of this course should be vaguely familiar to many students - but we won't count on it! In fact, we'll start from the beginning, assuming very little previous knowledge of the calculus ... so it'll be a review for many.

SOME BASICS
NUMBERS ... and INFINITY:
	Once upon a time there were only the positive integers: 1, 2, 3, 4, ...   and we could add them or multiply them and we would again get positive integers: 17 + 21 = 38,  7 x 8 = 56.
	When we subtract however, we can get negative integers: 17 - 21 = -4, so we add these negative integers to our collection of numbers. Now we have all the integers (including 0) and when we add, subtract or multiply numbers in this collection we get other numbers in the same collection.
	When we divide, however, we can get fractions which are not in our collection of positive and negative integers ... so we add them to our collection to get the set of "rational numbers". For example, is a (rational) number which, when multiplied by the integer 3 yields the integer 5. 
	What, then, is  ? If it's a number, then it should yield 5 when multiplied by 0. But every number yields 0 when multiplied by 0 ... so  is NOT a number. Remember this! (It may be a cauliflower, but it's NOT a number!)
	We will have occasion to "let x approach infinity", which we write:  x®¥. This simply means that x is allowed to increase without bound; it becomes larger than ANY number. 
	Is ¥ a number? No. It's a convenient symbol which we will use to indicate that a quantity (like x) is increasing so as to exceed (eventually) every number.
	Consider the limiting value of the ratio  as x®¥. (We will have more to say about "limits" later.) The numerator becomes infinite, as does the denominator. Can we write the limiting value as ... and is this equal to 1?  No. In fact, the limiting value of  is the number 2 (as x®¥). Similarly we can't say that ¥ - ¥ is 0  (as in the limiting value of x2 - as x®¥). Since ¥ is NOT a number it's not surprising that it doesn't behave like a number!  
Remember:
0 x ¥ ¹ 0    and    ¥ - ¥ ¹ 0    and     ¹ 1    and    ¹ ¥    and ¹ 1

PS:
S:	Why isn't  = 1?  I can accept ¹ 1 (since ¥ isn't a number then division isn't an operation one can perform on ¥) but  0 is a number.
P:	Let' see. When multiplied by 0, must yield 0. That's certainly true of the number 5 (that is, 5 multiplied by 0 does yield 0), so maybe = 5. But then any number yields 0 when multiplied by 0. So maybe  can be any number. It certainly can't be any specific number like 5. Let's say it's indeterminate.
S:	Fair enough. One last thing. Any number multiplied by 0 gives 0, right?
P:	Right.
S:	Then surely  ¥ multiplied by 0 must give 0.
P:	And a brown cow multiplied by 0? Does it give 0? Remember, ¥ is NOT a number.
S:	Okay, okay. But are there any more numbers? I mean, if subtracting gave us the negative numbers and division the rational numbers, why don't we do something else and get more numbers? Are there any more?
P:	Sure. Besides adding, subtracting, multiplying and dividing we can take roots, say the square root. That'd give us more numbers. For example, is not a rational number. It's irrational.
S:	And will taking roots give us all the numbers?
P:	No. There are numbers like p which can't be obtained by taking the root of a rational number.
S:	And what do you call these numbers?
P:	They're irrational, just like , but they're also called transcendental numbers.
S:	I've got a headache. Can we just keep going'?

INEQUALITIES:
	We will denote the set of numbers in the interval from -1 to 7, including both -1 and 7, as [-1,7] ... or sometimes we'll use:  -1 £ x £ 7. If -1 is included but 7 is not, we'll use the notation [-1,7) ... or sometimes          -1 £ x < 7. If neither -1 nor 7 is included we'll use (-1,7) or perhaps -1 < x < 7.
	Intervals of the type a £ x £ b (which include both end-points) are called CLOSED intervals. Intervals of the type a < x < b which include neither end-point are called OPEN intervals. The interval -1 < x £ 7 is neither open nor closed.
	We are often required to "solve" inequalities like:   ³ 1. Here, for example, we must find the values of x which make greater than, or equal to, 1. If we simply multiply both sides of the inequality by (3x+1), just as we would with an equality (i.e. an "equation") we would get 4x ³ 3x+1 hence x ³ 1 (subtracting 3x from each side) and we would conclude that only those values of x greater than (or equal to) 1 will make  ³ 1. It is a surprise, then, to find that x = - 10 also makes  ³ 1. (Try it!)
	The rule is this: when multiplying an inequality by a number (or an expression, like 3x+1) we must change the direction of the inequality if the number (or expression) is negative.

Examples:
•	Although 7 > 5, after multiplying both sides by -3, we get  -21 £ -15 (and the direction of the inequality has changed). However, multiplying by 2 (a positive number) we get 14 ³ 10 (and we don't change the direction of the inequality).
•	If  ³ 1, then 4x ³ 3x+1 provided 3x+1 > 0. Hence, when we found that x ³ 1, we were only finding x-values satisfying 3x+1 > 0 (i.e. x > -1/3).To find all solutions we proceed as follows:
	(i)	We look for solutions satisfying 3x+1>0 (i.e. x > -1/3). Then   ³ 1 is true provided 4x ³ 3x+1, that is, provided x ³ 1. We now have all solutions satisfying 3x+1 > 0, namely all x-values satisfying x ³ 1. But x > -1/3 and  x ³ 1 means all x-values satisfying x ³ 1.
	(ii)	Now we look for solutions satisfying 3x+1<0 (i.e. x < -1/3). Multiplying the inequality by (3x+1) will change its direction:  4x £ 3x+1, hence x £ 1. We now have, as solutions, all x-values satisfying x < -1/3 and  x £ 1 ... hence all x-values satisfying x < -1/3 (and that includes the solution x = -10 mentioned above!)
	(ii)	Finally, then, any value of x which satisfies either x ³ 1 or x < -1/3 will satisfy  ³ 1

	Of course, a picture is worth a thousand words, so here's the graph of y = . Note that y is greater than or equal to 1 when     x <- and then again when x ³ 1.	  	
FUNCTIONS:	
	If a quantity, which we'll call "y", depends upon another quantity (we'll call it "x") so that y assumes a single, unique value for each value of x (chosen from some set of values), then we say that "y is a function of x" and write y = f(x). The requirement of a "single, unique value" is important; if we don't have that, we don't have a "function". Graphically, this means a function must satisfy the vertical line test: every vertical line (in the domain) must cross the graph of y = f(x) only once. If it crosses more than once, then there are two or more y-values and the graph is NOT that of a function.

Examples:
•	A person's height is a function of her age: 		height = f(age)
•	The volume of a sphere is a function of its radius: 	V = f(r)

	The set of values from which x is chosen is called the domain of the function. The set of possible values for y is called the range of the function.
Note:	
	It's common, when writing y = f(x), to call "x" the independent variable, "y" the dependent variable and "f" the function. The notation f(x) really means the value of the function "f" when the independent variable has the value x. In keeping with this notation we will sometimes refer to the function "f" (although we will sometimes, for the sake of clarity, refer to the function "f(x)"... unless confusing the value with the function makes things less clear!)  
	For example we might say "Consider the function x2" when we really mean "Consider the function which squares" or perhaps "Consider the function which takes a number x and generates the number x2". The function is really the operation (like "squaring"), not the result of applying this operation.
	Further, although we will often use "f" as a label for our function ... hence we'll refer to f(x) ... we will also use g(x) and h(x) etc. Curious how the labels for functions are often chosen from the middle of the alphabet: "f", "g", "h" ... constants are chosen from the beginning: "a", "b", "c" ... and variables from the end: "x", "y", "z". In fact, if we're talking about temperature T as a function of time t, we might just write T(t), and if we're talking about pressure P as a function of volume V we might write P(V) ... and so on. In particular, it is common practice to write x(t) for the position of an object at time t and v(t) for its velocity.
	Let's talk a little about functions and their domain:
Examples:
•	y is a function of x according to the rule: y = , where the domain is the set of numbers -1 £ x £ 1 (else y will be the square root of a negative number) and the range is the set:  0 £ y £ 1. (For each x in the domain, y will lie in this range.). Sometimes the domain isn't specified explicitly, but is understood to be whatever x-values will provide a real value for y. In this example, we would identify the domain as -1 £ x £ 1 without being told!    
•	y = x2 +4x - 7. What is the domain? Since every real number x provides a real value for y, the domain is the entire real line: -¥ < x < ¥ (unless otherwise specified). The range is harder to identify. It's the totality of possible values of y, and happens to be -11 £ y < ¥. (Can you prove this?)
•	Suppose the value of y is related to the x-value according to x2 + y2 = 25. In this example, if we write 
y2 = 25 - x2  and recognize that y2, hence 25 - x2, must be positive (or, at least, non-negative) then we must have x2 £ 25 so x must be restricted to the interval -5 £ x £ 5. However, for each x in this interval we can't guarantee that the relation defines a single, unique y-value! For example, if x = 3, then y2 = 25 - 32 = 16 and the y-value could be 4 or  -4. Hence, the relation x2 + y2 = 25 does NOT define y as a "function" of x. We could, of course, "solve for y" and obtain the possible "solutions": y = or perhaps y = - and either one will define a function with domain -1 £ x £ 1 ... but the original relation did NOT define a function.

ABSOLUTE VALUES:
 	We use the notation | N | to mean the absolute value of the number (or expression) N. It's easy for numbers: | 7 | = 7 and | -7 | = 7. In general, | N | = N if N is positive, and | N | = -N is N is negative, and  | 0 | = 0.
	More formally, we define:

| N | = 
and note that N can be a number (such as -7 or ) or an expression (such as x2 - 3 or sin x).
Examples:
•	| x+1| =  	i.e  

•	| 4-x2| =  	i.e  
•	|x| + |y| = x + y if x ³ 0 and y  ³ 0 (i.e. in the first 
	quadrant of the x-y plane, including the positive x- and 
	y-axes), whereas |x| + |y| = x - y   if x ³ 0 but y < 0 
	(the fourth quadrant) and |x| + |y| = -x - y in the 
	third quadrant and, finally, |x| + |y| = -x + y in the 
	second quadrant. 

	The graph of |x| + |y| = 1 is shown at the right.		

•	To plot y = | f(x) |, just plot y = f(x) and reflect the negative parts in the x-axis (i.e. replace negative values of f(x) by - f(x))

Final Note:	Now, with both absolute values and inequalities covered, we can consider expressions like 
 | x2 - 4 | < 2, which is the same as  - 2 < x2 - 4 < 2  or  2 < x2 < 6 hence x lies in the interval < x < OR  in
 - < x < - . This manipulation is important when we come to consider expressions like        
| x - a | < h (which is the same as  a - h < x < a + h) or the expression | f(x) - L | < e  (which is the same as L - e < f(x) < L + e).
•	Reminder:	| N | < 3 means -3 < N < 3  and  
			| x+5 | < 3 means -3 < x+5 < 3 (hence -8 < x < -2)
			etc. etc. etc.
SOME TRIG IDENTITIES and other trig stuff* :
•	sin2A + cos2A = 1 for any number (or angle) A.
•	sin (A+B) = sin A cos B + cos A sin B     and   sin (A-B) = sin A cos B - cos A sin B
•	cos (A+B) = cos A cos B - sin A sin B     and    cos (A-B) = cos A cos B + sin A sin B
•	sin A - sin B = 2 cos sin 
•	sin2 A =  	and	cos2 A =  
	Unless otherwise specified, if we write sin A , cos A, etc., and if you wish to 
consider A an angle, then assume it's the RADIAN measure of an angle!
•	sin A and cos A are defined for real numbers "A" as follows (and you'll note that the definition has little to do with angles!)

	Given any positive number A, begin at the point (1,0) on the unit circle and move counter-clockwise a distance equal to A, reaching a point we can call P. The x-coordinate of P is cos A  and the y-coordinate of P is sin A (and that's the definition of the sine and cosine of a number A).  If A is negative, then move clockwise.  	
We can now introduce an angle "A". Note that the angle at the centre of the circle has the radian measure A ... since and since our radius is "1", the arclength and the central angle are equal ... provided the central angle is measured in RADIANS!  We're all familiar with which is the above formula with the central angle a complete revolution: 2p, in RADIANS! We'd never write circumference = 360 r, where the central angle is 360 when measured in degrees, so we restrict ourselves to RADIANS when we consider angles (unless, of course, we indicate otherwise).

	Anyway, because of the definition we can easily identify a number of points on the unit circle ... like (1,0) and (0,1) and (-1,0) and (0,-1) ... hence the value of sin A and cos A for various numbers A:

	
PS:
S:	Can't  I write cos 45 = ?
P:	Sure. Just be sure you indicate that the angle is in degrees, like cos 45° = , else somebody will measure off 45 units along the circle and take the x-coordinate of the resultant point as cos 45 ... and it won't be .
S:	You gotta be kiddin'. Everybody knows cos 45 and sin 90 etc. are in degrees.
P:	And if I write  cos 47?
S:	No, I mean the standard angles like 30, 45, 60, 90 and so on ... not 47.
P:	Just wait till we get into course. We'll want to approximate cos 47, knowing cos 45, and we'll all be confused if we don't agree on this.
S:	Okay ... radians it is. But how about the good ol' sin A = . Has that gone?
P:	No, that still works. We take some angle A and stare at the coordinates of the point P.
	
	See the triangle? Notice that  = sin A. (Of course, the hypotenuse is "1" and the "opposite" is just the y-coordinate which, by definition, is sin A).
S:	Seems like cheating. Your hypotenuse is always "1". Is that necessary?
P:	Let's enlarge the whole diagram ... blow it up ... like a photographic enlargement, by a factor R. Then we have the following diagram. See? The triangle has hypotenuse R and  = = sin A, again,               and of course, = = cos A.  Happy?
S:	No.	   	
SOME TRIG GRAPHS to remember:

PS:
S:	How about the special angles, 45° and 30° and so on.
P:	There's nothing special about them, except that most people remember the 6 trig functions for 30°, 45° and 60° from the triangles shown at the right ===>>>
	Then sin 45° (or sin ) = and cos 60° (or cos ) = and cos 30° (or cos ) = and, of course, knowing these triangles you can read off the other trig functions as well, like tan 60° (or tan ) = and 	     	
	so on. These will come in handy when we have to sketch the graph of curves involving angles.

SOME GEOMETRY:
 	All straight lines have an equation of the form:  Ax + By = C.
	The equation of a line through the points (x1,y1) and (x2,y2) is:   = .
	The equation of a line through (a,b) with slope m is:  = m  (the point-slope form).
	If m1 and m2 are the slopes of two lines, then they will be perpendicular if  m1 m2 = -1.

LOGARITHMS and EXPONENTIALS:
	The functions 2x, 5x, px or ax (for any positive number "a") are called exponential functions, and "a" is called the base. There are RULES:  

(A)		

If ay = x, then y is called the logarithm of x to the base a, written:  y = loga x, a logarithmic function (or simply a log function). There are RULES: 

(B)	

	Every entry in (B) actually follows from the corresponding entry in (A). For example, assume the logs in (B) are to the base "a". Then alog x + log y = alog x alog y = xy = alog xy hence we get the first entry in (B), where we've used the fact that alog N = N if the log-base is "a".
	Notice that x = ay  is an exponential function of y, and if we solve for y we get y = loga x, a log function of x. In fact, x = ay and y = loga x are two different ways of writing the same relation between x and y. (i.e. if x = ay then y = loga x  AND if y = loga x  then x = ay.)
	Hence we may write or even .
Examples:
•	log3 37 = 7	and	log5 5 = 1	and	logp1 = 0
•	3log37  = 7	and	56 = 26log25	and	p0 = 1
PS:
S:	That's confusing ... isn't it? I was never very good at logs.
P:	Everybody loves exponentials. Nobody loves logs. Everybody knows the RULES (A). Nobody knows (B). Well ... some don't, and the examples are even more unfriendly, right?
S: 	Right! So should I memorize (B)?
P:	Yes ... and remember: a "log" is an "exponent" and all properties of logs follow from the rules for exponents ... the log-rules just look different, but they're really familiar things.
S:	Sure, sure.

MORE ON LOGS:
	If p = logaN, then  ap = N. Now we take logs of each side, to the base b: logb(ap) = logbN. Using a magic property of logs (to any base) we get:  p logb a = logbN, hence p = . Remembering who "p" is, we 
have:  . So, we can easily change logs from one base to another. If you have a table of logs to the base 10 and desperately need logs to the base 2, just use log2N = . The above relation has a cousin: let N = b and recall that logb b = 1. Then we get:  which will be useful when we consider log functions later on.
PS:
S:	Wait just one minute. Do you really expect me to remember all this .. all this ...
P:	No. But it's here so you can look it up when you need it ... and someday you may need it.
S: 	So I only have to know that there are umpteen weird relations and I should know where to look to find them?
P:	Yes.
S:	You said log properties are familiar things, but I wouldn't call logab = 1/logba  a familiar thing.
P:	Pay attention: if x = logab then ax = b, and if y = logba  then by = a  and we want to show that x = 1/y, right? Okay, if ax = b then raise both sides to the power y and get (ax)y  = by , but by = a,  so axy  = a and that means that xy = 1. See? It's just a property of exponents. Right?
S:	zzzzzz

ODDS 'n' ENDS ... mostly ENDS:

•	A geometric series has the form: a + a r + a r2 + a r3 + ... + a rn-1 (there are n terms here ... count 'em!).
	The sum of the above series is  a . If | r | < 1, then = since rn®0.
	That is, the sum of the "infinite" geometric series is  a + a r + a r2 + a r3 + ...  =  provided | r | < 1!!
•	Polynomials are functions like 1 + x - 3x2 or x3 - 5x4. They all have the form A + Bx + Cx2 + Dx3 + ... and so on, ending after a finite number of such terms. "A", "B", etc. are constants. Further, if p(x) and q(x) are polynomials, then is called a rational function.
PS:
S:	Whoops. Has that anything to do with rational numbers?
P:	It's the same kind of definition. If p and q are integers, then is a rational number. If p and q are polynomials, then is a rational function. See? The polynomial functions play the role of the integers.
S:	Sure, sure.

•	SIGMA NOTATION:
	We will have occasion to refer to a series, say a1 + a2 + a3 + ... + an, and it gets tiring to have to write out several terms (as we have just done) every time we want to identify the series. For this reason we may use SIGMA notation: each term of the series has the form ak where k = 1 or 2 or 3 ... or n, and the series is the sum of such terms, so we write where  means "sum all such terms from k = 1 to k = n". For example:
	1 + 2 + 3 + ... + 100 = 		and	= e7 + e8 + e9 + e10 + e11 + e12	and
	f(1+h) + f(1+2h) + f(1+3h) + ... + f(1+nh) = 	and	= sin 4p + sin 5p = 0
	and	= .
PS:	The Greek letter is called SIGMA ... it's upper case ... lower case sigma is s.
•	In these lectures we will, from time to time, need to do some algebra and arithmetic with lots of digits of accuracy (just to illustrate some point we're making; we won't expect you to do these calculations). Then we'll use a computer program called MAPLE (except we'll call it  'cause it looks nicer).  is a so-called Computer Algebra System (or CAS) which knows many of the techniques we'll learn in this course and, in particular,  can do arithmetic with great (infinite?) precision.

LECTURE 1

LIMITS
PS.
P:	What's the limit of the sequence of numbers:  4.9, 4.99, 4.999, 4.9999, etc. etc. ?
S:	It's 5.
P:	Why 5?
S:	Because the numbers get closer and closer to 5.
P:	They also get closer and closer to 17 ... so why isn't the limit 17?
S:	Well ... they get closer to 5 than to 17.
P:	But one of the numbers is exactly 4.99, so maybe that's the limit. After all, how much closer can you get?
S:	Oh, they have to get closer and closer without actually reaching the limit ... so that's why it's 5 and not 4.99 ... I think.
P:	How about the following sequence: 4.9, 5, 4.99, 5, 4.999, 5, 4.9999, 5, etc. etc. where every second number is exactly 5. Now what's the limit? It's still 5, right? Yet the numbers actually reach 5 from time to time. Clearly we need a definition of what we mean by "the limit is 5" so that only one number satisfies the definition and that one number is 5 ... and not 4.99 or 17.
S:	If you say so ... but what good is all this?
P:	We want to be able to describe, in a reasonably precise manner, the various features of a graph such as:

S:	You're kidding. Surely these functions never occur in a real problem, right?
P:	Well, we want to establish a kind of vocabulary so we can talk about the features ... with a terminology that has some precise meaning. Of course, if we can analyze the above weird function then something like ==>>  
	is really easy.
S:	What does this function represent?
P:	It could be the concentration of a drug in the bloodstream as a function of time, or the amount of energy radiated by a hot body as a function of the wavelength of the emitted light, or  some probability distribution or maybe ...	  

S:	Okay, okay, but what would one want to know about such a function?
P:	Where the maximum occurs or what the limiting value of y is when x becomes infinite or how y  behaves for small values of x or ..
S:	Okay, let's go.

	Consider the function f(x) = . Notice that f(x) has no value at x =1.5 since f(1.5) gives which is not a number. Nevertheless, f(x) does have a limiting value of 6. (We make this claim without even defining what we mean by limiting value! We'll provide this definition below in such a way that the mathematical definition agrees with our common sense notion of limiting value. First, then, we need to think about this common sense notion.) To see that f(x) does, indeed, have a limit of 6, we compute f(x) for various values of x approaching 1.5, and we also include the error, namely |f(x) - 6|, the absolute value of   f(x) - 6 (to see how well we're doing in achieving the limit of 6).

			Table 1						Table 2
      x		f(x)			error
    1.3		5.6			0.4
    1.4		5.8			0.2
    1.49		5.98			0.02
    1.499	            5.998			0.002
    1.4999	5.9998			0.0002
 	      x		f(x)			error
    1.7		6.4			0.4
    1.6		6.2			0.2
    1.51		6.02			0.02
    1.501	             6.002			0.002
    1.5001	6.0002			0.0002
 	
In spite of the fact that f(1.5) doesn't exist, it seems clear from the table that the limit (as x approaches 3/2) is 6. 
(We write this as: f(x) = 6.) Indeed, by making x sufficiently close to 1.5, we can make the error, namely 
|f(x) - 6|, as small as we please. For example, suppose we want the error to be less than, say, .001 (meaning we want the values of f(x) to lie in 5.999 < f(x) < 6.001). We can achieve this simply by making x sufficiently close to the number 1.5 (for example, we can restrict x to lie in the interval 1.4999 < x < 1.5001).
	For this particular function and this particular x-value, we can say:
	“Since the error, |f(x) - 6|, can be made as small as we please simply by restricting x to lie in some sufficiently small interval about the number 1.5, then the limit of f(x) is 6, as x approaches 1.5 and this is indicated by the notation:   f(x) = 6.”
S:	That's confusing. I mean, it seems easy enough to do ... this business of making something small.
P:	Not just small but as small as we please, and remember that we should be able to do this without prescribing the value of f(x) or even the value of x but only by controlling how far x is from the number 1.5, and it's precisely this property we want for our "limit" definition, and ...
S:	So why does that make 6 the limit and not, say, 7?

	We can't make the error, |f(x) - 7|, as small as we please by restricting x to lie in some small interval about 1.5, because when x is close to 1.5 the values of f(x) are close to 6, NOT close to 7 ... so 7 is NOT the limit. In fact, 6 is the ONLY number that satisfies this definition!

S:	I think you have a problem there. I can make x really close to 1.5 by making it EQUAL to 1.5, then is your "error" small? I mean, how small is |f(1.5) - 6|? I make it | - 6 | which isn't even a number, let alone a small number .
P:	Very good! You've put your finger on a problem with our definition ... so lets modify it.

	Alas, no matter what interval we choose about 1.5, x = 1.5 will be in that interval ... and there's no way we can make the error small for x = 1.5 since f(x) doesn't even have a value!  To fix this, we modify our definition to read:
	  We say that the limit of f(x) is 6, as x approaches if the error,  |f(x) - 6|, can be made as small as we please simply by restricting x to lie in some sufficiently small interval about the number 1.5, with the exception of x =1.5 itself! 

S:	Don't you find that awkward? I mean, "by restricting x to lie in some sufficiently small interval about the number 1.5, with the exception of x =1.5 itself" sound like mumbo-jumbo.
P:	Okay, let's modify it ... again. We have to find something to replace that phrase which, I admit, is rather awkward, but I'm not sure you'll like the modification.

	We can improve upon the wording (at the expense, perhaps, of making it less understandable!) by replacing the phrase "by restricting x to lie in some sufficiently small interval about the number 1.5, with the exception of x =1.5 itself" with the phrase "by choosing a sufficiently small number, h, and restricting x to lie in the interval, 0 < |x - 1.5| < h". Note that |x - 1.5| < h means that 1.5 - h < x < 1.5 + h, so we indeed have restricted x to some interval about 1.5 ... and we can make the interval small by choosing a small h ... and 0 < |x - 1.5| means that 
x ¹ 1.5 ... so we've now got a reasonable definition of limit.
	We'll generalize this notion of limit to other functions, and other x-values:

We say that f(x) = L if we can make the error, |f(x) - L|, as small as we please, simply by choosing a sufficiently small number, h, and restricting x to lie in the interval, 0 < |x - a| < h.

S:	You're right. I don't like the mods you've made. Can we go back to the original?
P:	No. We'll leave it as it is. Don't you see how pretty it is? You just write 0 < |x - 1.5 | < .0001 and you've said that x is not equal to 1.5, but it's very close. Now pay attention.
	Now let's return to the function  f(x) which we can write as = = 2x+3 provided 2x-3¹0. But if we're considering the limit as x®3/2, then x is close to but different from 3/2, so the division of numerator and denominator by 2x-3 is valid ... and it's clear why f(x)®6 as x®3/2 (since f(x) is identical to 2x+3 for every x-value except x = 3/2 ... so the limit of f(x) is the same as the limit of 2x+3, namely 6).

	Often, we can avoid using the above definition to find a limit (assuming a limit exists). In fact, from the definition, one can prove some nice rules (but we'll omit the proofs).

LIMIT RULES
Suppose 	 f(x) = L and g(x) = M. Then we have the following rules:
   SUM RULE: = L + M	       DIFFERENCE RULE: = L - M 
   PRODUCT RULE:  f(x) g(x) = L M	      QUOTIENT RULE:	= 
Example:	If f(x) = , calculate f(x).
Solution:	As x®2 we have   lim f(x) = lim = = = = - 4.
	Note that the value of this function, namely f(2) (which we get by direct substitution), is also -4.
	It's important to notice, however, that we did NOT evaluate the limit by substituting x = 2. Instead we used the various LIMIT RULES. If the limit turns out to be f(2) it's because we have a CONTINUOUS function (see below for a discussion of "continuous" functions).

PS:
S:	Hold on! It looks to me like you just plugged in x = 2 to get the limit, right? And that gives you the value, right? And that makes the limit equal to the value, right?
P:	Wrong. I used the various LIMIT RULES. It's just happens that the result is -4, the same as the value. But that's only true for certain functions ... called "continuous" functions. It's not always true that the limit and the value are equal.
S:	Example?
P:	Okay, let's see ... I can invent a function which has no value but does have a limit. Want to see it?
S:	Sure.
P:	It's f(x) =  which has no value at x = but has a limit of 6. Like it?
S:	Yeah, it's great. But how about a function which actually does have a value. Then it's the same as the limit, right?
P:	Wrong. I'll invent a function defined for every real number x, and it will then have a value at x = 1.5, but this function will also have a limit as x®1.5 and it'll be different. Want to see it?
S:	Sure.
P:	It's f(x) =  for all x ¹ 1.5 and f(1.5) = 47, or I could write it as:  f(x) =   . Like it?
S:	Hey! I don't mean a double-barrelled function! I mean ...
P:	Okay, here's another one: f(x) = x2 + + + + + ... Like it?
S:	No. I assume it goes on forever. I don't know anything about functions that go on forever. I mean ...
P:	Not true. You know how to find the sum of such an infinite series as this. Look at it. It's a geometric series and the common ratio is ...
S:	Wait, I'll do it. The common ratio is ... uh, I divide the second term by the first and I get ... uh, . Right?
P:	Sure, but you should also divide the third by the second and the fourth by the ...
S:	I know that, but you said it was geometric. Anyway, I can only add an infinite geometric series if the common ratio is less than 1 and ... uh, well, I guess is less than 1. Terrific. Then it adds up to and  that's and that's ... uh, 1 + x2. So what?
P:	So find f(x).
S:	I guess it's  = 1. So that's the same as f(0), right? I mean, f(x) = 1 + x2 so f(0) = 1.
P:	Wrong! When x ¹ 0, then your common ratio is less than 1 so you can add the infinite series using  , BUT when   x = 0 your common ratio is exactly 1 so you CAN'T use this formula.
S:	Then how do I get f(0)? Wait! I just plug it in! f(0) = 0 + 0 + 0 + ... which I guess is 0, right?
P:	Right! So for this function the limit is "1" but the value is "0". Nice, eh?
S:	No. Anyway, I read, somewhere, the following definition of "limit":
 f(x) means: 
for any e > 0, a d can be found such that | f(x) - L | < e whenever 0 < | x - a | < d

P:	Yes, it's the same definition as ours. When we say we can "make the error as small as we please" we really mean "smaller than any number e > 0", and when we choose an "h" and "restrict x to lie in the 0 < |x - a | < h", it's the same as finding a "d" and restricting x to lie in  the interval 0 < | x - a | < d. See? It's the same. Don't let the Greek letters fool you. 
S:	Sure, sure. So why even use this definition?
P:	Suppose  f(x) = 47. Then, by restricting x to a sufficiently small interval about "3", say 0 < | x - 3 | < d, we can make the error | f(x) - 47 | < .1, say. Hence we can force f(x) to lie in the interval 46.9 < f(x) < 47.1, and if we want the error to be even smaller, say | f(x) - 47 | < .001, then we can select a smaller value for d, and ...
S:	Wait. You've already said all this. I asked why the e - d definition is any better than our earlier definition.
P:	I guess it's because we've given a name to the error, namely e which could be .1 or .001, etc.
S:	I still don't see what good all this is. Is there any useful application of this stuff ... something I'd understand?
P:	Well ... suppose you were building a box with all sides of equal length and it was to have a volume of 8 m3 with an error of, say, 0.1 m3 (which is e by the way). Then each side would be about 2 metres (since 23 = 8). Now, the big question: how accurately must you cut the sides so that the error in the volume is less than 0.1 m3? We write V(x) = x3  and insist that the error in volume, | V(x) - 8 |, is less than 0.1 by restricting x to lie in some interval about x = 2, say 2 - h < x < 2 + h.  The answer to the question above is the value of "h" ... so how small must h be?
S:	Let me do it! I'd want V(x) to lie between 8 - 0.1 = 7.9 and 8 + 0.1 = 8.1 ('cause that'd make the error less than 0.1 m3). That means I'd want 7.9 < x3 < 8.1, so I'd take the cube root and find that 1.9992 < x < 2.00083, so I'd have to cut the sides with an error less than ... uh, about .0008 m, right?
P:	Right. You can guarantee an volume error less than 0.1 m3 by making the side length lie in 2 - h < x < 2 + h, with          h = .0008 (i.e. x must lie in 1.9992 < x < 2.0008). Of course, if somebody wanted the volume error even smaller, less than e = 0.001 m3 for example, then you'd have to choose an even smaller value of h.
S:	That doesn't sound like calculus to me ... just common sense and a little arithmetic.
P:	Here's the calculus: the reason you can guarantee that an "h" exists for every specified error (which we can call  "e") is because the function V(x) = x3 is a continuous function of x, hence has a value and a limit at x = 2 and they're the same. If this weren't the case then you couldn't guarantee an arbitrarily small error.
S:	For example? I mean, are there really problems like that ? I mean real-world problems, not mathematical problems.
P:	Sure. Suppose the cost of postage is determined by the weight of the parcel according to the prescription:                      
cost = $10.00 for parcels under 1 kg, $15.00 for parcels from 1 kg to less than 2 kg, $20.00 for parcels from 2 kg to less than 3 kg, etc. etc. 
	If x is the weight  and C(x) the cost, the graph looks like this  ==>         
	Note that C(x) =15 , and because this limit exists we can guarantee the cost to be near $15 (in fact, in this problem, exactly $15) by restricting the weight to lie in some sufficiently small interval about 1.5 kg. However,   		
	C(x)  doesn't exist so it's NOT possible to  guarantee a cost near $15 or near $20 (or near any amount L) by restricting the weight to lie in some interval about 2 kg. In fact, a wee bit under 2 kg and the cost is $15 and a wee bit over 2 kg and the cost jumps to ...
S:	Okay ... I got it ... calculus is wonderful.
P:	One more thing. Most students are wary of double-barrelled functions defined like:
	 f(x) =   .   In fact, there is a feeling that only mathematicians could love such functions. But the cost of postage is given by  C(x) = and we could add to this array for parcels where x³3 kg. Can't you just see such a sign hanging in the post-office?
S:	No.

ONE SIDED LIMITS:

	The graph of y = f(x) = is shown. Note that f(x) has no value at x = 1.5 (which we indicate with an "open circle"), however, as x approaches 1.5 either from the left (i.e through values such as 1.49, 1.499, 1.4999, etc. as in Table 1 above) or from the right (through values such as 1.51, 1.501, 1.5001, etc. as in Table 2), the values of f(x) clearly have the limit 6. 	     	

	Now consider the graph of another function which we'll call g(x). This function does have a value at x = 1.5, namely g(1.5) = 6 (indicated by the "closed circle"), however, if x approaches 1.5 from the right, the values of g(x) have a limit of 7. We indicate this by writing  g(x) = 7 where the notation x®1.5+ means x is approaching 1.5 through values more positive than 1.5. 		
	Further, if x approaches 1.5 from the left the limiting value of g(x) is 6, and we can write g(x) = 6 where x®1.5- means x is approaching 1.5 through values more negative than 1.5.
	The question we pose is: does g(x) have a limit as x approaches 1.5?
	The answer will be "yes" only if our definition of limit is satisfied. If, for example, we suspect that  
g(x) = 6, then we must be able to make the error, |g(x) - 6|, as small as we please by restricting x to lie in some interval about 1.5 such as: 0 < |x - 1.5| < h. This is clearly impossible since an x-value just slightly larger than 1.5 will give g(x) a value near 7 so the error is already larger than 1.0, hence g(x) = 6 is NOT true. 
Similarly,  g(x) = 7 isn't true either (since values of x close to 1.5 but slightly smaller will give an error larger than 1.0). Indeed, there is NO number L such that |g(x) - L| can be made as small as we please by restricting x to lie in an interval about 1.5, hence g(x) = L is NOT true and we conclude that  g(x) doesn't exist (meaning no number L will satisfy our definition of limit).
	In this example, g(x) has a right-sided limit, g(x) = 7, and a left-sided limit, g(x) = 6, but it doesn't have a limit:  g(x). On the other hand, for the function f(x) = we have:
	f(x) = f(x) = f(x) = 6. 
	That is, it has right- and left-sided limits and they're identical and equal to the limit. We make note of this:

 f(x) = L     provided     f(x) = L    and    f(x) = L .
Also, 		
if     f(x) = L    and     f(x) = L    then    f(x) = L.
In words: 	
	If f(x) = L exists, then both left- and right-sided limits will be equal to L.
	Also, if both left- and right-sided limits exist and are equal to L, then L is also the limit of f(x).
	
	Sometimes it's necessary to evaluate both left- and the right- limits in order to see if the limit exists.
Example:	Does f(x) = have a limit as x approaches 3?
		(Or, to put it differently, does   exist?)
Note:	When we see an absolute value sign we desperately want to get rid of it by using the fact that
	|m| = m  	if   m ³ 0     whereas   
	|m| = - m  	if   m < 0  
	(where m is any expression, such as x2-9).
Solution:	To rid ourselves of the absolute value sign we need to know whether x2 - 9 is positive or negative, so we first consider the limit as x approaches 3 from the left (i.e. x®3-). Then, for x slightly smaller than 9 (such as 8.9 or 8.99 etc.), x2-9 < 0 so |x2 - 9| = - (x2-9). (Recall the definition of absolute value!)
	
 Hence:	= 
= = = - 6.
On the other hand, if we approach from the right 
(so that x2 - 9 > 0 and |x2 - 9| = x2 - 9) we have:		
 = = = = 6.
	Since these limits are different, we conclude that  does NOT exist.
	In fact, to the left of x = 3, the graph of y =  is the same as the graph of y = - (x + 3)  and, to the right of x = 3, the same as y = x + 3 as shown in the diagram. Clearly, left- and right-handed limits are NOT equal.

PS.
S:	If g(x) has a limit as x approaches 3 from the left, and it also has a limit as x approaches 3 from the right, then it has a limit no matter how x approaches 3 (they ain't no other way to approach 3, is there?) So how come you say there's no limit as x approaches 3?
P:	It's that neat definition that does it. In order to have a limit (according to our definition) there must be some number L such that the error |g(x)-L| can be made as small as we please simply by forcing x to lie in some small interval about 3, such as 3-h<x<3+h (except for x=3 itself, of course). But it's impossible to find such a number L and such an interval because if x is in the right part of the interval, 3 < x < 3+h, then g(x) can be made as close as we please to 6 ... so clearly L (whoever he is) must be VERY close to 6. On the other hand if x is in the left half of this interval, 3-h<x<3, the values of g(x) can be made as close as we please to -6 hence L must be VERY close to -6 as well. But there's no number L which is simultaneously VERY close to 6 and VERY close to -6 ... so there's no L, hence there's no limit. See?
S:	Not really.
P:	Don't worry about it ... it's not something we'll spend much time on. One of these days you'll wake up and run naked thru' the streets shouting eureka!  ... and all will be clear.
S:	(He's kidding ... right?)

LECTURE 2

INFINITE LIMITS, ASYMPTOTES and CONTINUOUS FUNCTIONS

INFINITE LIMITS:

	We want to be able to describe the features of the above graph at x = -1 and x = 5. To do this we first consider the limit:  . For x in some small interval about x = 0 (say -.001 < x < .001, excluding x = 0 itself) the values of are larger than = 1,000,000. Further, as we make the interval even smaller, the values of  become even larger. In fact, we can make the values of this function larger than any number you care to mention - and certainly larger than L for any number L - hence the the limit cannot be L for any L - hence there is no limit. i.e. does not exist.
	Now consider  sin . This limit won't exist either, but for quite a different reason.
	For x in some small interval about x = 0 (say -.001 < x < .001, excluding x = 0 itself) the values of sin will be between -1 and +1 (that's because the sine function always lies between -1 and +1). Furthermore, no matter how small we make the interval we can always find x-values in the interval such that is a multiple of p and that will make sin = 0 (since the sine of a multiple of p is 0) ... so, if  sin did exist and is equal to some number L, then L must clearly be VERY close to 0. But, no matter how small the interval we can also find x-values such that is an odd multiple of  and that will make sin = ±1 (since the sine of an odd multiple of  is either +1 or -1). Conclusion? sin takes on values -1 and 0 and +1 in our interval (no matter what interval we choose!) so the limit L (if there is such a number) must be close to -1 and close to 0 and close to +1, all at the same time - clearly there is no such number - hence there is no limit. i.e.sin does not exist.
PS.
S:	Wait a minute. You say: we can always find an x-value such that  is a multiple of p ... what does that mean?
P:	Pick an interval about x = 0.
S:	How about -.01 < x < .01?
P:	Good. Now watch me find an x-value in your interval which will make sin = 0. That means I have to find an x such that is a multiple of p ('cause that'll make sin = 0). Let's see, if I choose = 1000p (that's a multiple of p, right?) that'll mean x = and since p is roughly 3 then x is roughly 1/3000 or roughly .0003 so my x certainly lies in your interval. And believe me, if you choose any other interval about x = 0 I'll still be able to find x-values which will make sin = 0. Not only that, for any interval you choose I can also find an x-value such that sin = 1. Not only that ...
S:	Wait, wait ... let's see you find an x in  -.0001 < x < .0001 which makes sin = 1.
P:	Okay, I'll need to be  + a multiple of 2p  ('cause that'll make sin = 1) and I'll choose a huge multiple of 2p (so my x lies in your interval) so let's try = + 100,000(2p) (which makes sin = 1) and we'll see if it's in your interval ... p is roughly 3 so is roughly 1.5 + 600,000  which is roughly 600000 so x is roughly which is roughly .0000017 so my x does indeed lie in your interval, and if you choose a smaller interval I'll just choose a bigger multiple of 2p and my x would still lie ...
S:	Let's forget the whole thing.
P:	Wait. Don't you see? You can't possibly make the values of sin as close as you please to some number L by restricting x to lie in some interval about x = 0. Why? Because I can find x-values which make sin equal to 1 and other x-values which make sin equal to 0 (to pick two convenient values of the sine function, though I could pick others ...), so L (whoever she is) must be VERY close to 1 and VERY close to 0 all at the same time ... and there is no such number. In fact, since sin takes on every value between -1 and +1 in every interval about x=0, the limit L must be close to every number between -1 and +1, all at the same time ... and that's impossible ... so there is no limit L. Understand?
S:	zzzzz
	Neither of the limits  and   sin exist (because there is no number, L, which satisfies our definition of a "limit"). Yet, the first fails to exist for a particular reason, namely: the values of become larger than any number when x is restricted to smaller and smaller intervals about x = 0 (excluding, of course, x = 0 itself). In order to indicate this particular reason for nonexistence of a limit we write: = ¥. Writing this doesn't mean that we now have a limiting value for . It simply means that the limit fails to exist because becomes larger than any number as x approaches 0, or, to put it differently, we say: approaches infinity as x approaches zero. In general:

 					f(x) = ¥ 
	means that the values of f(x) can be made arbitrarily large by restricting x to lie in some 	sufficiently small interval about x = a, excluding x = a itself.

or, in sexier words,
  					f(x) = ¥ 
	means that the values of f(x) can be made arbitrarily large by choosing a sufficiently small 	number h and restricting x to lie in the interval 0 < |x - a | < h.

	It should be clear what we meaning by:    = -¥
	We also have (think about these!):

	  and  and  and  

	Note that we use ¥ to mean +¥   (the + is understood, just like 5 means +5).

ASYMPTOTES:

If any of the following are true, then we say that the graph of y = f(x) has a 
VERTICAL ASYMPTOTE, namely:   x = a.
 f(x) = ¥	f(x) = -¥	f(x) = -¥	f(x) = ¥

Examples:	Evaluate the following limits (or explain why they don't exist)
		(a)			(b)			
		(c)	21/x		(d)	21/x
Solutions:	(a)	= -¥ whereas	= ¥, and they're different, so doesn't exist. (If both left- and right-limits had been, say, -¥, the limit still wouldn't exist but we could at least use the phrase:  "limit = -¥". This would be the case with = -¥)
		(b)	= -¥ since the numerator has a limit of 3 (a positive number) whereas the denominator approaches 0 through negative values (and is a large negative number).
		(c)	21/x = ¥  since, as x approaches 0 through positive values, 21/x takes on values which are "2 raised to a large positive number "... hence the answer "¥".
		(d)	21/x = 0  since, as x approaches 0 through negative values, 21/x takes on values which are "2 raised to a large negative number" (for example 2-100 = )  hence the answer 0.
	We've talked about limits where x approaches a number and y = f(x) becomes infinite. Now let's talk about limits where x becomes infinite and y approaches a number.
	We write  = - and we mean that, as x becomes arbitrarily large (and positive), the values of y = get arbitrarily close to the number - . Graphically, it means that the graph of y = approaches the line y = - as x becomes infinite (as in the diagram).	

Examples:
						
	 = 0  					 = - ¥
(meaning that y = approaches the line y=0)		(meaning that y =  heads south!)

If    f(x) = a   or    f(x) = a
 then we say that the graph of y = f(x) has a HORIZONTAL ASYMPTOTE, namely:  y = a.

CONTINUOUS FUNCTIONS:
	As x approaches some number, say 5, maybe f(x) has a limit ... and maybe is doesn't. Also, maybe f(x) has a value at x=5 ... and maybe it doesn't. Even if f(x) had a limit and a value, maybe they're different numbers! The nicest functions are ones that have a limit and a value and they're the same ... and these functions are called CONTINUOUS functions.

 	If 	(1)  f(x) = L  and  
		(2) f(a) exists  and  
		(3) f(x) = f(a)  
	then f(x) is said to be CONTINUOUS at x = a.
PS:
S:	So why are they the "nicest" functions?
P:	Because the graph of such a function has no breaks. At every point on the graph of a continuous function there is a left-limit, a right-limit and a value and they're all the same! The graph could have points or sharp corners, but it has no breaks. However, if a function is discontinuous at a point (say x = 3) then the graph could go in one direction as you approach 3 from the left and in another direction as you approach from the right ... and the actual value of the function (hence the point on the curve at 
x = 3)  might be neither of these!
Example:	Is f(x) = continuous at x = 1.5?  at x=2?
Solution:	Since f(x) doesn't have a value at x = 1.5, it's not continuous there. (It doesn't matter whether it has a limit!) But, at x = 2, f(2) = = 7 exists and, as x®2, we have lim = 
= = =7 and they're EQUAL, so f(x) is continuous at x=2. (Notice that we didn't get the limit by substituting x = 2 since that gives the value, not the limit and they may or may not be the same!)

Example:	
For the function graphed at the right, write limit statements for :
x®¥, x®-¥, x®0+, x®0-, 
x®2-,  and   x®2+.
Where is the function discontinuous?
Why?	
	
Solution:	f(x) = -1,    f(x) = -1,    f(x) = ¥,    f(x) = ¥,    
 	f(x) = 0   and    f(x) = 2.  The function has NO limit at x = 0 and x = 2, hence is discontinuous there. (Note that f(x) has a value at x = 2, namely f(2) = 0, but since it has no limit is cannot be continuous there.)

	NOW, having established all the "limit terminology" we'll need, stare at the following graph (of a fictitious function f(x)) & verify the comments beneath.

LECTURE 3

MORE on LIMITS

TECHNIQUES FOR EVALUATING LIMITS WHEN THE "RULES" DON'T APPLY:
	In what follows, we consider certain limits to which we cannot apply the various limit rules (for one reason or another), yet, by using some tricky manipulation we can often put the expression into a form where we CAN apply the rules.

•	The form  
= = = - where we divided numerator and denominator by the largest power of x (i.e. x2) so that every term then approaches a constant. This is a useful technique when you have . Note that we can only use the LIMIT RULE when all limits exist. In our example, neither limit exists (until we divide numerator and denominator by x2).
•	The form ¥ - ¥
= where we multiplied both numerator and denominator by + to "rationalize the numerator". We then get = 0 (since the denominator becomes infinite while the numerator does not). Note that the LIMIT RULE which says lim (f - g) = lim (f) - lim (g) doesn't apply since neither of the limits lim (f) & lim (g) exist.
•	The form 
 =   where we "rationalize the numerator"and  =
•	Reduce the given limit to one you know
Given that = 1, then we can write = 1 where anything can be plugged into { }. For example:  = 1 or, equivalently,  = 1 (since x®-¥ will make 2x®0).  Of course, in a real problem, nature isn't so accommodating; you're more likely to see this problem as:   2-x sin 2x and it's up to you to change it to the form  .
P:	This technique of reducing a problem to one you've already solved is very useful, especially for a mathematician. Did I tell you the story of the mathematician and the engineer?
S:	Don't tell me.
P:	They were both given an empty kettle and asked to make tea. Both did exactly the same thing: fill the kettle with water, boil the water, put tea bags into the teapot and pour in the boiling water. Then, a new problem. They were given a kettle of boiling water and asked to make tea. The mathematician first emptied the kettle thereby reducing the problem to one he'd already solved.
S:	I don't like tea.

Examples:
Evaluate each of the following limits (or explain why the limit doesn’t exist):
(a)  		(b)  		(c)  
(d)  		(e)  		(f)   		
(g) 	(h)   		(i)  
Remember:	

	(i)	| N | has the value N when N ³ 0, and the value -N when N < 0. This will enable you to eliminate the absolute value sign.
	(ii)	The expression x®¥ means x®+¥ (i.e. the "+" is understood).
	(iii)	The notation  “ f(x) = ¥  ”  means  the limit doesn’t exist for a particular reason: the values 		of f(x) become arbitrarily large (and positive) for x near "a".
		Use this notation when appropriate, don't just say "limit doesn't exist".
Solutions:

(a) 	 = 
	= = -(5+x) ® -10.
(b)	=  = = = 10.
(c) 	doesn't exist since left- and right-limits differ (as shown above).
	
(d)	=  = = - 4.
(e)  = = = -1  (dividing num. and denom. by x3)
(f)   = = -¥ (since cos2x®1 and sin x ®0-).

(g)	 = = ® 
	where, in the last step, we've divided the numerator by x and the denominator by .

(h)	=== 1.
(i)	= ® as h®0.
S:	I'll tell you something; I can't always tell when something has a limit and when it doesn't. I mean, how should I know when to use some trick if I just looked at the expression and I think it already has a limit ... without doing any work?
P:	I don't know what you're talking about. Give me an example.
S:	Well, like maybe ... uh, the limit of - when x goes to ¥. It's 0 and that's obvious so why would I do some magic like rationalizing something?
P:	That's obvious? Remarkable! It's not obvious to me! I see two huge numbers and when I subtract ...
S:	You see ¥ - ¥ and that's ... uh, wait ... it isn't 0, is it?
P:	No. In fact, 0 happens to be the correct limit, but that's pure luck: - has a limit of ¥ whereas - x has a limit of -¥. But let me test you on your ability to recognize expressions where you have to do some work to get the limit ... because it's NOT obvious. In each of the following, x®¥. What's the limit?
(a)   		(b)    		(c)    			(d)    10-x2 
S:	In (a), it looks like so I have to do some work. In (b) it's so I have to do some work. In (c) ...
P:	No! In (a) you have a huge number divided by a huge number and you can't tell (without doing some work) whether that's small or large. But, in (b), you have a huge number divided by a number which is almost 1. Surely you know what that is. Just think of 1,000,000 divided by 1. It's huge!
S:	Okay, so the limit is ¥. In (c) I get ... uh, sin in the numerator and that sin 0 and that's 0 so the answer is zero and I didn't have to do any work. In (d) ...
P:	Well ... I wish you wouldn't say = 0, it's the limit that's 0, but in (c) you have to look at the denominator too. If the denominator approached 0 you'd be in trouble because the form isn't one where you can write down the answer. In fact ...
S:	But in (c) the denominator isn't approaching 0 ... it's approaching ¥ and that makes the fraction even smaller so it gets to 0 even faster. In (d) I get 10-¥ and I have to do some work. How'm I doin' boss?
P:	Terrible! If you don't know anything about  10 raised to a large negative number, try an example! What about 10-1000. Is it large? Small?
S:	It's ... uh, and I'd say that's pretty small. So I guess 10-x2 = 0, right?
P:	Remember this:and where "large number" could be large and positive or large and negative, like  -1,000,000.

Examples:
	Assuming  = 1, evaluate each of the following:

	(a)	t sin 	(b)		(c)	cot x
Remember:
Given  = 1, we may conclude that  = 1, where m is an expression which approaches zero.
Solutions:
(a)	t sin =	= = 1  where  q = ® 0  as  t®¥.
(b)	= == -1  where  t = z-p .
(c)	cot x =cos x = (-1)(1) using result from (b).
Example:
	Sketch the graph of a function which satisfies all  of the following:

	f(x) = -¥,	 f(x) = 0, 	f(x) = 1, 	f(x) = 1
Solution:

	The graph of f(x) could look like any of the following: 

Examples:
	A function which has no value  at x = a, but has a limit  as x®a,  may be made continuous (at x = a) by defining the value to be the limit. For example, f(x) = has no value at x = 5, yet
 f(x) = 10, so the "redefined" function f(x) =  
is continuous .
	For each of the following, f(a) is undefined. Determine whether it is possible to define f(a) so as to make the function continuous there:
	(a)	f(x) = , a = 0		(b)	f(x) = , a = 3
	(c)	f(x) = e-1/|x| , a = 0		(d)	f(x) = , a = 1
Solutions:
	(a)	Define f(0) = = 1.
	(b)	Define f(3) =  = = .
	(c)	Define f(0) =  e-1/|x| = 0		
	(d)	  =  = -1 and   = 1 differ, so   f(x)  doesn't 		exist, so f(x) cannot be made continuous by redefining f(1).

MORE ON LIMITS:
PS:
S:	Since sin x®0 as x®0, then  f(x) sin x®0 as x®0, for any function f(x). Right?
P:	Wrong. If f(x)®¥ as x®0, then the product   f(x) sin x   could approach anything, depending upon the function f(x). For example, if f(x) = , then the product approaches 1 and if f(x) = , then the product approaches .
S:	What if f(x) doesn't approach ¥? Then surely f(x) sin x®0 as x®0. Right?
P:	Sure, if f(x) doesn't get too large.
S:	Let's see you prove that.
P:	Okay. Suppose |f(x)| £ 1000 for all x. Then |f(x) sin x| £ 1000 | sin x |. Further, |f(x) sin x| is an absolute value so it's never negative, hence 0 £ |f(x) sin x| as well. We then have:
0 £ | f(x) sin x | £ 1000 | sin x |
	Now we let x®0. Since |f(x) sin x| is stuck between two functions, both of which have a limit of 0 (namely g(x) = 0  and h(x) = 1000 | sin x | ), then |f(x) sin x| also has a limit of 0.
S:	Is that some kind of theorem?
P:	Yes. Here it is:
 the SQUEEZE THEOREM
If   g(x) £ f(x) £ h(x)  and  g(x) = h(x) = L, then f(x) = L as well.
In words:	If f(x) lies between two other functions, and they have the same limit, then f(x) also has this limit.
	This theorem is often used to show that some limit of the form f(x) g(x) is 0, when one factor approaches 0 (say, lim (f) = 0) but the other factor doesn't have a limit ... but is bounded. In that case you can't use the LIMIT RULE which says:  lim (f g) = lim (f) lim (g)  because this RULE requires that both limits, lim (f) and lim (g), exist. (It would be nice if you could use the RULE; you'd say  lim (f g) = lim (f) lim (g) = 0 lim (g) = 0, but if there is no number "lim(g)", then what's the meaning of "0 lim (g) = 0"? It's like multiplying zero by a yellow rose. Is it zero?)
Example:	Evaluate   x sin .   (Note that  sin doesn't have a limit ... and don't confuse this problem with   x sin which can be written  = 1 which is the same as  with m = , hence its limit is 1.)
Solution:	Since | sin | £ 1, then  0 £ |x sin | £ | x | and since both sides of this inequality have the same limit, namely 0, then |x sin |®0 as well. In this example, it's tempting to write:    -1 £ sin £ 1 so that 
-x £ x sin £ x and then use the SQUEEZE theorem. Unfortunately, x sin £ x  isn't even true for negative x. Try x = -p for example. We'd get -p sin (-p) £ -p which says 0 £ -p (which certainly isn't true). Moral? If you'd like to prove that some limit is zero, you can prove that its absolute value has a limit of zero. 
	In fact, while we're at it, let's say something about y = f(x) sin . Since sin oscillates between -1 and +1, then y = f(x) sin oscillates between y = - f(x) and y = f(x) and, in fact, touches the curve y = f(x) whenever sin has the value +1 and it touches  y = - f(x) whenever  sin = -1. 

	The same is true of the graph of y = f(x) sin x (or, for that matter, y = f(x) cos x). The graph oscillates between y = f(x) and y = - f(x). It's even more interesting if f(x) changes slowly and sin x changes rapidly. We could accomplish this by considering f(t) sin wt  where w is a very large number (hence sin wt oscillates rapidly). Then f(t) sin wt oscillates so rapidly between y = f(t)  and 
y = - f(t) that it almost fills the space between. Indeed, if f(t) is the voltage produced by a microphone while recording Beethoven's Fifth Symphony (and that's why	

     

I changed the name of the variable to t = time!), and if we modify the amplitude of a second sinusoidal voltage, sin wt, so it becomes f(t) sin wt, we've got amplitude modulation (AM for short) and we can send it up a big antenna and you can receive it on your car antenna and your AM radio can delete the sin wt and recover the f(t) (i.e. demodulate the radio signal) and send f(t) to your speaker and you can relax with Beethoven. (In fact, each radio station has its own distinct w which you can "tune in".)	
PS:
S:	If I have to evaluate, say,  ,  can't I just say it's  = ¥?
P:	If we agree that the expression is shorthand for the limit of a ratio where the numerator has a limit of 3 and the denominator has a limit of 0, then it's okay ... sort of. However, most profs get very nervous when students use this notation. They're likely to cross-multiply and get 3 = 0 x ¥ which is meaningless. Besides (and this is important), the denominator could approach 0 through negative values, such as would be the case for  where the limit is -¥  (and you'd be tempted to still write = ¥, and get the wrong answer). Also, for the case  , you'd still get  but now the left-limit is
  = -¥ whereas the right-limit is   = ¥. So you have to be very careful.
S:	Can I write  = = -¥  and   = = ¥ where I show the "sign of zero" ... or at least how I approach 0 ... so I get the right sign?
P:	Sure, as long as you indicate the convention you're using so everybody who reads what you write will understand what you're saying. For example, it's often convenient to write 
	 = = ¥ (since the two negatives give a positive result). 
	Using this shorthand notation indicates that the graph of y = has a vertical asymptote and that the curve goes due north as x approaches 1 from the left.	

	
S:	So now that we have all this stuff about limits, what good is it?
P:	The good part is yet to come. Calculus comes in two flavours: differential calculus and integral calculus. Differential calculus is about rates of change and the slope of tangent lines to curves ... the DERIVATIVE. Integral calculus is about areas under curves and breaking down a complicated problem into simpler ones and summing ... the DEFINITE INTEGRAL. Both the derivative and the integral are defined in terms of a limit, hence we began our study with LIMITS (... unfortunately, it's perhaps the most difficult part of our study!). Next we'll turn to the differential calculus, and the DERIVATIVE ... but first a few problems.
Problems:
1.	Evaluate each of the following (or explain why the limit doesn’t exist):

	(a)  			(b)  	
	(c)  		(d)  
2.	Determine the points of discontinuity (if any) for the function f(x) = 
Solutions:
1.	(a) 	For x > 4,  = = x+4®8 as x®4+  
		For x < 4,   = = - (x+4)®-8  as x®4-
		Hence  doesn’t exist   (... left and right limits don’t agree).
	(b) 	= = = -4
		where |2x2-1| = -(2x2-1) since 2x2-1 < 0 when x is near 0 (and, of course, 2x2+1 > 0).
	(c)	 = = = -2.
	(d) = = ®-3 as x®¥.
2.	Since f(x) is defined differently for x > 0 and x < 0, we consider both left- and right-limits:
	f(x) = = 0	and	f(x) = = 0
	Since they're the same, this function does have a limit: f(x) = 0. However, it's not equal to f(0) = 1, so the function is NOT continuous at x = 0. For every other value of x, say x = a > 0, we would get 
f(x) =  x2 = = (a) (a) = a2, using a LIMIT RULE. Since this is equal to f(a) = a2 (for a > 0) , the function is continuous for every x > 0. Similarly we could prove it continuous for every x = a < 0. Hence x = 0 is the only discontinuity.
Comments:	If we've just found a limit, say  = 1, then we've actually shown that  sin x and x have very nearly the same value when x is small (since their ratio is nearly "1"). For example, choosing x = .0123  we find that sin (.0123) = .01229969 (and if we use a calculator for this evaluation, we make sure it's in radian mode, else sin x and x are NOT close in value for small "x"). In fact,  = 1 says that the two curves,  y = sin x and y = x, are very nearly coincident for x small. It may not be such a surprise, then, to learn that y = x is the tangent line to the curve y = sin x, at x = 0 ... which brings us to tangent lines.

LECTURE 4

the DERIVATIVE and its RULES

the DERIVATIVE:
	Our problem is to determine the slope of the tangent line to the curve y = f(x), at x = a. To do this we consider two points on the curve; one at x = a (and y = f(a)) and a second point at x = a + h (and y = f(a+h)). The slope of the line joining these two points is  . On the other hand, we could take the second point as x (and y = f(x)) in which case the slope of the line joining the two points would be . Regardless of what we call the second point, the slope of the tangent line at x = a will be obtained by taking the limit of this slope as h®0, or as x®a. 	

	

f'(a) = =  
This limit is called the derivative of f(x) with respect to x, at the place x = a.

Example:	Determine the derivative of f(x) = at x = 2.
Solution:	f'(2) =  =  =  
=   = .
We could also use the second form for the derivative:
f'(2) = = = =  = .
Of course, we could also use  or  since it matters little what names we give to the variables. If you understand the diagram, and the fact that we take one point as x = a and some second point (giving it any name), and let the second point approach the first, then the limiting value of the slope of the line joining the two points is the derivative of f(x) at x = a (that is, f'(a)).

If the limit which defines f'(a) exists, we say f(x) is differentiable at x = a.

	The above limit definition (take your pick which one) gives the derivative of f(x) at some point "a". If we want the derivative at a variable point "x", we just replace "a" with "x" in the definition:	

S:	That's confusing, I mean ...
P:	Pay attention. Suppose we want to compute the derivative of f(x) at, say, x = 6. Okay, (6, f(6)) is the point in question. Now pick another point.
S:	Okay, I pick x = 7.
P:	Sorry, I mean pick a name for another point. We have to let this second point approach the first and we can't do that if it's stuck at 7. See?  Okay, pick a name.
S:	Sam.
P:	Hmmm. The point with x = Sam has y = f(Sam). Now what's the slope between these two points on y = f(x)?
S:	It's ... uh, , right?
P:	Good! Now let Sam®6 and you've got ... what?
S:	Huh? I don't understand the question.
P:	You've got  and that's f'(6), the derivative of f(x) at x = 6. Nice, eh? And now you can see that it makes little difference what we call the second point so long as it's approaching the first. I'll give you yet another notation, maybe more appealing.

	The change (or increment) in x, which we call "h" above, is sometimes called Dx ( a convenient notation which indicates that it's a small increment if the variable "x"). The corresponding change in y, namely 
f(x+Dx) - f(x), is often denoted by Dy. This makes the definition of the derivative take the form:  

which is familiar to many and is the reason for the notation for the derivative of y with respect to x (i.e.  becomes , in the limit)* . If y = f(x) we use   or  y'  or  f'(x)  or sometimes just  f' to represent the derivative.
	Using the limit-definition of the derivative we can show that xn = n xn-1 where n is any integer. We illustrate with n = 5.

	If f(x) = x5, then = = 
	=  t4 + t3x + t2x2 + tx3 + x4 ® x4 + x4 + x4 + x4 + x4 = 5 x4  as t®x
	In fact,works for any exponent, whether integer or not. 
	For example, 	= x1/2 = (1/2) x-1/2 = .

the DIFFERENTIAL
	We've already mentioned that, after having evaluated some limit such as = 1, we can interpret this to mean that sin x and x are very close in value when x is small. The same holds for the limits which yield the derivative. Let's see how that works:
	We have y = x3 and have just computed = 3x2, so we know that is very nearly 3x2 when Dx is small. What does that mean? It means that when x changes from x to x+Dx, the corresponding change in y = x3, namely Dy = (x+Dx)3 - x3, is such that  » 3x2 and that means we'd expect Dy » 3x2 Dx . 
	Is that useful? Yes. If x is the length of the side of a cubical box, then y = x3 is its volume. Now suppose the box is to be built with x = 2 metres (so the volume is 23 = 8 metres3) and there are small errors in building the box and the sides are made to within .01 metres . What about the volume? We put x = 2 and Dx = .01 (because this is the possible error, or change, in x) and get an estimate of the change in volume, namely: 
Dy » 3x2 Dx = 3 (2)2 (.01) = .12 metres3.

S:	I don't need calculus for that! I'd just say (2.01)3 - 23 and that's the change in volume, and that's .121 m3 and that'd be exact ... no estimate, no approximation.
P:	Of course I was giving you a simple problem, just to illustrate the idea of using the derivative to estimate small changes. I could give you a tougher problem. Here it is:

Example:	When x = 49, y = has the value 7. Estimate the change in y when x changes to 47.
Solution:	For y = x1/2, then = x-1/2 = so we can estimate changes in y using »  or 
Dy » Dx and if we put x = 49 and Dx = -2 (because x changes from 49 to 47, a change of -2), we get 
Dy » = - . Conclusion?  is approximately: 7 - » 6.857

	In general we have the following prescription for estimating changes in the value of a function when the variable changes by some small amount:
	We have y = f(x) and have just computed = f'(x), so we know that is very nearly f'(x) when Dx is small. What does that mean? That means that when x changes from x to x+Dx, the corresponding change in y = f(x), namely Dy = f(x+Dx) - f(x), is such that  » f'(x) and that means we'd expect Dy » f'(x) Dx . 

Dy » f'(x) Dx is called the DIFFERENTIAL of y = f(x),
and it depends upon x and upon Dx, the DIFFERENTIAL of x,
and it gives an estimate of the change in y when x changes by Dx.

Example:	The distance travelled after a time t hours is x(t) = 100 + t3 metres. Estimate the distance travelled from t = 2 hours to t = 2.1 hours.
Solution:	Since » = 3t2, we compute the "differential of x", namely Dx = Dt = 3t2 Dt. Substituting t = 2 and Dt = .1 we get Dx = 3 (2)2(.1) = 1.2 metres as our estimate of the distance travelled.

P:	Do you see anything interesting here?
S:	Nope.
P:	If I told you that the velocity was = 3t2 = 3(2)2 = 12 m/hr at the end of 2 hours, then I asked how far would you would travel in the next tenth of an hour, what would you say?
S:	Uh ... (12)(.1) = 1.2 metres.
P:	Right, and that's just what the differential is doing for us. It gives quite a reasonable approximation if you don't change things too much.
S:	But .12 metres is exact, isn't it?
P:	No, because the velocity is changing, even during the time from t = 2 to t = 2.1 hours. In fact, the velocity is increasing so the distance would actually be somewhat larger. To be exact, the distance would be (100 + (2.1)3) - (100 + 23) = 1.261 metres.

more on DERIVATIVES

S:	I notice that you keep saying "the derivative with respect to x". Why the "with respect to"?
P:	If y depends upon x and x changes by Dx and the corresponding change in y is Dy, then the limit of is the derivative of y with respect to x. Now if y depended upon somebody called u, and u changed by Du, then 
	would be ...
S:	Don't tell me ... the derivative of y with respect to u.
P:	Right! And one other thing. If y is measured in hectares and x is measured in degrees Celsius, then = is measured in hectares per degree Celsius. See? And if u were measured in volts, then = would be measured in hectares per volt. See? The "with respect to" is important ... although we'll often omit this phrase if it's obvious who we're differentiating with respect to. See?
S:	I guess so.
P:	And one more thing. Since the derivative is a "rate of change", it tells how rapidly y changes when x changes. That is, if  = 10, say, it means that y is increasing 10 times more rapidly than x is. If  = - 1/3 then it means that y is decreasing as x increases (because is negative) and it's decreasing 1/3 as rapidly as x increases ... and ...
S:	Yeah, I got it.
P:	And one more thing. Don't get tied to any particular set of labels. The independent variable could be called y or z or V or even x, and we could use the notations or  or or . See?
S:	Can we keep going?
P:	Not yet -- we should recognize when things increase and decrease and how the derivative gives us this info and ...
S:	A picture is worth a thousand words, remember?
P:	Okay, here's the graph of some invented function f(x). For a while it increases, then it decreases, then it increases again and so on. These increases and decreases are reflected in the value of the derivative, f'(x), so if we plot f'(x) versus x we'll find that when f(x) is increasing, f'(x) will be positive and when f(x) is decreasing f'(x) will be negative. See how it goes?
S:	Yeah ... and it looks like ... uh ... what's happening at x = .8 and x = 1.5 and x = 2.2 or thereabouts?
P:	When f(x) stops going up and starts coming down, it has a horizontal tangent so its derivative f'(x) is zero. That happens at about x = .8 and again at about x = 2.2 and at x = 1.5 the derivative f'(x) is again zero because f(x) again has a horizonatl tangent.
S:	Hmmm ... does this kind of thing ever show up in real problems?
P:	Yes ... trust me.		

DIFFERENTIATION RULES

If f(x) and g(x) are both differentiable at x, then:
SUM:  = f'(x) + g'(x)
DIFFERENCE:  = f'(x) - g'(x)
PRODUCT:   	 = f(x) g'(x) + f'(x) g(x)
QUOTIENT:    = 
with the proviso that, in the QUOTIENT rule, g(x) ¹ 0 (else the expression in undefined!).

Examples:
•	Suppose we knew that sin x = cos x  and  cos x = - sin x. Then 
	tan x = = = = = sec2x  
	(using the QUOTIENT rule).
•	We can also use the PRODUCT rule to compute: x3x5 = x3(5x4) + (3x2)x5 = 8x7 which (fortunately) agrees with xn = n xn-1 when n = 8.

the CHAIN RULE:
	One of the most useful rules (all of which can be derived from the definition of the derivative!) is:

the CHAIN RULE

If y = f(u) and u = g(x), then:
= 
or
= f'(u) g'(x)
Examples:
•	If y = sin x3, we can write this relation as y = sin u and u = x3 so that 
	= == (cos u) (3x2) = 3x2 cos x3. Hence sin x3 = 3x2 cos x3.
•	Suppose that y = sin. We can write y = sin u, u = , v = cos w and w = x3. Then 
	= and all are easy differentiations! We get:
	= = - .
Example:	Find the equation of the tangent line to the curve y = 2x sin x at the point (,p).
Solution:	= 2x (cos x) + 2sin x  (using the PRODUCT rule) is the slope of the tangent line at any place x. For x = we get  = 2 cos + 2 sin = 0 + 2 = 2. We use the point-slope form of the equation of a straight line to get:   = 2 or y = 2x  as the tangent line. (Note that this tangent line passes through the origin. Try this problem: "Find a point on y = 2x sin x such that the tangent line passes through the origin." Pretend you don't know the answer!)
Example:	Find the normal line to the curve y = 2x sin x at the point (,p).
Solution:	Since the tangent line has slope 2, the normal line (which is perpendicular to the tangent line) has slope - and passes through the same point   (,p). Its equation is then:  
  = - or  x + 2y = .
HIGHER DERIVATIVES:
	Starting with some differentiable function y = f(x) we generate a second function, f'(x), by differentiating:  = f'(x)  which, as we've said, can be interpreted as the slope of the tangent line to the curve y = f(x) at the place x. We can also differentiate again to obtain the second derivative: = f'(x) which is written using the notation: = f''(x). If f'(x) is increasing, then
its derivative will be positive, i.e. > 0. If f'(x) is decreasing, then  < 0. Geometrically speaking, if  > 0 then the tangent line has an increasing slope so the curve is concave up. If  < 0 then the tangent line has an decreasing slope so the curve is concave down.	      

	For example, if s is the distance travelled after a time of t hours (measured in kilometres, say), then v = is the velocity (in kilometres/hour ) so v > 0 when s is increasing and v < 0 when s is decreasing and so on. In addition, the second derivative of s, the acceleration 
a = = ,  (measured in kilometres/hour/hour or km/hour2) tells when v is increasing or decreasing so when a > 0 the velocity is increasing and so on.

To the left are three graphs. One of them is s(t), the distance travelled (plotted versus t), one of them is the velocity v(t) = and one is the acceleration, a = . 

Which is which?
P:	Are you listening? Which is which?
S:	I'd say that ... uh, one is the slope of the other and ... uh ... I don't understand the question.	
P:	The middle one is s(t) versus t and its slope is given by the first graph and you'll notice that at the point marked with a big dot the distance is constant for awhile so the velocity is zero. Further, the first graph decreases then increases so its derivative must first be negative then positive and that's what happens in the last graph so that must be , the acceleration. 
Finally, you may notice that, since a = is the 2nd derivative of s(t) it gives the concavity of s(t), so when the middle graph is concave down, the acceleration is negative. Nice, eh?
S: 	Why would anybody be interested in the slope of the tangent line to some curve, or, for that matter, whether it's concave up or down? I can't get too excited about acceleration. Is that why we're studying calculus?
P:	No. Calculus involves derivatives and these occur everywhere ... the universe unfolds according to equations involving derivatives ... and that's why we study derivatives.
S:	For example?
P:	We've already mentioned that if  s is the distance travelled by an object, then v = is its velocity and = is its acceleration. Newton's law of universal gravitation looks like = - , again involving derivatives. The spot which paints the picture on your TV screen moves across the screen according to  + k(s2-1)+ s = 0. See? Derivatives! A hot object at temperature T cools according to   = - k (T - c). More derivatives. The volume of a sphere is V = r3 and the surface area is . If C(x) is the cost of producing x items then is the marginal cost per item and if R(x) is the revenue then is the marginal revenue. The consumer price index ...
S:	zzzzz

Example:	A lake is stocked with 1000 fish. It is found that N(t), the number of fish after t years, increases so that its rate of increase is governed by the equation:  = k N (10,000 - N)  (called the "Logistic Equation"). Show that the rate of change, , is a maximum when the population is 5,000 fish.
Solution:	We determine how rapidly increases by taking its derivative: 
 = = k N (- ) + k where we've differentiated k N (10,000 - N) as a product. Hence
 = k . Note, first, that = k N (10,000 - N) is positive when 0 < N < 10,000. Now, when N < 5,000 we have  > 0 so is increasing. When N > 5,000 we have  < 0 so is decreasing. Hence the maximum rate of increase occurs when a population of 5,000 is reached.
Note:	If the fish population obeyed the Logistic Equation,  = k N (10,000 - N), then N(t) increases until 
N = 10,000 which is the eventual population of the lake (called the "carrying capacity" of the lake). Normally one wouldn't know the eventual population so we'd have to assume an equation = k N ( P - N)  where the eventual population is some unknown constant P. Then we'd drop 1000 fish in the lake and each year we'd measure the population, N(t). The rate of increase will increase at first, then decrease. When this happens the population is the carrying capacity. If the population at that time is, say, 15,000 then we can expect the eventual fish population to be 30,000.
(A nice problem: Assuming  = k N ( P - N), where k and P are constants, show that the rate of change, , is a maximum when the population is fish.)
Example:	An object moves in a straight line so that s, its distance (in metres) after a time t (seconds), is given by the relation: s = t sin(pt). Determine its velocity and acceleration at time t = 1.
Solution:	We need to find the velocity and acceleration  . First,  = pt cos(pt) + sin(pt) using the PRODUCT rule, then = - p2t sin(pt) +2p cos(pt) and, at t = 1, we get = - p  and  = - 2p. 
(Note that < 0 means that s is decreasing; the object is getting closer. Also, < 0 means that is decreasing; the object is slowing down.)

LECTURE 5

IMPLICIT DIFFERENTIATION & TRANSCENDENTAL FUNCTIONS
Some Notes:  
•	If f'(x) = 0 over some interval, then f(x) = constant over that interval (i.e. the graph of y = f(x) is a horizontal line). This means that y is NOT changing when x changes.
•	Note the interpretation of the derivative as a rate of change. 
	
	This interpretation was used by Newton*, who imagined x moving along a line at constant speed, and y = f(x) moving along another, parallel line. Then the derivative indicated how much faster (or slower) y was moving. In fact, it's this interpretation of the derivative which makes the differential calculus such an important tool (and not the interpretation as the slope of the tangent line to a curve ... as if anybody were interested in the slope!).
•	If y = f(u) depends upon u and u = g(x) depends upon x thentells how rapidly y changes when u changes ("y runs 6 times faster than u"), and tells how rapidly u changes with x ("u runs 7 times faster than x"), and  then gives how rapidly y changes with x  ... "y runs (6)(7) = 42 times faster than x" ... and now the CHAIN rule seems almost trivial!

IMPLICIT DIFFERENTIATION:
	Sometimes we're given a relation between x and y which, although is does define y as a function of x, doesn't give y explicitly in terms of x. For example, consider the relation y3 + y5 = x. For x = 1 the y-value must be found from y3 + y5 = 1 and there is only one y-value which satisfies this equation. (Can you prove this?) Similarly, for any other value of x there will be a single value of y which satisfies the equation. (Can you prove this?) Consequently, y is a function of x (even though we can't usually find the y-value ... except for certain peculiar x-values such as x = 0 in which case y = 0, or x = 2 in which case y = 1). However, remarkably, we can find as follows:
	Regarding y as a function of x we differentiate the relation y3 + y5 = x with respect to x and get 
= x  or, using the CHAIN rule we get = 1 hence (3y2 + 5y4) = 1, 
so = . If we know a point on the curve, such as (2,1), then the slope of the tangent line at that point is  = = .
Example: 	Find at the point  (1,1)  if xy = sin .
Solution:	First we check that (1,1) does lie on the curve! It does. 
Next we differentiate the entire equation, regarding y as a function of x:  = sin . 
This gives: x + y = cos . Now substitute the given point, x = 1, y = 1 and get:
+ 1 = 0  so = -1. (Note: the tangent line would be  = -1  or  y = -x + 2)
Example:	Assuming xn = n xn-1 holds for integers n, prove that it holds for fractions as well.
Solution:	Let  y = xp/q, then yq = xp and we differentiate implicitly:  yq = xp gives 
q yq-1 = p xp-1 (where we need only use the differentiation formula for integers p and q). Then 
= = = xp/q - 1  ... and the formula works for any rational number!
PS:
S:	What about the rest of the numbers, like and p which aren't rational numbers? 
	Is   xp  still equal to  p xp-1 ?
P:	Yes ... but it isn't easy to prove.
S:	One other thing. You said that the standard equation of a circle, x2 + y2 = a2 (where "a" is a constant), doesn't define y as a function of x ... since there are usually two y-values for each x-value. Right?
P:	Right.
S:	Then if I go right ahead and take of everything, that is, I differentiate implicitly, even though y is NOT a function, I get  
2x + 2y = 0  so  = - . Is that wrong?
P:	Actually, it's okay ... sort of. Since you can extract a function from this relation, y = for example, then 
	= - gives the slope of the tangent line at a point (x,y) on the graph of this extracted function. See?
S:	No.
P:	Well, let's take y = for example. Then = 1/2 = -1/2(-2x) = - which, of course, is - . If we take another function out of x2 + y2 = a2, say  y = - , then = = - again.
S:	Are they the only two functions you can "extract" from x2 + y2 = a2?
P:	No. We can also define y = when  -a £ x £ 0  and 
	y = - when  0< x£ a. This is a function, with a single defined value for each x in the domain -a £ x £ a; its graph is shown in the diagram. (By the way, it doesn't have a derivative at x = 0).
	Whether we compute for negative x (using   y =  ) or for positive x (using  y = - ) we'd get the result = - .
	So the we get from implicit differentiation actually gives us the correct slope no matter what function we extract from the relation (provided exists!). That's because = - doesn't give the slope at some x-value (where there may be two y-values satisfying the relation), it gives the slope at a point (x,y).

S:	Wait a minute. You said it doesn't have a derivative at x = 0? Can you prove that?	      
   	
P:	Remember the definition! In order to have a derivative, the limit must exist.
 	In particular the right-hand limit must exist and that's: 
	= = -¥. 
	In fact, it's clear from the graph that as x approaches 0 from the right, the chord joining the two points (one being the point (0,a)) becomes vertical and its slope becomes large and negative, approaching -¥.
S:	Do I have to know this for the final exam?
P:	No.		
Examples:
	For each of the following:
		sketch a graph of the function indicating asymptotes and discontinuities, and
		write "limit statements" for x®-¥, x®¥, and
		if f(x) has a discontinuity at x = a, write two limit statements for  x®a- and x®a+.

	(a)	f(x) = 		(b)	f(x) = 		(c)	f(x) = 

Solutions:
  (a)	f(x) = = has discontinuities at x = 0 and x = - 2
       	f(x) = 0,   f(x) = 0,   f(x) = = -¥,  	
       	f(x) = ¥,   f(x) = ¥	and  	f(x) = -¥	
	
(b)	f(x) = = = 
           has discontinuities at x = 0 and x = - 2.
	Since f(x) = thenf(x) = -1,   f(x) = -1
f(x) = -¥,  f(x) = ¥, f(x) = -2,  	f(x) = -2	

	(c)   f(x) =  has a 
 discontinuity at x = 0.
	f(x) = 0 and 
	f(x) = 0   
	
	(Note:  0 £ | f(x) | £ , then we use the SQUEEZE theorem to get the limit.)
	f(x) =f(x) = 1
P:	Notice anything interesting about the graph of y = sin x ?
S:	Nope.
P:	It  oscillates between y = and y = - . Remember? Since sin x oscillates between +1 and -1, then y = f(x) sin x oscillates between y = f(x) and y = - f(x) and in this case ...
S:	Yeah, I remember.

Examples:
	The greatest integer function  [[x]] is defined as "the greatest integer not exceeding x". 
	(For example,   [[-5.7]] = -6,  [[-5]] = -5,  [[-4.8]] = -5, [[4.8]] = 4 ) 

	(a)	Sketch a graph of f(x) = [[x]]  for -4 £ x £ 4 and identify points of discontinuity.
	(b)	Sketch a graph of f(x) = [[x + ]]  for -4 £ x £ 4 and identify points of 	discontinuity (and note that f(x) rounds any number "x" to the nearest integer!)

Solutions:

    (a)	For f(x) = [[x]], points of discontinuity occur at every integer.
    (b)	For g(x) = [[x + ]], points of discontinuity occur halfway between successive integers.
P:	Remember the sign in the post office ... about the cost of postage? It was  C(x) = .
S:	Nope.
P:	Well, look at your notes. Anyway, the cost could also be written C(x) = 5 + 5[[x+1]]. Do you see that?
S:	Nope.
P:	Can you imagine such a sign ... hanging in a post office?
S:	Nope.
P:	Your cerebral prowess leaves something to be desired.

TRANSCENDENTAL FUNCTIONS: trig, exponential and log functions

	Many functions we deal with can be evaluated for every x (in the domain of the function) using a $4.95 calculator (that can only add, subtract, multiply, divide and extract roots). These are called algebraic functions. (e.g. , and a+bx+cx2+dx3.) Any function which is not algebraic is called transcendental. These include  sin x, tan x (and the other four trig functions) and 10x (and all the exponential functions ... with any base), log2 x (and all log functions, with any base) and many others. Unfortunately, the RULES for differentiation (product, quotient, Chain Rule, etc.) are of little help if we wish to differentiate a transcendental function ... unless, of course, we can express a transcendental function in terms of algebraic functions, using products quotients or composite functions .... but then they wouldn't be transcendental! Hence we must resort to the definition of the derivative ... and since the derivative is defined in terms of a limit, we can expect to find some weird limits which require some ingenuity to evaluate.
	
•	To deduce   sin x = cos x   requires evaluating the limit: 
	= 
	= cos x  , hence reduces to the evaluation of a weird limit: = 1.
	(We won't prove this, but we'll use it ... as we've already done.)

the TRIG FUNCTIONS and their derivatives
	Beginning with we can generate the derivatives of the other five trig functions (without resorting to the definition of the derivative!), because they are all related by simple algebraic equations. For example, sin2 x + cos2x = 1 so if we differentiate implicitly (and use sin x = cos x) we get: 
2 sin x (cos x) + 2 cos x cos x = 0 hence we can solve for . Similarly, tan x = so tan x = = hence . Also, 
sec x = so sec x = -1 = - (cos x)-2 (- sin x) = which can also be written 
. Finally, we "leave it as an exercise" to verify that and  .
	Note that all the co-functions (cosine, cosecant and cotangent) have the (-) sign ... and that makes it somewhat easier to remember.

the EXPONENTIAL and LOG functions
•	To find 2x requires the limit: and ultimately the weird limit   .
•	To determine log3 x  requires, ultimately, evaluation of another weird limit, namely:
	 1/t = e » 2.71828  (... which is how "e", the base of the "natural" logarithms arises).

	Let's start with f(x) = loga x (for some positive base "a"). 
	Then f'(x) = = loga = logax/h  
where we've used two magic properties of logarithms: log A - log B = log and  n log P = log Pn. In the above, we must assume that x > 0 (since loga x isn't defined for x £ 0) and that means we won't then get into trouble with the factor . Now, for any positive x, as h®0, then t = ®0 as well. Hence our weird limit is
 1/t , just as we said. The values of (1+t)1/t, as t®0, approach a number slightly less than 3 (approximately  2.7182818) and this number is called "e".

or, equivalently,    

	Finally, then, we have 
	It's now clear that the world's greatest choice for a base for our logarithms is precisely the number e, since we'd get:  loge x = logee  and since logee = 1 we'd have . In fact, since this is the natural choice for a base, logarithms to the base e » 2.7182818 are called natural logarithms and are written  ln x  (pronounced "lawn x"  or "ell en x").

	What could be simpler! Imagine the frustration of the pre-ln  mathematicians who could find functions whose derivatives were xn, for every number n ... namely ... with the single exception of n = -1. 
	Anyway, from now on we'll assume our logs are natural logs unless otherwise specified.

Examples:	Find for each of the following:
		(a)   y = x ln x		(b)   y = ln cos x	(c)   y = ln (sec x + tan x)
Solutions:
(a)	= x ln x + ln x = x + ln x = 1 + ln x  (using the PRODUCT rule for differentiation).
(b)	Let u = cos x  so y = ln u and (using the Chain Rule) = = = = - tan x. 
(c)	Let u = sec x+tan x  so y =ln u and  = = = = sec x.

	Okay, we now have the derivative of logax. To find the derivative of ax we could try to evaluate the limit 
= ax ... but it wouldn't be easy!  Instead we digress to consider INVERSE functions which will make it easier to find  ax   once  loga x  is known.
PS:
S:	Wait wait wait. You said that log3 x isn't defined if x is negative. 
P:	... or zero.
S: 	Okay, log3 x isn't defined for x negative or zero. Why not?
P:	Remember the definition of the logarithm to the base 3? If y = log3 x, then x =3y. But 3y is never negative or zero, so x can't be negative or zero.
S:	There must be an easier way ...
P:	Let's go over logs one more time. Suppose we want to find a number p such that 5p = 47. You can see that 52 = 25 and 53 = 125 so there is some magical number between 2 and 3 such that 5p is 47. Whatever that magical number is, it's called ...
S:	The log of 5 to the base 47?
P: 	No! p is the log of 47 to the base 5, written log5 47. Remember the significance of the word "base":  if  5p = 47 then "5" is the base. NOW, if there were such things as the log of a negative number, say p = log5(-47), then 5p = -47. But that's impossible, right? You can't raise 5 to any power and get a negative number, so there are no logs of negative numbers.
S:	Or logs of zero, right?
P:	Right! Now let's talk about Inverse Functions. Pick a number between 1 and 10. Now multiply it by 3. Now subtract 7. Now add 7. Now divide by 3. You get the number you started with, right?
S:	Amazing! How'd you do that?
P:	You pick a number x, then form f(x) = 3x-7. That is, you apply the function f(x). Then you undo what f(x) did to x, by adding 7 and dividing by 3. That is, you  apply another function g(x) = . See? You first apply the function 
	f(x) = 3x - 7, then you apply the function g and to get g(f) = = = x and the latter function undoes what f did, and you get your "x" back again. The second function, "g", is called the INVERSE of "f". For the function "f" you "multiply by 3 then subtract 7": f(x) = 3x - 7. For the function "g" you "add 7 then divide by 3": g(x) = ...  and g(f(x)) = x.
S: 	Why did you insist I take a number from 1 to 10?
P:	I didn't think you could multiply big numbers by 3.

LECTURE 6

INVERSE FUNCTIONS:
	If g(x) is the INVERSE of f(x), then g(f(x)) = x. Of course, in order that g(f(x)) make sense, x must lie in the domain of f (because we've got an f(x) in there!), and f(x) must lie in the domain of g (since we're evaluating "g" at the place "f(x)"). How to find g, the inverse of a given function f?

Examples:
 •	To determine the inverse of y = f(x) = 3x - 7, do the following:
	(1)	Write x = 3y - 7		(2)	Solve for y = = g(x), the inverse of f(x).
		Note: g(f(x)) = = x.
•	To determine the inverse of y = f(x) = x3:
	(1)	Write x = y3		(2)	Solve for y = x1/3= g(x), the inverse of f(x).
		Note: g(f(x)) = f(x)1/3 = x.
•	To determine the inverse of y = f(x) = :
	(1)	Write x = 		(2)	Solve for y = = g(x), the inverse of f(x).
		Note: g(f(x)) = = x.
•	To determine the inverse of y = f(x)
	(1)	Write x = f(y)		(2)	Solve for y = g(x), the inverse of f(x).

Note:	The first step is to interchange x and y: from   y = f(x), you write x = f(y). This changes the graph of  y = f(x) by reflecting it in the line  y = x. ("Interchanging" replaces every point (x,y) by (y,x) which is the mirror image in the line y = x.) The second step, solving x = f(y) for y in terms of x, doesn't change anything in the graph! In fact, 
       x = f(y) and y = g(x) are two forms of the same relation between x and y ... and they have the same graph. This is handy. If you don't like the looks of a function g(x), as in y = g(x), then you can write the relation as x = f(y) where the inverse function, "f", may be nicer to look at (and, in particular, to differentiate!).

	The last step, "solve for y", may be  impossible ... because not all functions have inverses.	     

 	

	Consider y = x2. To find the inverse we interchange x and y, writing x = y2. Then we solve for  y = ?!%#*, but there are TWO values of y, namely y = ± , so x = y2 doesn't define y as a function of x. That's because f(x) = x2 doesn't have an inverse function. We might have anticipated this by considering the graph of  y = x2. When we interchange x and y, hence reflect the curve in the line y = x, we don't get the graph of a function. (A function must have ONE y-value for each x-value in its domain, and 
       x = y2 doesn't!)	

	Remember the vertical line test for a function? Every vertical line (in its domain) must cross the graph only once. In order for a function to have an inverse, it must also satisfy a horizontal line test: every horizontal line (in its range) must cross the graph only once. y = x2 satisfies the first test (so it's a function) but not the second (so it has no inverse). Remember: to find the inverse of a function f(x) we must solve x = f(y) for y (or, what is equivalent,	      	
solve u = f(v) for v ... or w = f(q) for q ... don't get tied to any particular labels!). To see if this is possible, we needn't go so far as interchanging x and y. We can simply ask: "Given y, is it possible to solve y = f(x) for x?" (i.e. can we solve the original equation, y = f(x), for x, if y is given?) When y = 3 is given, it's like drawing a horizontal line y = 3 and trying to find the x that satisfies 3 = f(x). If there were one solution (and ONLY one) then there is a unique x for y = 3 (and the horizontal line test is satisfied). 
(That's NOT the case with 3 = f(x) = x2.) 
	However, if there were a unique x for all values of y in, say, c £ y £ d, then y = f(x) would define x as a function of y (as well as defining y as a function of x!). 
	What is this function? It's x = g(y) where "g" is the INVERSE of "f".

  If f(x) has an inverseg(x)then y = f(x)when solved for xgives x = g(y)  

TESTING TO SEE IF A FUNCTION HAS AN INVERSE:
	If the "horizontal line test" is satisfied for some function y = f(x) (on a domain a £ x £ b), then f(x) has an inverse. But the horizontal line test WILL be satisfied if the function f(x) is always increasing or always decreasing (i.e so-called "monotonic" functions)... and that can be used to test a function for an inverse: check that f'(x) > 0 or f'(x) < 0 on the domain.

More Examples of Inverses:
• 	What is g(x), the inverse of f(x) = ?  (on x > 0 where we can check that f'(x) > 0)
	Write    y = , interchange x and y so x = , then solve for y = g(x) = - 2. 
	The graphs of y = and y = - 2 are reflections of each other in the line y = x.
•	What is the inverse of f(x) = e2x ? (on -¥ < x < ¥ where f'(x) > 0)
	Write y = e2x , then x = e2y, then solve for y = ln x.
	The graphs of y = e2x and y = ln x are reflections of each other, in the line y = x.
PS:
S:	If "g" is the inverse of "f", then what's the inverse of "g"? 
P:	We can see the answer graphically. Start with y = f(x), reflect it in the line y = x and get its inverse, y = g(x). Now start with    y = g(x), reflect in y = x and get its inverse ...
S:	y = f(x), right? But is that a proof?
P:	Here's a proof:  since g(f(x)) = x (that's what makes "g" the inverse of "f"), then apply the operation "f" to each side and get f(g(f(x))) = f(x), or, to put different labels on things, f(g(u)) = u (where we've replaced f(x) by u). Now stare at 
	f(g(u)) = u and realize that this makes "f" the inverse of "g": whatever "g" does to u, "f" undoes it, recovering u again.
S:	You were about to say something clever about the derivative of ax, remember? You said knowing loga x makes it easier to find ax ... then you digressed into inverses.
the Derivative of an Exponential Function:
	If we write y = ax  and want to determine we can differentiate directly (but we'd have to use the definition of the derivative) or we can write this same relation as x = loga y and find by implicit differentiation. Since we've already found the derivative of the log function (by using the definition) the latter scheme is easier.
	y = ax Þ x = loga y Þ x = loga y  Þ 1 = logae 
 	logay = and we know logay). Now we solve for  = . As is usual with implicit differentiation, the answer has y's in it. But y = ax  so we get, finally:  = .
	To recap (about the exponential and log functions): 	and  .
	These involve logs to the base "a" but can be changed to "natural" logs as follows:
If p = logae then ap = e so (taking ln of each side) ln ap = ln e  or  p ln a = 1, so p = . In other words, 
. That's not something special about logs to the base e. In fact: . We then have:
ax = ax ln a	and	loga x = 
	In particular, if we choose as base the number "e" (noting that ln e = 1):
ex = ex	and	ln x = 
	Note that f(x) = ex  is a function whose derivative is the same function! (Can you think of any others? How about f(x) = p ex or f(x) = -47 ex? Clearly f(x) = C ex has this nice property, for any constant C ... and these are the only functions with the property that f'(x) = f(x).)

	Above is a reasonably accurate (computer-plotted) graph of y = ex and y = ln x. They are inverses one of the other and knowledge of one (say y = ex) will tell you everything you want to know about the other. For example, it's clear that   e0 = 1, so . Also, e1 = e so . 
	Also, ln  e-3 = -3 ln e = -3. Further, since , then .
	Note that (as mentioned on earlier occasions) the logarithmic function is defined only for positive x.

LOGARITHMIC DIFFERENTIATION:
	Once in a while one has to differentiate exponential functions with variable exponents and variable bases. If the base is a constant, say f(x) = 2x2, it's easy: 
	Let u = x2 then f(x) = 2u and  = = = (2u ln 2) (2x) = 2x 2x2ln 2.
If the exponent is constant it's also easy. For f(x) = (sin x5)3, = 3 (sin x5)2 cos(x5) (5x4) = 15 x4 sin2x5 cosx5.
	If both base and exponent are variables, it's NOT so easy ... unless we use "logarithmic differentiation":

LOGARITHMIC DIFFERENTIATION:	Take the ln of each side ... then differentiate	

Because ln  f(x)g(x) = g(x) ln f(x) the result of taking logs is to eliminate variable exponents!
Example:	Determine if y = xx.
Solution:	First takes logs of each side ("natural" logs, of course) : ln y = ln xx = x ln x. Now find using "implicit differentiation": ln y = x ln x  gives  = x () + ln x = 1 + ln x. Now solve for
 	= y (1 + ln x) = xx (1 + ln x). (Note that the answer is definitely NOT given by  xx = x (xx-1) because the rule xp = p xp-1 only works when the exponent is a constant!)

Note:	Taking logs before differentiation is a good scheme in many instances.

Example:	Determine if  y = .
Solution:	Here logarithmic differentiation is also useful. Take the ln of each side, then find implicitly.
ln y = ln  = 10 ln (x+1) + 3 ln x - 2 ln (x-1) so = + - hence
 =  

Example:	Use the differential to estimate the percentage change in volume of a cubical box if there is a 1% error in the side length.
Solution:	If V = x3, where x is the side length, then we write » = 3x2 so DV » 3x2 Dx. This gives an estimate of the change in volume when the side changes from x to x+Dx. To get a percentage change, we divide by V = x3 giving  » = 3 hence the % change in volume is three times the % change in side length.

S:	Huh?
P:	That's what we mean by percentage change, isn't it? We divide the change in volume by the original volume ... and we can multiply by 100 to get the % change. But let me show you something slick, using logarithmic differentiation (in case you were wondering why this example is stuck in  here ... with logarithmic differentiation!).

	Since V = x3 then ln V = ln x3 = 3 ln x and now we differentiate and get = 3 and we use » and get  = 3 so that » 3 . The fractional change in V is 3 times that in x (and we could multiply by 100 to get % changes).  In fact, if we're interested in estimates of "fractional changes" (or percentage changes) in some function y = f(x) when x changes by  Dx, we should :

	(1)	take logs................................................	ln y = ln f(x)
	(2)	differentiate............................................	= 
	(3)	replace by the approximation ...........	»  
	(4)	solve for the fractional change  .............	» Dx

	What we'd find is that the % change in the volume of a cubical box (measured in metres3 ) is 3 times the % change in side length, and the % change in the area of a square (measured in metres2 ) is 2 times the % change in side length. Try it!

About Exponential Growth:
	One often hears the expression "Holy cow! It grows exponentially!" (or some such phrase). Indeed, the growth of y = ex (or y = 2x or y = 10x) is explosive, although it wouldn't seem so from the above diagram. However, if we plot y = ex for -100 £ x £ 100 the graph looks very much like the negative x-axis together with the positive y-axis! For negative x it vanishes almost immediately (to zero). For positive x it explodes (to infinity). Among other things, this explains the "miracle of compound interest". If you stick $1000 in a bank which pays 12% interest each year, then you'll have 1000 (1.12) or $1120 after a year and 1000 (1.12)(1.12) = 1000 (1.12)2 = $1254.40 after 2 years and, after n years, 1000 (1.12)n dollars. The amount of money is an exponential function of "n": M = 1000 an where a = 1.12 and, for a lifetime (where n = 75 years, say), the $1000 will grow to about $5 million dollars! (moral: start saving early and retire a millionaire.)
PS:
P:	That reminds me of the story of how the inventor of the game of chess was rewarded (or was it checkers?). The king asked what she wanted and she said a grain of wheat on the first square, 2 on the second square, 4 on the next and so on, the number doubling with each square. The king laughed at the trivial request, but only for a moment. He pulled out his math notes and quickly calculated that, on the last square alone, there would be 263 grains of wheat and that was more than all the wheat in the kingdom. (263 is roughly 10,000,000,000,000,000,000. How do I know? Because 210 = 1024, or roughly 103, and I can write  263 = (210)6.3 which is then roughly  (103)6.3 which is roughly 1019.)
S:	If the exponential function looks like the negative x-axis together with the positive y-axis, that means the log function must look like the ... uh, let's see ... the negative y-axis together with the positive x-axis. Right?
P:	Right.
S:	That means the log function grows very slowly.
P:	You got it.	        	
About the number e:
	The base of natural logarithms, the number e, is one of the most important numbers in mathematics ... perhaps the most important after the number p*. It occurs in a variety of situations:
•	Radioactive substances "decay". (For example, radium eventually "decays", turning into lead). The amount of the substance, S(t), after a time "t", satisfies an equation like S(t) = A e-bt where A and b are constants.
•	The current in an electric circuit is often described by  I(t) = A e-bt.
•	Populations sometimes grow according to an equation  N(t) = A ebt.
•	The so-called "normal probability distribution" is described by  e-b(x-c)2 (the infamous "bell curve").
•	The amount of a substance entering into a chemical reaction is often described by .
•	If $A is left in the bank to accumulate interest at the rate of i% per year, the amount of money after n years is 
A ( 1 + )n. If the interest is calculated monthly at a rate %, the amount after n years is 
A ( 1 + )12n. If calculated daily at a rate %, the amount would be A ( 1 + )365n (if there are 365 days per year). If the interest is calculated T times each year at a rate % (T=12 means "monthly" and T=365 means "yearly") then the amount after n years is A ( 1 + )Tn . The big question: how much money would you have after n years if the interest is calculated continuously (meaning T®¥). The answer is
 A ( 1 + )Tn. To evaluate this limit we set N = , or T = and note that N®¥ as T®¥, so our limit can be written: 
	 A ( 1 + )inN/100     or 	 A in/100  
and we recognize the limit N = e. Hence the amount after n years is A ein/100 dollars. 
	For example, $1000 left in the bank for n = 1 year at 10% per annum compounded continuously will grow to $1000 e.1 = $1105.17 compared to $1100.00 if it were compounded annually.

Examples:
	Plot the graph of y = x2 e-x, showing where it's increasing or decreasing.

Solution:
    	Note first that y = 0 only at x = 0 (and is positive for all other x-values). Further,
 = x2 (-e-x) + 2x e-x = x (2 - x) e-x 
which is negative for x < 0 and again for x > 2 (hence the function is decreasing there) and is positive for        
0 < x < 2 (so the function is increasing there). 	
Note, too, that x2 e-x = ¥ (since both x2 and e-x become infinite). Finally, to complete the picture, we should compute  x2 e-x. Unfortunately, this is a problem where one factor becomes infinite and the other becomes zero. Nevertheless, if we write y = and have faith in the explosive growth of ex, it's not hard to accept the fact that x2 e-x = 0. We'll show this later when we consider limits which have the form or  . In fact, ex grows so rapidly (with increasing x) that  = 0  ... and you could substitute any power of x and get the same "0" limit. (No matter how hard x1000 tries to get to infinity, ex drags the fraction to zero.) On the other hand, the function ln x grows so slowly that  = ¥  for any positive power p, no matter how small.
	On the other hand, 2x is also an exponential function as is 10x and px ... and they all grow very rapidly.
PS:
S:	I thought you said that "e" was important. Is it more important than 2 or 10?
P:	Well, if you want to know the truth, "e" usually occurs in the form of a function eax, for some constant "a". However, eax can always be written 2bx where "b" is some constant ... so, in a sense, that makes "2" just as important as "e", doesn't it?
S:	How's that? Is eax = 2bx? Is that what you're saying?
P:	Sure. Let's do an example. I'll find "b" so that e3x = 2bx. First I take the ln of each side and get 3x = ln 2bx = bx ln 2 (using that important log-property: log AB = B log A) and that means that b = . See?
S:	I really don't see why all the fuss about "e". Let's do something else, can we?

Example:	The cost of manufacturing an item is $100 even if no items are manufactured ... and the cost decreases with each item; for x items the cost per item is 100 - .1x  (i.e. the cost decreases by $0.1 for each item). Graph C(x), the cost of producing x items.
Solution:	For x items the cost is C(x) = x (100 - .1 x) = 100 x - .1 x2 which is positive for 0 < x < 1000. (For x > 1000 the cost is negative and makes no sense ... so we only consider x < 1000.) 
      Further, C'(x) = 100 - .2 x is first positive, for x<500 (the total cost increases) then negative, for x>500 (C(x) is decreasing). 
      Finally, C''(x) = -.2 is negative so that C'(x) is decreasing (meaning that the graph is concave downward).
		It's clear that the maximum cost occurs for 500 items, and this technique of determining the maximum (or minimum) value of a function by investigating its derivative is one we'll use later on.	

S:	Are you saying the cost of producing 1000 items is zero?
P:	That's what's called a mathematical idealization. Mathematicians do it all the time. When a mathematician shows you the solution to a problem you can be sure that she's made some assumptions and you have to be clever enough to argue with the assumptions. Assuming the cost per item decreases by $0.1 per item is, of course, ridiculous. So pay attention and argue with my assumptions! BUT, having made the assumptions, the math just carries on to the bitter end and knows little of nonsensical conclusions.

Example:	An orchard contains 240 apple trees, each tree producing 30 bushels of apples. For each additional tree planted, the yield per tree decreases by 1/12 bushel (due to overcrowding). Sketch N(x), the total apple production as a function of x, the number of additional trees planted.
Solution:	The total production is (number of trees)x(bushels per tree). For x additional trees, the number of trees is 240 + x and the bushels per tree is 30 - x/12. The total production is:
N(x) = (240 + x)(30 - ) = 7200 + 10 x - and N'(x) = 10 - is first positive (until x = 60) meaning that the total production is increasing, then N'(x) < 0 (for x > 60) so the production decreases. Note, too, that 
N''(x) = - < 0 so the curve is concave down. (It's clear that x = 60 more trees should be planted to yield the maximum number of apples from the orchard.)	

Example:	Repeat the above if the number of bushels per tree is 10. 
		All other values are the same.
Solution:	The total production is 
N(x) =  (240 + x)(10 - ) = 7200 - 10 x - and 
N'(x) = -10 - is decreasing for every choice of x ³ 0. Again, N''(x) < 0 so the curve is concave down. (Conclusion? don't add any more trees!)	

ODDS 'n' ENDS ON CURVE SKETCHING:
Even and Odd Functions:
	For simple functions like f(x) = x2 or f(x) = x3 it is sufficient to sketch a function which passes through the origin and is increasing with increasing x. However, certain properties make sketching a little easier.
	Some functions, like f(x) = x2, have the same value for -x as for +x; that is, f(-x) = f(x). Such functions are called EVEN functions. Some examples: cos x, 1+x2 - x4, x sin x and e|x|.
(I)			
	Other functions, like f(x) = x3, assume the opposite sign when x is replaced by -x. These are the ODD functions. Some examples:  sin x, x - x3 + x5, x cos x and sin x3.
(II)			
	When graphing these functions, it's only necessary to graph the function for x ³ 0 since the graph for x < 0 can be obtained via the above EVEN or ODD symmetry.
	If neither of (I) or (II) holds, then the function is neither even nor odd.  Some examples: 1 + x, sin (x+1), ex and, of course ln x (which only has values for x > 0).

Quick&Dirty Curve Sketching:
	If a picture is worth a thousand words then we should spend some time in sketching the graph of functions: 
y = f(x). We first find the places where f(x) changes from positive to negative (by crossing the x-axis, or perhaps jumping discontinuously across the x-axis), then the places where f'(x) is positive or negative (to see where the graph is increasing or decreasing) then, if we're not exhausted, we find where f''(x) is positive or negative (to see where the graph is concave up or concave down), then take note of any horizontal asymptotes (where x®¥) or vertical asymptotes (where y®¥). It's a lot of work!
Example:	Sketch the graph of y = .
Solution:	Note that y = 0 when x = 0, and y < 0 when x < 0, and y > 0 when x > 0; the graph lies in the first and third quadrants. In fact, f(-x) = = - = - f(x) so the function if ODD.
	Now consider  = = . It's positive when x2 < 1 (i.e. in the interval -1 < x < 1) and negative outside this interval.
	We can also calculate = and find that y''>0 (hence is concave upward) when x lies in 
-< x < 0 and again in x > . Elsewhere it's concave downward.
	There are no vertical asymptotes (since f(x) is never infinite for any value of x) but (dividing numerator and denominator by the highest power of x) = = 0 so there is a horizontal asymptote, namely y = 0 (the x-axis).	   

	NOW ... if we're not interested in the details but want an quick&dirty picture of y = , we can sketch it for very small x and for very large x. 
	For | x | << 1 (meaning x is very small), we can neglect the x2 in the denominator (compared to the "1") so, approximately, y » = x, and we sketch     
y = x (for x very small).	   
	
	Next, for large x, we neglect the "1" compared with the x2 and get the approximation y » = which we sketch for very large x (i.e. |x| >> 1). Then we just join these pieces (praying that nothing too wild happens in between small and large x).

Example:	Sketch y = 1 - x + x2.
	For small x, y is very nearly the straight line y = 1 - x (neglecting the x2). In fact, this is the tangent line at the origin! 
	Next, for very large x, y is nearly the parabola y = x2. 	 
	
Example:	Sketch y = x + .
          		For small x we neglect the x term and get:
 y = .
	For large x we neglect the term and get:
 y = x (approximately).
	These two curves, y = and y = x, are easy to sketch (for small and large x respectively) ... then we join them (and pray).	
S:	In the last two examples, how do you know that y = 1 - x + x2 and y = x + don't cross the x-axis?
P:	I said this was quick&dirty ... especially dirty. But, of course, we could check if 1 - x + x2 = 0 for any x-value, or if        
x + 1/x = 0. In both cases, there are no roots of these equations, but if we had too much work the method wouldn't be quick. 
S:	Then the graph of N = 7200 - 10 x - begins (for x near zero) just like the straight line y = 7200 - 10x then decreases like 
y = - ?
P:	Right.
S:	And C = 7200 + 10 x - starts out like the line y = 7200 + 10 x?
P:	Mmm
S:	And y = looks like y = = for small x and like ... uh, y = = -x for large x, right?
P:	Mmm
S:	And what about y = ? It looks like y = for small x, and y = » when x is large and negative, and           
y = (x + ) sin looks like y = x sin when x is large and that looks like which looks like y = 1. 
And what about  y = ...
P:	zzzzz

LECTURE 7

MORE ON INVERSE FUNCTIONS

	
Recall that a function y = f(x) has an inverse on the domain a £ x £ b provided it's monotonic there (i.e. f(x) is always increasing or always decreasing on a £ x £ b). Further, the inverse (we'll call it g(x)), when graphed, is just the reflection of y = f(x) in the line y = x. Note, too, that if the range of f(x) is c £ y £ d, then this becomes the domain of the g(x), and the domain of f(x), namely a £ x £ b, becomes the range of g(x). (All of this can be seen from a typical graph of y = f(x) and its reflection/inverse, y = g(x).)
	
Example:	Verify that f(x) = has an inverse on the domain 0 £ x < ¥, then find the inverse g(x) and its domain and range.
Solution:	First we compute f'(x) = = which exists and is negative for all x in  0 £ x < ¥, hence f(x) has an inverse there (because it's monotonically decreasing for all x in its domain). Note, too, that   0 £  < 1  for  0 £ x < ¥; the range of y = f(x) is then 0 £ y < 1. We then have the domain of g(x) as 0 £ x < 1 and its range as 0 £ x < ¥ (and we have these even before we find g!). To find g we first write 
       y = f(x) = then interchange x and y, writing x = . Now we solve for y: cross-multiply 	

to get x + xy = y so x = y - xy = (1 - x) y hence y = which is the inverse: g(x) = .
PS:
S:	Hold on! Are you sure that y = g(x) is the reflection of 
        y = f(x)? Shouldn't you check?
P:	No need to (unless I've made a mistake ... and I never make a mistake). Nevertheless, here's the graph of both. See? A reflection ===>>>
S:	But why did you restrict the domain of f(x) to 
	0 £ x < ¥?
P:	Because f(x) would be an increasing function on this domain and I could guarantee it had an inverse (and that's why I didn't need to check the graphs of each to see this ... I knew it would be okay).
S:	Are you saying that no other domain would do?
P:	No, just that the one I picked would do.
S:	I'd like to see you pick another domain.	 

	
P:	Okay, let's sketch the graph of y = f(x) (a picture is worth a thousand words, right?)
	I note that, for x very small, y = is much like        
        y = x (neglecting the x in the denominator). Also, I can see that y = 0 when x = 0 and there's a vertical asymptote at 
       x = -1 and a horizontal asymptote y = 1 since 
     = 1 (which I could also expect because y is much like = 1 when x is large  ... neglecting the 1 in the denominator). Now look at the graph. See? It's increasing for 0 £ x < ¥?
S:	Are you kidding? It's increasing everywhere!
P:	Well, that's true  ...
S:	So you could have picked any domain for f(x) and you'd still have an inverse. Go ahead, try the horizontal line test on y = . It never intersects more than once!	

	
P:	Remember we're looking for the inverse of a function f(x) on some domain. On any domain which includes x = -1,       
        f(x) = isn't a function ... it doesn't have a single, unique value at x = -1 ... it doesn't have any value at all! We have to start with a function, one which satisfies the vertical line test: every vertical line in the domain must intersect the graph precisely once. If I choose a domain which includes x = -1 it doesn't intersect at all at x = -1. See?
S:	Sounds like cheating to me. What does g(x) look like if you use the whole graph y = f(x)?
P:	Let's reflect. It looks like this ===== >>>>>>>
S:	That's a perfectly good function, isn't it? Try your line tests on it! Is the math so dumb it won't let me find an inverse for the whole f(x)? I could understand if there were two y-values for each x, in g(x) I mean ... but just look at the graph, I mean ...
P:	Okay, okay. We could have looked for an inverse for  the function f(x) = on the entire real line 
	- ¥ < x < ¥ with the exception of x = -1. Happy?
S:	I don't know why you made such a fuss ...
P:	Watch what can happen if we're not VERY careful. Let's consider another function which is defined everywhere except at certain isolated points (like f(x) above where the isolated point is x = -1). And we'll also pick a  	

	
	function which increases everywhere .
S:	Except at those isolated points, right? I can hardly wait.
P:	I'll pick y = tan x. Like it?
S:	I don't even remember what it looks like.
P:	Like this ====>>>
	And it does increase everywhere, except at those points where it has no value (or, if you like, a vertical asymptote), like x = - and x = and so on. So do you think it has an inverse on the entire real line: - ¥ < x < ¥ ? (except at the points of discontinuity, of course).
S:	No, because it doesn't satisfy the horizontal line test.
P:	That's good! In fact it doesn't have an inverse, unless we restrict the domain to ...
S:	Let me do it ... uh, to - < x < , right?
P:	Right! And the range is -¥ < y < ¥, so the domain and range of the inverse will be ...	

	
S:	The domain is - ¥ < x < ¥ and range is  - < y < ... I can see that. And I can also tell you what g(x) looks like ... I'm using g(x) to represent the inverse of  f(x) = tan x  ... uh, is there a special name for this inverse?
P:	Yes, it's called "arctan x".
S:	Okay, y = arctan x looks like this ====>>>
	Now, let's see you find if y = arctan x.	 
	
the DERIVATIVE of ARCTAN X, the INVERSE TANGENT:
	If y = arctan x and we wish to determine we can rewrite this relation as x = tan y. (Remember, if f(x) and g(x) are inverses, then y = f(x) is the same relation as x = g(y). If you "solve y = f(x) for x" you get the inverse 
x = g(y) and, if you "solve x = g(y) for y" you'll again get the inverse y = f(x).) Now, to find it's easier to find it implicitly from x = tan y by taking the derivative of both sides:  x = tan y  or  1 = sec2y hence
 = and, as usual when using implicit differentiation, we get the derivative with y's in it. To obtain in terms of x alone we need to find sec2y in terms of x, knowing that tan y = x. But sec2y = 1 + tan2y and  tan y = x  hence sec2y = 1 + x2. Finally, then:

	Note that the derivative is always positive (indicating that the function arctan x is increasing, as it is!) and the derivative = the slope of a tangent line, approaches 0 as x®¥ (i.e. = 0) as it should (judging from the graph of y = arctan x). Further, we can use the Chain Rule to show that:

the DERIVATIVE of ARCSIN X, the INVERSE SINE:
	If we attempt to define the inverse of  sin x  we run into the same difficulty as with y = tan x: the horizontal line test isn't satisfied. However we can restrict the domain as we did with the tangent function so that this test is satisfied. The most natural selection is shown below.

         
	Hence we consider y = sin x with domain - £ x £ and range -1 £ y £ 1. The inverse sine, denoted       
y = arcsin x, will then have domain -1 £ x £ 1  and range  - £ y£ . Again, to determine from y = arcsin x, we first rewrite this relation as x = sin y and differentiate implicitly:  x = sin y  or  1 = cos y so that 
= . Once again we should eliminate y by finding cos y in terms of x, knowing that sin y = x. We have 
cos2y = 1 - sin2y = 1 - x2 so that  cos y = ± and we have an ambiguity in sign!#$%*? If we choose 
cos y = - then = - would be negative. However, it's clear that y = arcsin x has a positive slope, so we choose instead cos y = and get:

and, in general

PS:
S:	Hold on. Isn't the mathematics smart enough to pick out the sign for us? I mean, our inverse has a positive so why does the math give us a choice?
P:	We restricted the domain of the sine function to - £ x £ , remember? With this choice of domain our inverse will have a positive . However ...
S:	I got it! Had we chosen, say 0 £ x £ p, then our inverse would have positive and negative slopes.
P:	No! Choosing a domain 0 £ x £ p would give us a piece of the sine function that doesn't satisfy the horizontal line test ... so it wouldn't even have an inverse. 
S:	Okay ... suppose we'd chosen a domain, say,  £ x £ . Then we would have an inverse and the derivative of this inverse would have the negative ... I see that now. One other thing; why the strange choice of names: "arctan" and "arcsin"?
P:	I almost hate to mention this, but some people like to call them tan-1x  and  sin-1x  because that's a common notation in mathematics for "inverses". For example, the "inverse" of the number "2" is written  2-1 and the inverse of the matrix A is written A-1 so it seems natural to call f-1(x) the inverse of the function f(x). I used to use the notation       tan-1x  and  sin-1x  myself, then I started to use a computer algebra system (that actually does calculus) and to enter these functions at the computer keyboard you have to type arctan x and arcsin x, not  tan-1x  or  sin-1x (which isn't so easy on a keyboard). Besides, there's enough in calculus that's confusing so it's better not to get students even more confused by using sin-1x which some will want to rewrite as  and that's quite wrong, of course.
S:	Hold on ... did you say  a computer that actually does calculus ? If computers can do all this stuff then why am I?
P:	You have a problem in economics or biology or kinesiology or physics and you turn it into a mathematical problem with equations and functions which need to be differentiated, etc., and then you can give the computer the task of performing the differentiations, etc. ... but you have to do the first part.
S:	You never explained why the funny name "arcsine".
P:	Remember the definition of sin A  for any number A? You measure off an arc of length A, on the unit circle, and the y-coordinate of the resulting point is sin A, that is, y = sin A. Now suppose you were given the y-coordinate (i.e. the value of the sine), and had to find the arc length A.  Using our notation, A = arcsin y, so  you'd ...
S: 	Don't tell me ... you'd be finding the "arc" of the "sine" or the arcsine for short. Cute. One last thing ... will we be finding inverses for the other four trig functions?
P:	We could, if you're really interested.
S:	Will I have to know it for the final exam?
P:	No.
S: 	Then I'm not really interested.

Examples:	Evaluate 	
(a)  arcsin 	      (b)  sin		(c)  cos
Solutions:	

(a)	Let A = arcsin so sin A = - . Then A lies in the range of the arcsine function, namely  - £ A £ . We choose an angle in this range whose sine is - ; clearly A is negative and is recognized as A = - .
     (We use the convenient sin A = with opposite = -1 and hypotenuse = 2, correctly placing the angle A in the fourth quadrant. In degrees, A = - 60°)	

	

(b)	Let A = arctan so tan A = - and A lies in the range of the arctan function, namely  - < A < . Here we must choose the angle in the fourth quadrant. It's not one of the familiar angles, but we only need to know its sine, namely:  sin A = sin= - = - .	

(c)	Let A = arcsin so sin A = and A lies in the range of the arcsine function, namely  - £ A £ . We choose the angle in this range whose sine is  ; clearly A is positive, lies in the first quadrant and has a cosine of:  cos A = cos= .	

	

Problem:	Which of the following is the graph of:  
		(a)	y = sin (arcsin x)?  		(b)	y = arcsin (sin x)?	
		(c) 	y = tan (arctan x)?		(d)	y = arctan (tan x)?

Solution:

PS:
S:	Hold your horses! You said that if g(x) is the inverse of f(x), then g(f(x)) = x.  So shouldn't we have sin(arcsin x) = x and arcsin(sin x) = x and arctan(tan x) = x and ...
P:	But we defined arcsin x by first  restricting the domain of sin x to - p/2 £ x £ p/2, remember? Else sin x wouldn't even have an inverse. In the above problem I'm asking what the graph of arcsin(sin x) looks like without restricting x to lie in  
- p/2 £ x £ p/2. For any  number x  (i.e -¥ < x < ¥) we certainly have a value for sin x and this value lies in -1 £ sin x £ 1 and this is precisely the domain of the arcsine function so we can certainly compute arcsin(sin x) ... even without restricting x. If we did restrict x to lie in the interval - p/2 £ x £ p/2 then we would have arcsin(sin x) = x. You just have to look at the graph of arcsin(sin x) to see that.
S:	What you mean is, if x is unrestricted then arcsin x is NOT the inverse of sin x so we shouldn't expect arcsin(sin x) to be equal to x.
P:	Precisely!
S: 	Then why didn't you say that? Anyway, how did you pick out the correct graphs?
P:	First, I know that sin(arcsin x) isn't even defined unless x lies in - 1 £ x £ 1, the domain of the arcsine function. That gives me the first graph which only lies in -1 £ x £ 1. All the others are defined for all values of x in - ¥ < x £ ¥ ... except arctan(tan x) where tan x doesn't even have a value at odd multiples of p/2. In fact, as x goes from just under p/2 to just over p/2, tan x jumps discontinuously from -¥ to ¥ so arctan would jump discontinuously from arctan(-¥) = - p/2 to arctan ¥ = p/2 (remember the graph of y = arctan x?). That gives me the next graph. Next, as x goes from -¥ to ¥,  sin x just oscillates continuously from -1 to +1 to -1 etc. so arcsin(sin x) would oscillate from arcsin(-1) to arcsin(1) to arcsin(-1) etc., that is, from - p/2 to p/2 to -p/2 etc. That gives me the third graph. Finally, as x goes from -¥ to ¥, arctan x goes continuously from - p/2 to p/2 (remember the graph of y = arctan x?) so tan(arctan x) goes continuously from - ¥ to ¥ (just like x did!).
S:	But how did you know they would look exactly like the given graphs?
P:	I didn't (except for x in - p/2 £ x £ p/2, of course, where they would all be the same as y = x). But the problem is worded so that these were exactly the graphs of four functions ... so I just had to identify which goes with which.
S: 	Sounds like cheating to me.
P:	Not at all! If I said one of the following is the formula for the volume of a sphere of radius r, then you'd be able to pick which one even if you didn't know the formula. After all, it's one of the given formulas.
S: 	What formulas?
P:	V = pr2, V = 4pr2, V = 4pr4 and V = r3. Which is the volume of a sphere of radius r?
S:	I haven't the foggiest ... wait, it's pr2. I remember that one, vaguely.
P:	No, if r is measured in metres then pr2 is measured in metres2, so it's the area of something, not the volume of anything! See? Check the dimensions.
S:	Okay, it's V = r3 metre3, a volume. So what about V = 4p r3? It's measured in cubic metres. What's it the volume of?
P:	Three spheres.
S:	Very funny.
Examples:
1.	(a)	Calculate if  xy = arctan x.
	(b)	Prove that f(x) = ex - ln x has an inverse on x ³ 1. If the inverse is called g, compute g'(e).
	(c)	Calculate  g'(-1), if g(x) = arcsin(x+1).
	(d)	Calculate  h'(1),  if h(x) = (x-1) tan (ex-1).
	(e)	Calculate  arcsin(tan(arcsin( - ))).
	(f)	Calculate at (0,0), if  arctan y = ln  (sec x + tan x).
2.	(a)	Calculate  at x = ,  if  y = ln (arcsin x).
	(b)	Determine the equation of the tangent line to ln(x2 + y2) = arctan at the point (1,0).
Solutions:
1.	
(a)	xy = arctan x  gives  x + y = . Now solve for = .
	
(b)	f'(x) = ex - ³ e - 1 when x ³ 1, so f'(x) > 0 hence f has an inverse on x ³ 1. From y = f(x) = ex - ln x we interchange x and y and write x = f(y) = ey - ln y which, when solved for y gives y = g(x), the inverse of f(x). Hence x = or 1 = so = g'(x) = . To determine g'(e) we need to know y when x = e. But x = ey - ln y so, when x = e, we have e = ey - ln y which has the obvious solution y = 1 (since 
e1 - ln 1 = e - 0 = e). Substituting y = 1 into  gives g'(e) = .
(c)	g(x) = arcsin(x+1) gives g'(x) = =  . Substitute x = -1 and get g'(-1) = 1.
	
(d)	h(x) = (x-1) tan (ex-1) gives h'(x) = (x-1) + tan(ex-1) and substituting x = 1 gives  
h'(-1) = 0 + tan(e0) = tan(1). 
	It's just as easy to use the definition: h'(-1)==tan(ex-1) = tan(1).
(e)	Let A = arcsin(- )  so sin A = - and A lies in the fourth quadrant. (In fact, A = - .) Then  tan(arcsin(- )) = tan A = -  (reading this from the diagram) and finally, the problem: 
	arcsin(tan(arcsin( - ))) = arcsin(tan A) = arcsin= ?. 
	As above, we can let B = arcsinso that 
	sin B = - and note that B also lies in the fourth quadrant.  	

	
Unfortunately B is not one of the garden-variety angles (0°, 30°, 45°, 60°, 90°, etc. i.e. 0,p/6, p/4, p/6, p/2, etc.), so we'd need a calculator to find the angle B. Punch in and then ask for the arcsin and get the number 35.26438965 which is in the first quadrant, so we take its negative and get the answer - 35.26438965° which is in degrees (!?&%) so we either put our calculator in radian mode and do it all again ... or simply multiply by p/180 to convert to radians. We get B = = -.6154797084  (using p = 3.1415926535, or some such approximation to this number).
PS:
S:	Couldn't I just leave the answer as B = - 35.2644°? (My calculator only has 6 digits.) Besides, I can never remember whether I should multiply by 180/p or p/180.
P:	Sure ... just don't forget to indicate that it's in degrees. But remember: p/180 is p radians per 180 degrees and is therefore measured in radians per degree so multiplying by degrees gives radians. Try it on 180°. You'd get  
	p/180 (180°) = p radians. See?
S:	Then what'd I get if I multiplied, say 35°, by 180/p?
P:	A very big angle ... and marks taken off.
S: 	I never could understand why the big fuss about radians. Just why do you insist upon using radians instead of degrees?
P:	Remember the definition of sin A and cos A? We measure off a distance A along the circumference of a circle and the coordinates of the terminal point are (cos A, sin A) ... and the central angle just happens to be precisely A provided its measured in radian! But that's not all. When we come to differentiate f(x) = sin x we have to resort to the definition of the derivative and get
= so we get:  cos x  , hence it reduces to the evaluation of a weird limit: 
	the limit of  as A®0, where A = .  Note that is an EVEN function of A (since 
	= ) so we need only  compute  ... the left-limit will be the same.
	To evaluate this limit we consider the diagram which defines the angle "A" (for some small positive A) and use the Squeeze Theorem. To do this we need to find something both smaller and larger than , each of which has the same limit, then will also have this limit. The lengths of various lines and arcs are shown. The piece of the circumference has length A (as per definition). Also a side of the right-triangle within the circle has length sin A (it is, after all, the y-coordinates of the point which defines the sine function). Finally we construct a tangent line at this point and extend it to intersect the x-axis.	          

 	This line segment has length tan A. (Remember  tan A = and adjacent = 1 so opposite  = tan A.) Now compare the three lengths; we have sin A < A < tan A  or  sin A < A < or since A is small and positive then sin A > 0 and we can divide through by sin A (and not change the direction of the inequality!) to get:  1 < < . Now take the limit as A®0+ and get  1 ££ 1   (since cos A®1 as A®0). That does it!
S:	What about  ?  You got  = 1.
P:	But  =  = = 1.
S:	And just where did you use the fact that A is in radians?
P:	If the central angle is A, in RADIANS, then the arclength is also A ... but ONLY if A is in radians. If you want to consider the limit of when the central angle is A degrees, then the limit will NOT be "1". In fact, let's suppose the central angle is A degrees. Then what's the arclength?
S:	It'd be ... uh, let's see, there's a formula:  a = r q  where "a" is the arclength and "q" is the central angle in radians and  r is the radius. Here r = 1 and our central angle, in radians, is q = A (where A is in degrees). So far so good?
P:	Yes, good ... keep going ... and I'm glad to see you multiplied by and not .
S:	Okay, the arclength would then be a = q = A, if A is in degrees. So what would that make the limit?
P:	You're doing fine. Keep going.
S:	Let's see ... where are those three lengths ... yeah, I got it:  sin A < A < tan A, except I'd have to put the correct arclength in the middle, so it'd become  sin A° < A° < tan A° (and I've even put in the "degrees" symbol, just to make you happy). Now I'd want in the middle so I'd have to multiply through by  and that'd
	 give me:  < < and now I can let A go to 0° and put on the squeeze and get:
	 £ £ so the limit is   ... am I right? Wait ... the limit of  is  , right?
P:	Right! And if x is measured in degrees, what's sin x ?
S:	Huh?
P:	We started all this by trying to differentiate sin x, remember? The derivative of sin x is
	= = cos x  = cos x   provided "x" is measured in RADIANS. 
        BUT, if "x" is in degrees, what's  sin x ?
S:	I'd say ... uh, sin x = cos x. Does that make sense?
P: 	Sure. We can interpret the derivative of a function as the slope of the tangent line to the graph of that function. So what you've shown is that y = sin x, when plotted against x in DEGREES, has a slope at the place x which is  cos x. Here's a plot of y = sin x, with x in RADIANS:

	It's not too surprising that the slope of the tangent line, at x = 0, is 1. Now here's a graph of y = sin x with x in DEGREES. What's the slope at x = 0?

S:	Don't tell me! It's small ... it's ... no, that's big ... it's , right?
P:	Right. So do you still want to work in degrees? Remember, you'd have to use sin x = cos x, etc.etc.
S:	Okay ...  radians are great ... so when do we do something useful with all this stuff?

LECTURE 8

OPTIMIZATION PROBLEMS

ABSOLUTE MAXIMUM AND MINIMUM VALUES OF A FUNCTION:
	Having to find the value of x which maximizes some function, f(x), is a problem which occurs frequently. The function f(x) could be a profit (which we'd want to maximize) or a temperature (so we'd be finding the hottest spot) or the strength of a beam (so we'd be finding the strongest beam) or the yield of apples from an orchard. Sometimes f(x) represents a loss (which we'd want to minimize) or expenses (which we'd also want to minimize) or perhaps the coldest spot in the lake (to see if the water will freeze). Calculus helps.
	Below we show several functions defined on some closed interval of the form a £ x £ b. Each function (except one) has both an absolute maximum and an absolute minimum value on [a,b] ... and we can see where these occur.

		
	For h(x), the absolute min and max values occur at x = c and x = d respectively (where h'(x) = 0).
	For g(x), the absolute min occurs at x = c where g'(x) = 0 but the absolute max occurs at x = a.
	For f(x) the absolute maximum and minimum both occur at the endpoints x = a and x = b respectively.
	For F(x), the absolute minimum occurs at x = b but there is no absolute max. 
To see this we should define precisely what we mean by "the absolute maximum value of a function on an interval".

		The absolute maximum value of f(x) on an interval, is f(x0) where 
		(i)	x0 is in the interval and 
		(ii)	f(x0) ³ f(x) for every x in the interval.

		The absolute minimum value of f(x) on an interval, is f(x0) where 
		(i)	x0 is in the interval and 
		(ii)	f(x0) £ f(x) for every x in the interval.

	Note that the maximum value must actually be a value of the function! For the function F(x) depicted in the diagram above, the limit as x®a+ exists, but it isn't the absolute maximum value because it is NOT a value achieved for any x in the interval. On the other hand, F(b) is the absolute minimum because F(b) £ F(x) for any x in the interval and is actually achieved for x = b. Whereas all other functions depicted have both absolute maximum and absolute minimum values, F(x) does not. Note that F(x) isn't continuous for every x in the interval whereas the other functions are continuous.
	Does that mean that continuity guarantees the presence of an absolute maximum and minimum? Look at the following functions:
				
	For y = 1 - | x - 1|, we have y = 1 - = x when 0 £ x < 1 ... since | x - 1 | = - (x-1) ... and we also have 
y = 1 - (x - 1) = 2 - x  when 1 £ x £ 2. This function is made up of two lines, it's continuous for all x in the interval [0,2] and has both an absolute maximum and an absolute minimum (which occur at x = 1 and x = 0 or 2 respectively). The next function isn't continuous for all x in [0,2] and fails to have an absolute maximum, although it does have an absolute minimum (which occurs at x = 0, x = 1 and x = 2). It looks like continuity will guarantee an absolute maximum and minimum ... but look again:
					
	The first function is f(x) = on the interval 0 < x £ 1 and although it IS continuous for every x in this interval, it still doesn't have an absolute maximum (although it does have a minimum at x = 1). Perhaps that's because it has a vertical asymptote (i.e. becomes infinite)? No, because the second function, namely f(x) = x on the interval 
0 < x < 1 also has no abs. max (neither does it have an abs. min) ... and it's never infinite.
	So what are the criteria which guarantee that some f(x) will have both an absolute maximum and an absolute minimum on some interval?

	If f(x) is continuous on the closed interval a £ x £ b, then it has both an 
	absolute maximum and an absolute minimum on that interval.

	The thing is, f(x) must be continuous and the interval must be closed (i.e. include both end-points). Look at all of the above graphs and convince yourself that this does indeed happen. This doesn't preclude a discontinuous function from having an absolute maximum and/or an absolute minimum ... even on an interval which is not closed. It's just that we can't guarantee it. More than that, if a function doesn't have an abs. max or an abs. min we can guarantee that the function is either discontinuous somewhere in the interval and/or the interval isn't closed.
	Suppose we do have a continuous function on a closed interval. Just where should we look to find the absolute extrema? A study of the various graphs shown above (and below) leads us to consider places in the interval where either f'(x) = 0 or where f'(x) doesn't exist.

	Hence, we define a critical point:
	If	(i)  f'(x0) = 0,   or
		(ii)  f'(x0) does not exist,  
		then x0 is called a critical point of the function.
	Then:

	If f(x) is continuous on the closed interval a £ x £ b, then the 
	absolute maximum and absolute minimum will occur either 
	(i)	at a critical point  in a < x < b, or
	(ii)	at an end-point:  x = a  or x = b.

	That means that we need only find the critical points interior to the interval and evaluate f(x) at each, then evaluate f(x) at the end-points, then pick the largest and smallest of all these values. BUT, this procedure is guaranteed to succeed only if f(x) is continuous on an interval, and the interval is closed (as the following examples show).
Examples:

       (A)		    (B)		(C)	     (D)

(A) 	min & max at end-point and a critical point.
(B)	min & max occur at each end-point.
(C)	no max, but min occurs at an end-point.
(D)		min occurs at critical point, but no max.
						
Examples:
 		
	For f(x) = 1 - | x - 1 |, the only critical point in 0 < x < 1 is x = 1 (because f'(1) doesn't exist). Hence the absolute maximum and absolute minimum values are the largest and smallest of the values f(0), f(1) and f(2), hence the abs. max is f(1) = 1 and the abs. min is f(0) = f(2) = 0.
	For h(x), the abs. max and abs. min are the largest and smallest (respectively) of the numbers f(a), f(b), f(c) and f(d) (noting that x = c and x = d are critical points in a < x < b because f'(x) = 0 there).
	For g(x), the abs. max and abs. min are the largest and smallest (respectively) of the numbers g(a), g(b), and g(c) (noting that x = c is a critical point in a < x < b because g'(x) = 0 there).

Example:	Determine the absolute extrema of f(x) = x - 2 sin x   on   0 £ x £ 2p.
Solution:	f'(x) = 1 - 2 cos x  = 0 where cos x = .  On  0 £ x £ 2p this occurs at x = and x = . Hence the absolute maximum and minimum values of f(x) are the max and min of the numbers: f(0), f( ), f( ) and f(2p). Hence we calculate: f(0) = 0, f( ) =  - 2 sin  =  - ª -.685,   
f( ) = - 2 sin  =  + ª 6.968 and f(2p) = 2p ª 6.283, hence, the abs. min is  - and the abs. max is  + .

Example:	A conical drinking cup is formed from a circular piece of 
paper by removing a sector and joining the edges. If the radius of the piece of paper is 10 cm., what should be the angle q so as to yield a cup of maximum volume?
Note: volume of a cone = 

Solution:	From the diagram, the volume of the cone 
is V = p r2 h. But 102 = r2+h2 (that's Pythagorus talking) so 
r2 = 100 - h2 hence the volume is V(h) = p (100-h2)h and we wish to find the absolute maximum of this continuous function for h in some interval ... hopefully a closed interval. Clearly the smallest h is 0, but that means we don't cut any sector out of the circular paper, so q = 0, and we don't have a cone at all. On the other hand if we cut out  	

all the paper, so q = 2p, then although h is a maximum (h = 10) we again don't have a cone. It seems we have an open interval to consider, namely 0 < h < 10. Nevertheless, we continue:  V'(h) = p (100 - 3h2) which is first positive, for 0 < h < 10/, then negative, for 10/< h < 10 (so V(h) then decreases) and the maximum clearly occurs at the critical point, h = 10/, where V'(h) = 0. Since we were asked for q, we must find the relationship between h and the angle q. 
	Note that the circumference of the circle (on the cone) is 2pr and this equals the remaining circumference on the paper circle, namely: 2p(radius) - arc length = 2p(10)-10q = 20p - 10q ... using arc length=(radius)(angle at centre). Hence, 2pr = 20p-10q so q = 2p - r  but r = = = 10 so q = 2p - 2p .
	Finally, we really could have considered V(h) on the closed interval 0 £ h £ 10 (even though the "cone" would have zero volume at the end-points: h = 0 and h = 10). However, we pretended that this was an open-interval problem so we could talk about ....
RELATIVE MAXIMA and MINIMA:
	The previous example illustrates how we might obtain max and min values of f(x) on intervals which are NOT closed: use the derivative to determine where f(x) is increasing or decreasing. Indeed, if f'(x) > 0 just to the left of x = c (meaning that f(x) is increasing in value) and f'(x) < 0 just to the right of x = c (so f(x) is decreasing), then we might suspect that f(c) is larger than nearby values of f(x). That should make f(c) a RELATIVE MAXIMUM. Of course, there's always the possibility that f(x) is discontinuous at x = c and 	 	
the actual value, f(c), is different from the left- and right-hand limits. Then f(x) wouldn't have a derivative at x = c, but that would still make x = c a critical point, so we again look to the critical points for RELATIVE MAXIMA and RELATIVE MINIMA.
	For the function shown at the right (which is the previous function, now graphed over all of (a,b]), f'(c) = 0 so x = c is a critical point (hence a candidate for a relative max or min) so we check the sign of f'(x) just to the left and right of x = c and find that f(x) first increases then decreases. Although this makes f(c) a relative maximum, it's clearly not the absolute maximum on the interval shown, since f(b) is. For the function depicted, there are two relative minima and three relative maxima in the interval. (Can you find them?)	 	
	For the previous function, there is no absolute minimum at x = a because f(x) doesn't have a value there (indicated by the open circle). For a similar reason, there isn't a relative minimum at x = a either. 
	It's time we defined relative extrema:

f(c) is a relative maximum if f(c) ³ f(x) for all x in the domain which are sufficiently near c

	If you're standing on the top of a mountain you're at a relative maximum (of elevation). To be at an absolute maximum, the mountain has to be Mount Everest.
	Now, we consider the following "First Derivative Test" for a relative maximum:
If f'(x) > 0 immediately to the left of x = c and f'(x) < 0 immediately to the right of x = c, then f(c) is a relative maximum??
	Note the ?? Is this test valid? Can we think of a counterexample? (i.e. a function which is increasing just to the left of x = c, decreasing just to the right, yet f(c) is NOT a relative maximum?)
	On the right is the graph of a function, f(x), almost identical to the one portrayed previously, yet f(c) is no longer a relative maximum. Indeed, f(c) is now a relative (and absolute) minimum! Hence, if f(x) increases until x = c then decreases after x = c, it's not enough to guarantee a maximum (of either flavour). We need continuity at x = c. (That is not to say that f(c) cannot be a relative or absolute maximum if f(x) is discontinuous at x = c, it's just that we can't guarantee it!) 	
	
	So we modify our test:
First Derivative Test for a Maximum
	If f(x) is continuous at x = c and f'(x) > 0 immediately to the left of x = c and f'(x) < 0 	immediately to the right of  x = c, then f(c) is a relative maximum.

First Derivative Test for a Minimum
	If f(x) is continuous at x = c and f'(x) < 0 immediately to the left of x = c and f'(x) > 0 	immediately to the right of  x = c, then f(c) is a relative maximum.
	This theorem must be taken with a grain of salt. i.e. it's true, except it doesn't include some important cases. For example, if a relative maximum occurs at x = a (the left end-point of our domain), then it's pretty hard to insist that f'(x) > 0 to the left of x = a. Similarly, for the previous graph, f(b) wouldn't satisfy the requirements of this test even though it certainly is a relative maximum. Clearly, for end-points, we need continuity and the appropriate sign for f'(x) on one side of the end-point. It just makes sense to say: "If f(x) increases to the value f(b) at the right end-point, then f(b) is a relative maximum for f(x) on the interval". 
	Note, too, that if f(c) is a relative maximum, we needn't have 
f'(c) = 0. It may be that f'(c) doesn't exist as is the case for f(x) = 1 - |x-1| at   
x = 1. However, if f(c) is a relative maximum, then either f'(c) = 0 or it doesn't exist. In either case it's a critical point.
	We now have a scheme for identifying relative maxima and absolute maxima. To reiterate:		
	If it's required to find extrema (either relative or absolute) for f(x) on some interval, then we first determine the critical points of f(x) interior to the interval. (We'll consider the end-points separately.) If f(x) is continuous at such an interior critical point then we apply the First Derivative Test to see if it's a relative maximum or minimum. We also evaluate f(x) at each critical point. Then we evaluate f(x) at the end-points. If f(x) is continuous throughout the closed interval [a,b], the absolute maximum and minimum are simply the largest and smallest values of f(x) evaluated at the end-points and the interior critical points.

S:	What if f(x) isn't continuous throughout ... or what if f(x) isn't even continuous at some critical point? Then what? Your theorems seem pretty weak to me.
P:	Actually, these theorems are only for the very lazy who like to turn some crank and have the answers pop out. The best way to determine the absolute and relative extrema is just as we've been doing with our graphs. We just look ... and see. After all, a picture is worth ..
S:	Yeah, I know, a thousand words.
P:	Here's a nice problem where the graph tells all. Take a length of wire, of length, say, 1 metre. Cut it into two pieces. With one piece, form a circle. With the other, form a square. How much of the wire should form the circle and how much the square if you want the maximum total area? Okay, suppose we cut a length x metres for the circle and  the rest, 1-x, for the square. The area of the square is  2 and the area of the circle is pr2 where r is the radius. Since the circumference	     

	 is x, then x = 2pr so r = so the area of the circle is p2. The total area (which we wish to maximize) is: 
	A(x) = p2 + 2 and we now graph  A(x) by determining where it's increasing and decreasing. We have 
A'(x) =  - = which is negative at first (when x is small) then positive (when x is larger than ). 
	
	The graph then looks like this   ====>>>
	The absolute minimum obviously occurs at x = and the absolute maximum occurs at one of the end-points. To see which, we evaluate     A(0) = and 
        A(1) = . The latter is larger, so the maximum area is achieved when x = 1; ALL of the wire is used to form the circle.	     
	
S:	But A(x) is continuous on 0 £ x £ 1 (which, by the way, is a closed interval) so you can find the absolute maximum by evaluating A(x) at the end-points and at the interior critical point, right?
P:	Right.
S:	Then you didn't need to graph A(x) at all ... or determine where it was increasing or decreasing. Just pick the biggest of A(0), A() and A(1). Am I right?
P:	Yes ... and see how much you've learned already? I'll bet if you did this problem last month, you'd set  A'(x) = 0, find that 
x = and conclude that that gave the maximum area ... just because I asked for the maximum. If I had asked for the minimum area, you'd do the same thing. Or maybe you'd apply some kind of test, or ..
S:	Certainly not. And now, can we continue?
P:	Just one last thing. If you had used the second piece of wire for an equilateral triangle, or perhaps some other figure, do you know what the solution would be? I'll tell you. It would STILL be x = 1; ALL of the wire should be used for the circle. Do you know why? I'll tell you. The circle provides the maximum possible area for a given perimeter ... so you shouldn't waste any wire on anything else. In fact, for a given surface area, what solid provides the maximum possible volume? I'll tell you: a sphere. That's why soap bubbles are spherical. In fact, every soap bubble has taken this math course and ...
S:	Please, let's keep going.

Example:	For each of the following, determine where the function is increasing or decreasing, locate critical 		points, determine the location of relative maxima and relative minima and use all of this 		information to sketch the graph of y = f(x). 
	(a)	f(x) = x5 - 5x
	(b)	f(x) = x ex     (note: to help in graphing, use x ex = 0)
Solutions:
	(a)	f'(x) = 5(x4 - 1) £ 0 (i.e. f(x) is decreasing) where x4 £ 1, i.e. where -1 £ x £ 1. Elsewhere, 
f'(x) > 0 (and f(x) is increasing). Critical points occur where f'(x) = 5(x4 - 1) = 0, hence at x = ± 1. Since f'(x) is first positive then negative as x crosses -1, f(-1) is a relative maximum. Similarly, f'(x) is first negative then positive as x crosses +1, so f(1) is a relative minimum. (Also, for x small, f(x) behaves like y = - 5x.)
	(b)	f'(x) = (x+1) ex £ 0 when x £ -1 (so f(x) is decreasing there) and f'(x) > 0 elsewhere (so f(x) is increasing). The only critical point occurs at x = -1 (where f'(x) = 0). Also, f(x) < 0 when x < 0 and f(x) > 0 when  
x > 0, so the graph lies in the first and third quadrants. Finally, since  x ex = 0, y = 0 is a horizontal asymptote. 

S:	How did you know that   x ex = 0?
P:	I write it as  and use the explosive growth of the exponential function (since the exponent approaches +¥) to drag the fraction to zero as x®-¥.
S:	Is that a proof?
P:	No ... but later we'll discuss a method for evaluating such a limit.

	In the "wire problem", we wanted to cut the wire in an "optimum" manner (to maximize the total area). When we chose the variable "x", we did so knowing that when we found x it would determine precisely how to cut the wire. That's important. If we want to maximize a quantity Q, then choose a variable, call it x (or some convenient name), which will determine precisely how to maximize Q ... then express Q in terms of x; for each x there is a Q-value. Then find the x-value which maximizes (or minimizes) Q(x). 
	For example, if the problem were to determine the isosceles triangle of maximum area which can be inscribed in a given circle of radius R, we would NOT pick as variable the base length r. Why not? Because even if we knew the "optimum" value of r it still wouldn't tell us what triangle to use! In fact, there are TWO triangles for each value of r. (See diagram ===>>>). Moral? Pick a variable (such as the height or the angle at the vertex) which DOES provide a unique triangle.	    	

Example:	A man can run 10 times faster than he can swim. He begins in the water at a point P (see diagram), swims to shore, then runs to Q (the cottage). Describe his path so the total time is a minimum.
	Note: distances "a", "b" and "c" are given.	      
        	
Solution:	Since the total time is to be minimized, we let it be called T. Then we pick some variable which describes a (unique!) path from P to Q and express T in terms of this variable. Then, minimize T.
	There are several possible variables to describe a particular path from P to Q: the distance x or the distance y or the angle q or the angle f. (If any of these is known, then the precise path will be known, hence the time T). Let's pick x. Then the total time, T(x), is made up of the time spent in the water + the time on land. We calculate each:	    	
	We use  time-in-water = = where we let u = speed-in-water (since we weren't given this quantity, we simply give it a name and use it!) Note that the distance travelled in the water is calculated from Pythagorus' theorem.
	Also, time-on-land = = where v = speed-on-land. Hence, the total time is: 
T =  + . As is often the case, our function depends upon two variables, x and y, which are related. We must eliminate one of them so T is a function of a single variable. Since we chose to express T in terms of x, we'll eliminate y. There must be a relation between x and y ... and there is. It's x + y = c (which was given). Hence,        y = c - x  so we have, finally,  T(x) =  + and we remind ourselves that a, b,c, u and v are constants which we assume are known. Our problem is to minimize T(x) for x in some interval ... but what interval? It's clear that x lies in 0 £ x £ c (since the swimmer would head for shore, somewhere between P and Q) hence we have the problem of a continuous function T(x) on a closed interval [0,c]. We find the critical points: 
T'(x) = - = 0 and we must now solve this for x. If it should turn out that x lies in (0,c), then it's an interior critical point and we evaluate T(x) there, as well as at x = 0 and x = c (the end-points). The smallest of these three numbers is the minimum time. Note how convenient to have the theorem which says we don't need any derivative test if T(x) is continuous and the interval is closed ... just pick the smallest of these values! Without this we'd have to analyze the terrible expression T'(x) = - to see where it's positive and where it's negative. Or, worse yet, we might be tempted to use the "second derivative test" which requires finding !! It will turn out (of course!) that T'(x) = 0 at one point in the interval 0 < x < c and T'(x) < 0 to the left of this point and T'(x) > 0 to the right, so this point provides the minimum.
	Let's get back to the equation which gives the critical point:  = or
= which, although it looks messy, is actually a very nice way to express the condition for a minimum time because each of   and  is recognized (!after considerable staring at the expressions!) as the sine of one of the angles q and f !!  The condition for a minimum can then be written 
and, for our problem, the ratio of speeds is = so we didn't have to know each speed after all, just their ratio! This magnificent condition for the minimum time is called Snell's law and is known to all beams of light ... because it's precisely how light travels from one medium to another! When light moves from glass to air (where it travels faster) it is refracted at the boundary between the two media (just like the path of our swimmer ... because the speed of light is greater in air than in glass). Having taken this math course, the light beam changes course at the boundary so it takes the minimum time to travel from one point (in glass) to another (in air).
PS:
S:	You haven't finished the problem! So what's the optimum path? So what's x?
P:	Well, I need to solve   = = .
S:	Go ahead. I'll wait.
P:	Okay ... I'll let r = = , the ratio of speeds (so I only have to do this once and when I'm finished you can stick in any ratio you like). Then I square both sides and get an equation to solve for x, namely ... uh, I think it's a quartic equation:  (1-r2) x4 - 2c (1-r2) x3 +(b2+c2(1-r2)-a2) x2 + 2ca2r2 x - a2c2r2 = 0. See? Once you know all the numbers a, b, c and r  ... you just solve this equation for x.
S:	You gotta be kiddin' ... just solve for x? Besides, how do I know you didn't make a mistake. Maybe your quartic equation is wrong.
P:	Well, we can check it ... sort of. If x is measured in metres, then every term must have the same dimensions (else I did make a mistake). Since r is the ratio of speeds, it has no dimensions (i.e. is dimensionless.) Now look at each term. (1-r2)x4 has dimensions m4, and since a, b and c are also in metres, then 2c (1-r2) x3 and (b2+c2(1-r2)-a2) x2 and 2ca2r2 x  and finally a2c2r2 are also in m4. So that checks out. Now let's assume r = 1 (so the speed is the same in water and on land) and b = a. Then we know the solution: the path should be a straight line from P to Q and        x = must be the solution. Our equation becomes: 2ca2x - a2c2 = 0 and x = is indeed the solution! So that checks out. Hence I have great faith in my equation ... I don't think I made a mistake.
S: 	Okay, solve it if a = 1, b = 2, c = 3 and r = .
P:	The equation becomes:  99 x4 - 594 x3 + 1290 x2 + 6x - 9 = 0 and I'll use Newton's method to find x. Aaah, wait, you don't know Newton's method, do you? You'll just have to wait for a lecture or three until we get to that topic.
S:	Sure, sure. But tell me, what's this about checking the dimensions? You've mentioned this before.
P:	It's a neat idea. If somebody gives you a formula for something, you can check that it's dimensionally correct. If not, then the formula is wrong. Suppose somebody says the area of a circle is pr3. Then, for r in metres, this would give cubic metres for the area (because of the r3) so it can't be a correct formula since area is measured in square metres. Suppose somebody says the volume of a torus (that's a donut) is V = pa2b2 where "a" and "b" are
	certain lengths, then it's an incorrect formula because it gives m4, not m3 as it should for a volume. Suppose Einstein had said E = mc3. Then you could check and discover that the dimensions of energy E are not the same as the dimensions of mc3, so Einstein was wrong. In fact you could point out to him that he's better off with E = mc2 because that, at least, is dimensionally correct.  You see? A = pr2 is the area of something and       C = 2pr is the length of something and V = r3 is the volume of something, etc. so you would never say the area of a circle is 2pr because it's not even an area!
S: 	But what if I said the area of a circle is A = 2pr2? It has the correct dimensions, so then what?	 	
P:	Then checking the dimensions wouldn't help. But, sometimes, you can check particular cases too, as we did with our equation above. We knew the answer when r = 1 and a = b. It's the same for, say, the volume of a torus. If I said the volume was V = 2 then it not only has the correct dimensions (metres3 if a and b are in metres) but it also gives V = 0 when a = b (so, for example, V = 3 would definitely be wrong).
S:	Is it the correct formula for a torus?
P:	Yes, I think so, but wait until we get to volumes later on in the course; we'll compute the volume from scratch.
S: 	Newton's method comes later ... and volumes comes later ... and I thought we were almost finished. Okay, let's go!

Example:
 	A page is to have 100 cm.2 of printed text, with 2 cm. borders.  
Find the dimensions of the page of smallest area.
Solution:
 	We must minimize the area of the page, so we give it a name: call it A. Now we pick some variables which will determine the dimensions of the page: say x = width and y = height. Then A = xy must be a minimum. As before, we have two variables, but they're related since the width of the text is (x-4) and its height is (y-4) and its area is given as (x-4) (y-4) = 100. Now we can find y = 4 + and substitute to get A(x) = xy = 4x + and that's 	         	
the function we wish to minimize. Unfortunately, we don't have a closed interval because x can be any length greater than 4 cm. (If x = 4.0001, then we have little width for our text, but y = 4 + is enormous so the page is a mile high!) Okay, we'll find A'(x) and see when it's increasing and when it's decreasing: 
A'(x) = 4 - which is VERY negative when x is slightly greater than 4 (example:  x = 4.0001) and positive when x is very large (since the second term is small). Hence A(x) is first decreasing, until  A'(x) = 4 - = 0, then increasing. The minimum occurs when (x-4)2 = 100 or x - 4 = 10, hence x = 14 cm. (and y = 4 + = 4 + 10 = 14 cm. as well).
	If we wanted to sketch A(x) (although it's not necessary, since we have the answer) we could note that A(x) looks like  when x is near  	

4 (neglecting the first term, 4x), so A(x) has a vertical asymptote ... and A(x) looks like 4x when x is large (neglecting the second term).

LECTURE 9

 RELATED RATE PROBLEMS

	Many times we know the rate of change of some quantity and wish to know the rate of change of a related quantity; that's a "related rates" problem. For example, if the radius of a balloon is increasing at 10 m/second, how rapidly is the volume increasing? We know  and we wish to know . Identifying these rates of change is the first step. The second step is to find the relation between V and r:  V = r3. Then we differentiate both sides with respect to t and get = 4p r2 , hence we can compute for any radius r, since = 10 is known. A typical problem is worded: "If the radius changes at the rate 10 m/s then find the rate of change of volume when the radius is 2 m." See? Both and r are given and we just plug them into  = 4p r2 to get .
Example:
	Sawdust is falling onto a pile at the rate of K metre3/second. If the pile maintains the shape of a right circular cone with its height equal to the diameter of the base, how fast is the height increasing when the pile is H metres high? 

	(Note: your answer will be in terms of numbers K and H.)	
         	
Solution:	We identify what rate of change is requested: where h is the height (in meters). The rate of change which is given is = K m3/s. (V is the volume of the cone.) Next, we find the relation between V and h. 
The volume of the conical pile (when the height is h and the radius is r)
is p r2 h (depending upon two variables). But r = , so the volume is V(h) = h3 metres3 and is changing at the rate: 
= = h2 = K m3/sec. (given). Hence = m/sec. and, when h = H, we have = m/sec. (We can also check that the dimensions of this quantity are:   = m/s which is okay for .)

Example:	
	Water leaks from a conical tank at the rate A  m3/minute. If the tank is H  metres high and R  metres in radius (across the top), how rapidly is the depth of water changing when the tank is half full? (Express your answer in terms of A, H  and R .)
Solution:
	Again we note that = A  m3/min is given and is required and the relation is again V = p r2h. But the relation between r and h is obtained 	
         	
by similar triangles: = so r = h hence V = p h3 (which has the dimensions m3 ... which is comforting). Now = p h2 = A m3/min. (given) so we need to find h when the container is half full, 
substitute into p h2 = A  and solve for . We'll interpret "half-full" to mean half the volume of the full container. But when h = H, the volume is pR2H so we want to know h when V = p h3 = pR2H. Solving we find that h3 = 		
so  h = Using this h we get = m/min. 
(and  is in metres/minute ... which is a nice check).
PS:
S:	But isn't h supposed to be decreasing? I mean, why doesn't the math give < 0?
P:	Good point ... and my fault. I should have put  = -A  m3/min because the volume is decreasing. Of course, I can just assume that A is negative, then  < 0.
S:	Hmmm. Do I have to know the volume of a cone is pr2h?
P:	You can look it up, if you have time (like on an assignment). On an exam, I might give you the formula.
S:	Whew!
P:	But, later on in this course, we'll actually derive this formula.
S:	I can hardly wait.

Example:	A rod of length 25 cm. rotates at 1000 r.p.m. (revolutions per minute). Attached to the arm is a second rod of length 100 cm. with one end, P, constrained to slide horizontally along the x-axis. How rapidly is P moving at any given time?	               	
Solution:	We're given the rate of change = 1000 (2p) radians per minute (since each revolution is 2p radians). We're asked to find the rate of change: . The relation between q and x is given by the "cosine law" for triangles:  1002 = 252 + x2 - 2 (x)(25) cos q = 252 + x2 - 50 x cos q. Now differentiate with respect to t to get:
0 = 2x - 50 (- x sin q + cos q). Since is given, we can compute for any given position (meaning any x and q which satisfies 1002 = 252 + x2 - 50 x cos q) from . For example, when     
q = 0 or p we have = 0. Similarly when q = we have = - 25 cm/sec. ... and so on for any x and q.

PS:
S:	Can you check your formula with that dimensional stuff?
P:	Not easily, because there are numbers in there which have dimensions. It would have been better to assume the rod lengths to be "a" and "b" (rather than 25 and 100 ) and then we'd get:  which is dimensionally correct since it's:  (metres) which is metres/second.
S:	Whoa! I make it (metres)(radians) per second.
P:	Well, radians don't really have dimensions. You just have to think of any valid formula involving an angle in radians, like 
a = r q (the length of arc of a circle of radius r subtending an angle q at the centre) then you'd see that q = which is dimensionless ... so we don't count it. Just count length and mass and time or anything constructed with these dimensions, like force or energy or whatever.
S: 	I think I'll forget about this dimensional stuff.
P:	You may be interested to know that the problem we just solved has to do with a piston in a car engine. The crankshaft rotates at  and P slides up and down the cylinder and ...
S:	Not interested.

Example:	A 10 m ladder leans against a vertical wall. The bottom of the ladder is pulled away from the wall at 3 m/s. How quickly is the top of the ladder sliding down the wall when the bottom is 6 m from the base of the wall?
Solution:	Here we know = 3 m/s and we wish to determine . Pythagorus gives the relation between x and y, namely:  x2 + y2 = 102. Differentiating this relation with respect to t gives 2 x + 2 y = 0. Now substitute the known quantities and solve for . The known quantities are    x = 6, = 3 and y = = 8 so = - = - m/s. (It's negative indicating that y is decreasing.)		

Remember:  For related rate problems, one variable, say x, has a known rate of change. Another variable, say y, is related to x  via some equation y = f(x). Then  = = f'(x) gives the rate of change of y for any given x and . Sometimes the relation between x and y is in the form F(x,y) = C where C is some constant. (That is, y is given implicitly in terms of x, such as x2 + y2 = 102 in the previous example). Then differentiate implicitly to find which will (usually) be in terms of x, y and . To find , enough information must be given to compute x, y and ... hence .

Example:	A car moves south-west along a highway described by the curve y = x2  (where the x-axis points east-west and the y-axis north-south). Its headlights illuminate a fence which lies along the x-axis. Investigate the speed with which the beam of light moves along the fence.
Solution:	We need a reasonable diagram (we always need a reasonable diagram!) The headlight beam is tangent to the curve y = x2 and will strike the fence (i.e. will intersect the x-axis) at the x-intercept of the tangent line. So we'll pick some point of the curve (and we'll know it's on the curve if y = x2), then we'll find the equation of the tangent line at this point, then we'll find the x-intercept, then we'll find of this x-intercept. That's our method of attack.
	Let the point on the curve be (x1,y1) where y1 = x12 ... and it's this 	   	
relation which puts the point on the curve. (Remember, we have to tell the mathematics, somehow, that the point is on the curve and this is how we do it.)  Then the tangent line equation is  = slope of tangent line = 2x1 (since = 2x  if  y = x2). The tangent line intersects the x-axis when y = 0 so we solve for x = x1 - . Plug in y1 = x12 and get the x-intercept as x = (which, in itself, is pretty surprising since it says the x-intercept is always half the x-coordinate of the point of tangency ... but maybe that's only for this parabolic curve ... so we make a mental note: someday, we'll see if it's true for parabolas y = ax2 and for y = ax2+bx+c etc. ... but right now we're busy with our headlights.)  Anyway, if we take of the relation x = we get = so the speed with which the light travels along the fence is always half the speed with which the car moves west. There's nothing more we can do with this problem.
PS:
S:	Wait a minute. Nothing more? Suppose the car is moving at 100 km/hour? Then how fast is the light moving?
P:	That's a nice problem. Unfortunately, we have to wait until we get to "parametric equations" before we can tackle it. Remind me when we get there and we'll come back to this problem. Wait, I'm not sure we even cover parametric equations ... which would really be a shame.
S: 	Yeah ... a shame.

Example:		

A lighthouse is located on an island 2 km from a straight  shoreline. The light rotates at 3 revolutions per minute. How fast is the spot of light (at P) moving along the shoreline when  P is  4 km  from the lighthouse?

Solution:

x = 2 tan q    hence     = 2 sec2q 
and  = 3 x 2p = 6p radians/minute.
When P is 4 km from the lighthouse, sec q = = 2
Hence  = 2 (22) 6p = km/min.

    	

LECTURE 10

the LINEAR (TANGENT LINE) and OTHER POLYNOMIAL APPROXIMATIONS

The TANGENT LINE APPROXIMATION

	Recall that the derivative, f'(a), gives the slope of the tangent line to the curve y = f(x) at the place x = a. Further, at x = a, y = f(a) so we have a point (a,f(a)) and a slope f'(a) so we can calculate the equation of the tangent line:  = f'(a)  or (to put it into a better form)
 
as if you didn't know! Is this useful? When would we really want the equation of a tangent line? In fact, the tangent line and the curve itself are very nearly the same curve so long as we don't stray too far from the point of tangency ... and this is the basis for using the tangent line to approximate f(x) for x-values near x = a.
Note:	To use  y = f(a) + f'(a) (x - a)  to approximate f(x), we clearly need to compute f(a) and f'(a)! Hence, we need to choose an "a" where these can be computed with relative ease.

Example:	Compute an approximate value for .
Solution:	Consider y = . Then, for x = 49, y = 7. Since 47 isn't too far from 49 we find the tangent line to f(x) = at x = 49 and use it to compute f(47) ... approximately. The tangent line is y = f(49) + f'(49) (x - 49) and since f'(x) = then f'(49) = = and our tangent line is y = 7 + . For x-values near x = 49 we conclude that » 7 + ... that is, and  7 + have approximately the same value. In particular, » 7 + = 7 - = 6.8571

	Above is a reasonably accurate (computer) plot of y = and its tangent line at x = 49. A few things seem clear: (1) the tangent line is indeed a good approximation near x = 49, and  (2) it gets worse as we move away from the point of tangency, and  (3) the tangent line will give an approximation to which is too large (since the tangent line lies above the curve). In fact, = 6.8557 (to 4 decimal places). Also,  (4) using the tangent line approximation (sometimes called the linear approximation because y = f(x) is approximated by a linear equation) means we move not along the curve y = f(x) but along the tangent line.

S:	That looks awfully familiar! I mean, » 7 - .
P:	It should. We got that before, using the differential. In fact, y = f(a) + f'(a) (x - a) says that y changes by Dy = y - f(a) when x changes by Dx = x - a and if we move along the tangent line , the tangent line equation says that Dy = f'(a) Dx and that's the differential! It's just a change in notation, that's all. When we used the differential we were saying that     y = f(x) changes at the rate f'(a) when x = a so a small change in x, namely Dx, would give a change in y of about f'(a) Dx which isn't exact because f'(x) isn't constant, but it's good enough for small changes in x. If the velocity is 12 metres/hour then, even if the velocity changes we'd expect to go about (12) (.1) = 1.2 metres in the next .1 hours.  Nice, eh, how everything hangs together?

Example:	Show that  1 + is an approximation to when x is near "1". 
Solution:	The tangent line approximation has the form f(a) + f'(a) (x-a) so we take f(x) = and  a = 1 and get f'(x) = so that f(1) = 1 and f'(1) = . Then f(a) + f'(a) (x-a) gives 1 + . (For example, » 1 + = 1.04 whereas the exact root is = 1.03923  to five decimal places.)

Example:	Use the tangent line approximation to compute sin 47°, approximately.
Solution:	Fortunately, 47° is close to 45° and we can compute f(x) = sin x  and f'(x) = cos x  at x = 45°. The tangent line to y = sin x  is  y = f(45°) + f'(45°) ( x - ) = + .  Hence, for x near , 
sin x » + . Now we'd like to put x = 47° but we need to convert to radians. It's easier, however, to recognize that x - is just 2 degrees (i.e. 47° - 45°) which, in radians, is 2 = . Hence our approximate value for sin 47° is + = .7318  (while the exact value, to 4 decimal places, is  .7314). Since the tangent lies above the sine curve (at x = p/4), it's not surprising that the approximation is too large. Below is a computer plot of the situation.

PS:
S:	Two things: first, you used degrees instead of radians and you told me that ...
P:	Hold on. I used radians where it mattered ... in the expression ) where using degrees would be disastrous. But when I plug in the values of sin for example, I can plug in the values of sin 45°, right? They are the same numbers, right?
S:	Okay, okay, but you also said the tangent line lies above the sine curve ... so the approximation will be too large. That's easy for you to say, but how am I supposed to know what lies above what? Am I supposed to plot the sine curve? Then I'd need a calculator and if I had a calculator why would I be interested in an approximate value for sin 47°? I'd just punch it up on the calculator and ...
P:	Let me ask you a question ... just to see if you've been paying attention. What is it about a curve, y = f(x), that makes it lie below its tangent line? Think about it.
S:	I haven't the foggiest idea. Wait ... uh, the curve curves down. I mean, if y = f(x) is concave down then it'll be below its tangent line. Right?
P:	Right on! And if it's concave up, it's above its tangent line. Now, the big question: how can you tell if a curve is concave up or down?
S:	I give up.
P:	The second derivative! If f''(x) > 0 then y = f(x) is concave up and lies above its tangent line ... and the linear (tangent line) approximation will be too small. If f''(x) < 0  then y = f(x) is concave down and lies below its tangent line ... and the linear approximation will be too large. For f(x) = sin x,  f''(x) = - sin x which is negative near so it's concave down and our approximation will be too large. In the previous example we had f(x) = = x1/2, so  f'(x) = x-1/2 and  f''(i) = - x-3/2 which is also negative near x = 49 (or near any positive x for that matter) so the tangent line will always give an approximation which is too large.
S:	I still don't understand why we'd want to use a tangent line approximation. Everybody owns a calculator. Why not use it and get the exact value?
P:	Here's a nice use of the tangent line approximation:

Example:	A certain amount of money is left in the bank to accumulate interest (compounded at i% per year). If you want to double your money in n years, what should the interest rate be?
Solution:	If the amount of money is $A, then after n years it will have grown to $A (1 + )n. In order to double, we need   (1 + )n = 2, or, taking ln of each side, we need  nln ( 1 + ) = ln 2  hence 
ln ( 1 + ) = . Now ln is a fancy function so it's not easy to solve this equation for i, but since is small we can approximate f(i) = ln ( 1 + ) near i = 0 by its tangent line: f(i) » f(0) + f'(0) i = ln 1 + i  (since f'(i) = = when i = 0). Also, ln 1 = 0 so we have » . Further ln 2 » .69 (roughly) so we get  i » . For example, to double in 10 years you'd have to get = 6.9% interest, approximately.
PS:
S:	How accurate is that answer?  I mean 6.9% ... how accurate is it?
P:	The correct answer is 7.2 % (to one decimal place) ... and it's for that reason that people in the financial world use the "Rule of 72" : .
S:	Well, we could have guessed that our approximation would be low because we're using the tangent line for  ln ( 1 + ) and the ln curve is concave down as I recall ...  I could differentiate ln ( 1 + ) twice to check, but I won't ... so the tangent line is above the curve ... so ... hey! Why isn't the approximation too large. The tangent line is above the curve! 
P: 	This problem is different from the others. Previously we were given x and trying to evaluate y = f(x). (i.e we were given x = 47 and trying to compute  ... or sin 47°). In this problem we were given y = f(x) = ln ( 1 + )         ... namely ...  and we were trying to find x! That's different! See?
S:	No.
P:	Let's sketch y = ln ( 1 + ) near x = 0 ... and its tangent line at 
       x = 0. Now, given a y-value of  , what's the x-value? The x-value on the tangent line is smaller than the x-value on the curve ... and that's because the tangent line is above the curve. See? The picture is worth ...
S:	That's confusing.
P:	Then don't think about it.	 
 	
S:	Just one more thing. You call the tangent line approximation a "linear" approximation. Are there other approximations which aren't "linear"?
P:	I'm glad you asked that question ...

POLYNOMIAL APPROXIMATIONS

	The thing about the approximation y = f(a) + f'(a) (x - a) is that it has the same value as f(x) and the same derivative as f(x), at x = a. In fact, if we wanted a linear approximation, meaning a straight line approximation, 
y = A + Bx and we wanted y to have the value f(a) when x = a we'd need A + Ba = f(a). Also, if we wanted y to have the same derivative at x = a then we'd want = B = f'(a). This gives us two equations to solve for A and B, namely and  . The solution is A = f(a) - a f'(a)  and  B = f'(a)  and the linear approximation becomes y = f(a) - a f'(a) + f'(a) x  or  y = f(a) + f'(a) (x - a)  which is (no surprise!) the tangent line. However, when we derive it that way it's natural to ask what quadratic approximation is "best" in the sense that it matches f(x) in value and first derivative and second derivative. So we consider y = A + Bx + Cx2 and find the constants A, B and C by requiring that, at x = a, ,  and . After solving these 3 equations in 3 unknowns and substituting we get the quadratic approximation:  

	Actually, the procedure is easier if we started off by assuming a quadratic approximation in the form:  
y = a0 + a1 (x - a) + a2 (x - a)2  (which is still a quadratic ... because the highest power of x is x2 ... but in a form which simplifies the calculations). Then, at x = a, we have and and and equating these to f(a), f'(a) and f''(a) respectively gives, immediately, a0 = f(a), a1 = f'(a) and a2 = f''(a), hence the required quadratic approximation, as above.
	Note that the quadratic approximation is, in some sense, the "best" parabolic approximation to the curve whereas the tangent line is the "best" straight line approximation ... at least at x = a. We could also determine the "best" cubic approximation or quartic approximation, etc. etc. In fact, since a cubic y = A + Bx + Cx2 + Dx3 ... or, better, y = a0 + a1 (x - a) + a2 (x - a)2 + a3 (x - a)3 ... has precisely 4 constants, we can insist upon 4 conditions (yielding 4 equations to solve for the 4 unknown constants). The 4 conditions are that, at x = a (meaning any specified value of x), the values of y, , and  must agree with f(a), f'(a), f''(a)  and f'''(a). We'd get the same values for a0, a1 and a2 as we did for the quadratic approximation ... and a3 would be f'''(a).
	As with the linear approximation, we usually pick "a" at a place where  f(a), f'(a), f''(a)  and f'''(a) aren't difficult to compute. 

Example:	Determine a quadratic approximation to at x = 49.
Solution:	Note that a = 49 is someplace where we can easily evaluate f(x) = x1/2, f'(x) = x-1/2 and 
f''(x) = - x-3/2. We get f(49) = , f'(49) = - , f''(49) = so our quadratic approximation (at x = 49) becomes y = 7 + - 2 = 7 + - 2 . To see how good it is, we compute an approximation to as 7 + - 2 = 6.85561 (to 5 decimal places). The exact value (also to 5 decimal places) is = 6.85566 and the linear, tangent line approximation gives 6.85714 (to 5 decimal places).  This is illustrated in the graph below:

S:	The tangent line approximation is just the first two terms of the quadratic approximation. Is that always the case? I mean, to get the quadratic approximation we just added another term. To get the cubic approximation, do we add yet another term?
P:	Sure, and remember the format of these polynomial approximations:

POLYNOMIAL APPROXIMATIONS

	linear:		y = f(a) + f'(a) (x - a)
	quadratic:		y = f(a) + f'(a) (x - a) + f''(a) (x-a)2 
	cubic:		y = f(a) + f'(a) (x - a) + f''(a) (x-a)2 + f'''(a) (x-a)3 
S:	Hold on. I see how it goes ... the fourth degree approximation would get another term ... uh, something with 
	f ''''(a) (x-a)4 ... but what's the number out front? There's then comes  ... then what?
P:	Write y = a0 + a1 (x - a) + a2 (x - a)2 + a3 (x - a)3 + a4 (x - a)4. Then differentiate four times and put x = a and notice that everything differentiates to zero except the term a4 (x - a)4 which becomes (4)(3)(2)(1) a4 so  = 4! a4  and this must equal  f ''''(a) hence a4 = f ''''(a). The number out front, as you put it, is = . Now it's easy to see what's the polynomial approximation of degree 5 or 6 or whatever.

Example:	Determine an approximate value for sin 47° using a quadratic approximation.
Solution:	We consider f(x) = sin x and determine the quadratic approximation at x = 45° (since we know all about the sine function and its derivatives at this x = a). We have f(x) = sin x = and f '(x) = cos x = and    
f ''(x) = - sin x = - . Our quadratic approximation is then
y = f(a) + f'(a) (x - a) + f''(a) (x-a)2 with a = and this gives:  y =  +  -  2 (where we were careful to substitute a = 45° in radians in (x - a) and (x -a)2 etc.) Now, to get an approximation to sin 47° we need to express x - in radians; that is, 2° in radians which is 2 = so finally we get:
sin 47° »   +  -  2 = .731359 (to 6 decimal places). To 6 dec. places, the exact value is .731354 and the linear approximation,  +  , is .731789 (so we can appreciate the improvement in going to the quadratic approximation, and, as you'd expect, the cubic approximation is even better).

PS:
P:	Did you notice anything interesting about the formulas for the linear and quadratic approximations?
S:	Nope.
P:	Let me write them out again:   y = f(a) + f'(a) (x - a)  versus y = f(a) + f'(a) (x - a) + f''(a) (x - a)2. Remember? If the curve y = f(x) lies below its tangent line, at x = a, then the linear approximation is too large ... and we can predict that by looking at the sign of the second derivative, f''(a). Now do you see?
S:	Uh ... not really.
P:	When f''(a) < 0 then y = f(x) is concave down and the curve lies below its tangent line so the linear approximation is too large ... so we should really subtract something from the linear approximation ... and the quadratic approximation does just that! It adds f''(a) (x-a)2 to the linear approximation which, if f''(a) < 0, really means it's subtracting something. Neat, eh?
S:	Aaah ... mathematics is wonderful. Let's do some more ... something really useful ... if there is anything useful about this stuff ... my calculator can do all this ... I don't know why we're studying this ...

Example:	Solve the equation  ln (1 + ) = for i, using a quadratic approximation for the logarithm.
Solution:	We have f(i) =ln (1 + )  so  f'(i) = = and f''(i) = - and, evaluating at i = 0 (we choose this value since it's easy to compute f(0), f'(0), etc.) we have f(0) = ln 1 = 0, f'(0) = and f''(0) = - hence our quadratic approximation is y = f(0) + f'(0) (i - 0) + f''(0) (i - 0)2 =  i + i2 = - 2. Then we solve - 2 =  which is a quadratic equation to solve for i. (This is no surprise since we're using a quadratic approximation for f(x)!) To solve, it's easier to let 
x = then solve for x. We rearrange the equation, rewriting it in the form:  x2 - 2 x + = 0 and use the magic formula for the roots of a quadratic:  to get x = 1 ± = 1.9281  or  .0719 and we pick the smaller root and conclude that » .0719  so i = 7.19%  (which gives the "Rule of 72").

		If we look at the graph of y = ln (1 + x) and the quadratic (i.e. parabolic) approximation, we see that it's excellent near x = 0 and becomes worse as we move away from the point of approximation. Further, the quadratic approximation is too small for x > 0 and too large for x < 0 (although it's hard to tell from the diagram). 
	Also, the curve y = ln (1 + x) has a vertical asymptote at x = -1 (since ln (1 + x) ® -¥) and we wouldn't expect the parabola y = x - to be any good as an approximation anywhere near x = -1. Even a cubic or quartic approximation won't have a vertical asymptote at x = -1 hence can't provide good approximations there.

PS:
S:	Why did you discard the root 1.9281? 
P:	Instead of solving  ln (1 + x) =  which has	
exactly one solution for x (hence for i) ... because it's an increasing function ... we solved  x - = and this equation has two solutions (as most quadratic equations do!). In fact, looking at the graph above we see that, although y = ln  (1 + x) has the value  only once, y =  x - has this value twice ... since the parabola goes up then comes back down. It's the first one that we want ... the one nearest to the point of approximation ... the one nearest x = 0. One thing I should mention: although the graphs were plotted on a computer and show the beautiful quadratic approximation, the horizontal dotted line is NOT y = » .069  (since I wanted to illustrate the two intersections with the quadratic, and it was clearer with a line something like y = .4). Anyway, as you can plainly see, the picture is worth ... well ... you know. 

	   

Problem: 	Verify each of the polynomial approximations illustrated above.

Note:	For the first, f(x) = ln x, the polynomial is constructed about x = 1. Why can't we find a polynomial (of the type we've been constructing) about x = 0?

PS:
S:	You've been calling these the "best" quadratic and the "best" cubic approximations, etc. Aren't they the "best"? And if so, why do you put "best" in quotes. It's as though you're not convinced ... or not sure, or something.
P:	Okay, let's consider something simple, say, the "best" linear approximation to f(x) = x3 where we'll take the approximation about x = 0. Then f(0) = 0 and f'(0) = 0 as well and our "best" linear approximation is 
	y = f(0) + f'(0) x = 0  (using f(a) + f'(a) (x - a) with a = 0). Hence our "best" straight-line approximation is the x-axis itself! If we look at the graph, it's easy to see that when we require our "best" line to match the value f(0) and the derivative f'(0), it gives a pretty poor approximation. In fact, y = x looks quite a bit better (as a straight-line, "linear" approximation). On the interval -1 £ x £ 1, for example, our "best" (tangent line) approximation, y = 0, has a maximum error of "1" whereas the maximum error using the approximation y = x is only ... uh, let's see ... the error is the difference between y = x and y = x3 and  that's | x - x3| and, on 0£x£1 we can delete the absolute value sign because x - x3 ³ 0, so this error has a maximum value, on 0 £ x £ 1 either at a critical point in 0 < x < 1, or at the end-points      x = 0 or x = 1. The critical points are where = 1 - 3x2 = 0, meaning x = so the maximum is  - » .38  which is better than "1". See?
S:	See what?
P:	The so-called "best" linear approximation for f(x) = x3 (using the method we've been describing ... that is, matching the value and derivatives of f(x) at x = 0, and so on) doesn't do as well as  y = x. In fact, there are even better approximations than y = x . Of course, it all depends upon what one means by "better", doesn't it?
S:	If you say so.
P:	You might consider the  line y = mx  and try to vary the slope "m" and see which gives the smallest maximum error. It's another meaning for the word "best" ... and it's fun.
S:	If you say so.		

LECTURE 11

NEWTON'S METHOD for finding roots of f(x) = 0

	In earlier lectures we've run into a variety of problems which require finding roots of equations of the form:  f(x) = 0. For example, we've considered 99 x4 - 594 x3 + 1290 x2 + 6x - 9 = 0,  and which is a root of the equation  x2 - 47 = 0, and ln (1 + x) = which can also be written in the form f(x) = 0 with 
f(x) = ln (1 + x) - . Now we use the linear tangent line approximation in a special way, called Newton's Method, to find such roots to as many decimal places as we wish.	
	First note that the curve y = f(x) crosses the x-axis at an x-value which satisfies f(x) = 0, so finding a root is the same as finding an x-intercept for such a curve. Suppose we sketch, or plot, y = f(x) and find that it changes sign between, say x = a and x = b. That is, f(a) has a different sign than f(b); for example, in the diagram, f(a) < 0 and f(b) > 0. Then there is a root lying in a < x < b. Now we pick any number x1 in a £ x £ b (it could be either "a" or "b", or a number in between as shown in the diagram) and construct the tangent line to y = f(x) at x = x1. This tangent line will intersect the x-axis at some x-value, say x2, and this will be closer to the root 	     	
of f(x) = 0 than was x1. In other words, if x1 is an approximation to the root, then x2 is a better approximation. 
	So what's x2?
	The tangent line at x = x1 is:  y = f(x1) + f'(x1) (x - x1) and this crosses the x-axis at x = x2 where 
y = 0 = f(x1) + f'(x1) (x2 - x1) and, solving, we get:  . If x2 is better than x1 (as an approximation), then we can repeat the procedure, finding the tangent line at x = x2 and determining x3, where it crosses the x-axis. There's no need to repeat the calculation; it's similar to that found above:  . We can now repeatedly use the same prescription, generating a sequence of number x2, x3, x4, ..., xn, ... which get closer and closer to the root of f(x) = 0 ... or, to use a more apt notation:  xn  = c
		From the diagram at the left you can watch the sequence of approximations marching toward the root of f(x) = 0, at x = c. Just remember that x1 is some initial approximation which we generate by guessing or by plotting or by divine insight. The rest of the approximations come from Newton's formula:

Example:	Compute , using Newton's Method.
Solution:	We invent the function f(x) = x2 - 47  so that the positive root of f(x) = 0 will give us . Note that we don't invent the function f(x) = x - since we can't evaluate f(x) if we don't know !! (We want to "evaluate" f(x) and f'(x) using only addition, subtraction, multiplication and division; think of doing all this on a $3.95 calculator which doesn't  have a square root button.) Then, to compute the Newton iterates (that's what the x1, x2, etc. are called) we guess at a root, say x1 = 7 (which seems a reasonable guess) and plug this x-value into  x - = x - = where we've simplified the expression somewhat.  Then
	x2 = = = 6.857142858 and now we plug this x2 into the same expression giving  
	x3 = = = 6.855654762 and we now we plug this x3 into the same expression giving  
	x4 = = = 6.855654601  and we now we plug this x4 into the same expression giving  
	x5 = = = 6.855654601 and if we continue we'll get	x6 = 6.855654601 as well. We're finished. To 9 decimal places, that's .
	Of course, if we carried more decimal places we could go and on, getting better and better approximations ... and many more decimal places ... and the error would approach zero. In fact, it's very instructive to actually watch the error go to zero. To do this we'll begin again with x1 = 7 but now we'll carry 75 digits.
	The numbers which follow were computed using : a computer algebra system from U. of Waterloo. (My $4.95 calculator can't do 75 digits). When we have need of lots of digits, we'll let  do it.
	In what follows, we first ask for 75 digits (Digits:=75;) then ask  to evalf (meaning evaluate as a floating point, or decimal, number) the exact square root (and we'll call it "root"), then we'll define 
y = (x + 1/x)/2 and we'll "iterate", computing x1, x2, etc. and each time we'll compute an error = x2 - root, etc.
_______________________________________________________________________________ 
• Digits:=75;
                                         Digits := 75
_______________________________________________________________________________ 
• root:=evalf(sqrt(47));
     root := 6.85565460040104412493587144908484896046064346100132627548510818567851711514
_______________________________________________________________________________ 
• y:=.5*(x+47/x);
                                     y := .5 x + 23.5 1/x
_______________________________________________________________________________ 
• x2:=subs(x=7,y);
      x2 := 6.85714285714285714285714285714285714285714285714285714285714285714285714286
_______________________________________________________________________________ 
• error:=x2-root;
     error := .00148825674181301792127140805800818239649939614153086737203467146434002772
_______________________________________________________________________________ 
• x3:=subs(x=x2,y);
      x3 := 6.85565476190476190476190476190476190476190476190476190476190476190476190476
_______________________________________________________________________________ 
• error:=x3-root;
                                                                                      -6
     error := .16150371777982603331281991294430126130090343562927679657622624478962*10  
_______________________________________________________________________________ 
• x4:=subs(x=x3,y);
      x4 := 6.85565460040104602726699535902922054430628339896844346594726451466195334222
_______________________________________________________________________________ 
• error:=x4-root;
                                                                                  -14
         error := .190233112390994437158384563993796711719046215632898343622708*10   
_______________________________________________________________________________ 
• x5:=subs(x=x4,y);
      x5 := 6.85565460040104412493587144908511289322242413572750032746808991073007441445
_______________________________________________________________________________ 
• error:=x5-root;
                                                                          -30
                 error := .26393276178067472617405198298172505155729931*10   
_______________________________________________________________________________ 
• x6:=subs(x=x5,y);
      x6 := 6.85565460040104412493587144908484896046064346100132627548510819075903143518
_______________________________________________________________________________ 
• error:=x6-root;
                                                          -62
                                 error := .508051432004*10   
_______________________________________________________________________________ 
• x7:=subs(x=x6,y);
      x7 := 6.85565460040104412493587144908484896046064346100132627548510818567851711514
_______________________________________________________________________________ 
• error:=x7-root;
                                          error := 0
_______________________________________________________________________________ 
	Did you see? The error goes to zero! (Well ... at least "zero", to 75 digits). Remarkable! The errors are something like 10-3, 10-7, 10-15, 10-31, 10-62 then something less than 10-75 (in fact, probably about 10-120). In fact, it's this remarkable rapidity with which Newton's Method gives roots that endears it to many. Once an iterate finds itself near a root, the remaining iterates march to the root with unerring accuracy. Each successive error is roughly the square of the preceding error!

Example:	Compute a root of   99 x4 - 594 x3 + 1290 x2 + 6x - 9 = 0  (to 5 decimal places).
Solution:
	This problem arose (earlier) in connection with finding the path, from P to Q, which takes the minimum time. Point Q is on land and P is in water and swimming speed is 1/10 of running speed.
	For f(x) = 99 x4 - 594 x3 + 1290 x2 + 6x - 9  we have the iteration scheme based upon: 
x - = x - . Come to think of it, maybe I'll let  do it. We'll define y = f(x), ask  	  	
 to compute y', construct the iteration equation x - y/y', substitute various values of x into y ... until we find two values where y changes sign, then we'll pick one of these two x-values as x1 ... and iterate, until the iterates are identical to, say, 6 digits. Note:  in the following excerpt from a session with , the curious command "evalf" means evaluate as a floating point (i.e. decimal) number.
_________________________________________________________________________________
• Digits:=6;
                                            Digits := 6
_______________________________________________________________________________ 
• y:=99*x^4 - 594*x^3 + 1290*x^2 + 6*x - 9;
                                       4        3         2          
                              y := 99 x  - 594 x  + 1290 x  + 6 x - 9
_______________________________________________________________________________ 
• Dy:=diff(y,x);
                                           3         2             
                                Dy := 396 x  - 1782 x  + 2580 x + 6
_______________________________________________________________________________ 
• iterate:=x - y/Dy;
                                            4        3         2           
                                        99 x  - 594 x  + 1290 x  + 6 x - 9 
                        iterate := x - ------------------------------------
                                                3         2                
                                           396 x  - 1782 x  + 2580 x + 6   
_______________________________________________________________________________ 
• subs(x=0,y);
                                                 -9
_______________________________________________________________________________ 
• subs(x=1,y);
                                                792
_______________________________________________________________________________ 
• x1:=0;
                                              x1 := 0
_______________________________________________________________________________ 
• x2:=evalf(subs(x=x1,iterate));
                                           x2 := 1.50000
_______________________________________________________________________________ 
• x3:=evalf(subs(x=x2,iterate));
                                           x3 := .33712
_______________________________________________________________________________ 
• x4:=evalf(subs(x=x3,iterate));
                                           x4 := .165492
_______________________________________________________________________________ 
• x5:=evalf(subs(x=x4,iterate));
                                           x5 := .101483
_______________________________________________________________________________ 
• x6:=evalf(subs(x=x5,iterate));
                                           x6 := .0843389
_______________________________________________________________________________ 
• x7:=evalf(subs(x=x6,iterate));
                                           x7 := .0827736
_______________________________________________________________________________ 
• x8:=evalf(subs(x=x7,iterate));
                                           x8 := .0827600
_______________________________________________________________________________ 
• x9:=evalf(subs(x=x8,iterate));
                                           x9 := .0827601
_______________________________________________________________________________ 
• x10:=evalf(subs(x=x9,iterate));
                                          x10 := .0827601
_______________________________________________________________________________ 
	We conclude that a root of f(x) = 99 x4 - 594 x3 + 1290 x2 + 6x - 9 = 0 (to 5 decimal places) is .08276 ...

PS:
S:	Wait! How come it took so long ... and you only asked for 6 digits?
P:	Remember, we're approximating y = f(x) by its tangent line and actually finding where this tangent line intersects the x-axis. Maybe the tangent line isn't a good approximation to y = f(x), for this particular f(x).
S:	How could we check that?
P:	Well, if the slope of f(x) doesn't change too rapidly near x = .0827601, then we'd expect the tangent line to be pretty good. After all, the tangent line has a constant slope but y = f(x) doesn't. When we wanted to compute y = x2 - 47 near x = , the Newton iterates quickly got us to a root. For y = x2 - 47 , = 2x and = 2 which isn't so large so isn't changing too rapidly. Let's check y = 99 x4 - 594 x3 + 1290 x2 + 6x - 9 near the root we just found.  gives:

_______________________________________________________________________________ 
• y:=99*x^4 - 594*x^3 + 1290*x^2 + 6*x - 9;
                                       4        3         2          
                              y := 99 x  - 594 x  + 1290 x  + 6 x - 9
_______________________________________________________________________________ 
• Dy:=diff(y,x);
                                           3         2             
                                Dy := 396 x  - 1782 x  + 2580 x + 6
_______________________________________________________________________________ 
• D2y:=diff(Dy,x);
                                                2                
                                   D2y := 1188 x  - 3564 x + 2580
_______________________________________________________________________________ 
• evalf(subs(x=.0827601,D2y));
                                            2293.179894
_______________________________________________________________________________ 
	so the second derivative is quite large (and the curve bends rapidly away from its tangent line ... so the tangent line isn't a very good approximation near x = .0827601).
S:	Are there any other roots of f(x) = 99 x4 - 594 x3 + 1290 x2 + 6x - 9 = 0?
P:	I don't know. Shall we plot it and see? We can just evaluate f(x) for a whole bunch of x-values and see if it changes sign anywhere, then we can use Newton's method again, starting with an  initial guess, x1, nearby and ..
S:	Let's forget it ... except ... I almost hate to ask, but will I ever really have to find the root of 47 or where to swim to get to the cottage or ...
P:	Okay, that's a fair question: "When would anyone ever need Newton's Method, outside of a calculus course?"

Example:	You invest $10,000 in a mutual fund, then, 5 months later you put an additional $15,000 into the fund, then, 3 months later put in an additional $5,000. At the end of a year, your investments (totalling $30,000) have grown to $31,470. What is the annual rate of return from this mutual fund?
Solution:	Let the monthly rate of return be i . For example, if i =.01 it means a 1% return on your investment per month so each dollar will grow to (1.01)n after n months. The first $10K invested has been in the fund for 12 months, so will grow to 10(1+i)12 (measured in kilobucks). The next $15K grows to 15(1+i)7, having been in the fund for 7 months. The last $5 will grow to 5(1+i)4, having been in the fund for 4 months. The total value of your investments, after 12 months, is 10(1+i)12 + 15(1+i)7 + 5(1+i)4 = 31.47 kilobucks. We must solve this equation for i.
	We let 1+i = x and rewrite the equation in the standard format: and use the iteration scheme based upon x - = x - . If we guess at a monthly return of 1% (we need an initial guess!), then we can use i = .01 hence x1 = 1+i = 1.01 is our initial guess. Iterating, we get ...

S:	Wait! How many iterations will it take? Guess!
P:	Well, it depends upon how rapidly the slope of f(x) changes and that depends upon f''(x) and
	 f''(x) = 1320x10+630x5+60x2 and, for x = 1.01 that gives ... did you bring your calculator?
S:	Just stick in x = 1, that's close enough ... and that gives f''= 1320+630+60 = 2010 and that's pretty big, right?
P:	You're getting very clever. Yes, it's large, so I'd say about 6 or 7 iterations. Of course, it depends upon how close x1 is to the root of f(x) = 0. Anyway, let's proceed ... in fact, let's use a computer spread sheet where I've programmed:
x2 = x1 - , x3 = x2 - and so on.
	In what follows, I type in the numbers shown in boldface and the spreadsheet does the rest. I also have the spreadsheet compute (for each iteration x1, x2, etc.) the equivalent Annual Rate, as a percentage , namely  100(x12 - 1):

S:	Aha! You only needed two iterations! 
P:	Amazing! Now you can see how clever Newton is ... uh, was. However, we can also estimate the root of f(x) = 0 by using a quadratic approximation for f(x). Want to try it?
S:	Why not.

	We'll use a quadratic approximation for f(x) =10x12 + 15x7 + 5x4 - 31.47, about x = 1 (since we expect 
x = 1+i to be near 1).
	We have f(x) » f(1) + f'(1) (x-1) + f''(1) = -1.47 + 245 (x-1) + 1005 (x-1)2. Instead of solving 
f(x) = 0, we solve the quadratic equation  1005 (x-1)2 + 245 (x-1) - 1.47 = 0 or putting x - 1 = i, we solve 
1005 i2 + 245 i - 1.47 = 0. Using the world famous formula i = gives i = .00586  where we took the positive square root because we clearly want i positive! This  compares quite favorably with the value obtained via Newton's method. 

S:	Favorably? It's right on the button!
P:	Well, to 5 decimal places. To 7 decimal places the exact root (using Newton's method) is i = .0058570 whereas the quadratic approximation gives i = .0058592 which is pretty good, eh what?
S:	Yeah. One other thing ... does Newton's method always work?
P:	I'm glad you asked that question:

DIFFICULTIES WITH NEWTON'S METHOD:
	If we begin our iterations with x1 far from a root of f(x) = 0, we can't guarantee that the iterates x2, x3, etc. will march to the root. Since we have a nice geometrical picture of what the method is doing (i.e. repeatedly moving along tangent lines to the x-axis) we can see what happens in various cases:
	
	Suppose f(x) has two roots, x = p and x = q, and we begin at x = x1, too far to the right of q (which, we assume, is the root we want). It's possible that the tangent line at x = x1 will intersect the x-axis nearer to   x = p and the iterates will have a limit of p (instead of q). That's not too bad ... at least we get a root.	

	Worse still, we might pick an x1 where the tangent line is horizontal ... then it never intersects the x-axis! (In this case, x2 = x1 - involves a division by f'(x1) which is zero.)	

	

	Also, we might pick x1 so that the tangent line intersects the x-axis (at x2) too far to the right of q and the next tangent line takes us a mile or two along the negative x-axis ... and who knows what f(x) looks like there?	

	

	Also, we might find that x3 is identical to x1 and the iterates just repeat: x1, x2, x1, x2, etc. etc. not having any limiting value at all.

	As you might imagine, there are other weird things that can happen.	

	The moral? Pick a reasonable value for x1 before you start iterating!

	Before we leave Newton's method, let's look once again at the iterative procedure for finding a square root. To find we invent f(x) = x2 - N and, to solve f(x) = 0, we iterate using x - = x - = and some reasonable first iterate, x1. (i.e. we use xn+1 =  for n = 1, 2, 3, 4, ... etc.). But look at how clever this scheme is! If x1 is smaller than , then will be larger than so Newton's method picks, as x2, the average of x1 and  ! In fact, at each stage of our iterations, xn and will be on either side of so we actually have the root in some interval which (hopefully) gets smaller and smaller. Very nice. This technique makes such sense that it's used by people who have never heard of Newton!

Examples:	(a)  Solve  x3 - x2 + x + 22 = 0.
		(b)  Solve  x ln x = 6
Solutions:	(a)	Using xn+1 = xn - with f(x) = x3-x2+x+22 we get:		xn+1 = xn - . The only root is slightly 
larger than 3, so we use x1=3 and get x2=3.045789, x3=3.044724, x4=3.044723, x5=3.044723 and we conclude that the root is 3.04472 to five dec. places.

		(b)	With f(x) = x ln x - 6 we get:  
xn+1 = xn -  .  There is one root between 4 and 5. If we use x1=4.3 we get x2=4.189351, x3=4.188760, x4=4.188760 and we 
conclude that the root is 4.18876 to five dec. places.	  

	

LECTURE 12

L'HÔPITAL'S RULE  for evaluating limits of the form 
 	
	In an earlier lecture we investigated various LIMIT RULES (such as lim (f + g) = lim(f) + lim(g) and so on) which allowed us to avoid computing limits by resorting to the definition of "limit". Often these rules were of no value, such as would be the case for the rule: , in the case where = 0. However, if 
f = L (a number different from zero) and g = 0 we agreed to use the notation = ¥ (perhaps +¥ or -¥ depending upon the sign of L and whether g(x) = 0 from the right or from the left). One of the most irritating limits is the case where  g(x) = 0  AND f = 0 ... then we say that the ratio has the indeterminate form . It's this form which we want to consider now.
	To begin, let's consider f(x) = x2 - 4 and g(x) = x3 - 8 and  which has the form. (I know we can factor both numerator and denominator, cancel the factor (x - 2) and then use the limit rule ... but we won't because we want to generate another technique.) We rewrite the ratio in the form  which doesn't change anything because f(2) = 0 and g(2) = 0 and we've divided both numerator and denominator by (x - 2) which isn't zero if x®2 (because we want x near 2, but not equal to 2). Now note that  = f'(2)  and    
= g'(2) so NOW the numerator and denominator have limits different from zero (i.e. we've eliminated the dreaded  form), and we get = = []x=2  = , where the convenient notation [ ]x=2 means "evaluated at x = 2".  
	This prescription for evaluating limits of the indeterminate form is called:  

l'HÔPITAL'S RULE for 
If  f(x) = 0 and  g(x) = 0  then   = provided this limit exists

	Of course, in order for l'Hopital's rule* to be valid, the functions f(x) and g(x) must have derivatives near      x = a (else the limit of their ratio has no meaning).
Note:	The  form is precisely the form of the difference ratio that defines the derivative:  . 
	If we apply l'Hopital's rule we get = = = f'(a) as expected!

Examples:	Evaluate the following limits
(a)			(b)			(c)	x2e-x

Solutions:
(a) 	= = -1 (where we differentiated numerator and denominator).
(b)	== = where the first application of l'Hopital's rule yielded a limit still in the form , so we used l'Hopital again!
(c)	x2e-x = =  
	= x3 e-x (rearranging a bit) and we wind up with an expression which is worse than the one we started with! If we continue in this manner, the limits will NOT get easier to evaluate ... they'll get worse ... and that brings us to the second form, , which, miraculously, also succumbs to l'Hopital's rule:

l'HÔPITAL'S RULE for 
If  f(x) = ¥ and  g(x) = ¥  then   = provided this limit exists

	As you might imagine, the functions must actually have derivatives in order to use this rule.
	Now we write  x2e-x = = =
	 = 0.
P:	Do you recognize  x2e-x = 0?
S:	Nope.
P:	We talked about it when I mentioned the explosive growth of ex. In fact, I think I said that  has a limit of zero because no matter how hard x1000 tries to drag the fraction to ¥, the ex in the denominator ...
S:	... drags it to zero. Yeah, I remember now.
P:	Well, now we can see that:  = = 
	= = ... etc. etc. = = = 0. 
	See? We keep differentiating numerator and denominator until we no longer have the form , and ex just waits patiently until x1000 is differentiated to a constant, then it drags the fraction to zero.
S:	Are you going to prove l'Hopital's rule?
P:	No, just trust me; it works.

Interpretation of a Limiting Value:
	Having evaluated a limit, say f(x) = L, then we know that | f(x) - L | is very small when x is close to "a". In fact, that sometimes says something quite interesting about f(x) in cases where f(x) = , a ratio of functions (which is what we've been considering here). If ® L, then is "close to" L  (when x is near "a"). 
	Consider, for example, the by-now-familiar  = 1. It says that  is very nearly "1" when x is close to zero, so y = sin x and y = x have nearly the same values for small values of x. (We pointed out, earlier, that choosing x = .0123  we find that sin (.0123) = .01229969). In a sense, we're comparing the values of sin x and x.
	We can do the same for = -1 so that the values of 1 - ex are roughly the negative of the values of x (when x is small, of course). That is: 1 - ex » -x  for small x, hence ex  » 1 + x. 
	Similarly = tells us that 1 - cos x » hence cos x » 1 - when x is small.
	Similarly, we might ask: If sin x is "close to" x (when x is small), then how about sin x - x? What's it "close to"?  We might try to compare sin x - x with, say, x2 by evaluating  = 
=  = 0, which says that sin x - x is very much smaller than x2 (when x is very small) since the ratio of sin x - x and x2 approaches zero. Let's then compare sin x - x with something smaller than x2 ... say x3 (which is certainly smaller than x2 when x is small). We have  =  =  = = - . We now have that sin x - x is "very close" to - x3 (for small x), or, sin x » x - and that's the cubic approximation we considered earlier. In fact, 1 - is the quadratic approximation to cos x (at x = 0) and 1 + x is the linear (tangent line) approximation to ex 
(at x = 0).

S:	Why are you always writing this is "close to" that? Why the quotes? Are they close, or aren't they?
P:	Good question! Now I have one for you: how do you measure "closeness". I mean, if I gave you two numbers, what would you do to see if one was "close to" the other?
S: 	I'd just look at them ... what else?
P:	No. Give me a prescription which I could place in a "Manual on Closeness" ... some algorithm or procedure which anyone could follow. You can't say "when you have two numbers you just look at them". I see you don't know what I mean. Okay, I have in my pocket two numbers. Their difference is .00001 and I'd like to know it they're "close" in value.
S: 	Of course they are.
P: 	The two numbers happen to be  .00002 and .00001, the first being 100% larger than the second, yet their difference is .00001, so do you still think these two numbers are "close"?
S:	Huh?
P:	The distance to the sun is 150,000,000 km and to an asteroid is 149,500,000 km. Are these two distances "close"?
S:	I'd say so.
P:	Yet their difference is 500,000 which is a pretty large. Funny eh? .00002 is NOT "close to" .00001, yet their difference is only .00001, while 150,000,000 is "close to" 149,500,000 even though their difference is 500,000. The thing which makes one number "close to" another is that their ratio should be close to 1, not their difference close to 0. It's a natural way to compare, just as we're doing when we compare p(x) to q(x) via the ratio  . The ratio is  2 (not very close to 1) whereas = 1.003 so the latter numbers are close to one another ... in this special sense of the phrase "close to".
S:	Okay, so when you say  cos x  is "close to" 1 - then you're really saying that their ratio is close to 1, right?
P:	Right.
S:	Hah! Gotcha! Their difference is also close to zero! See? cos x - (1 - ) has a limit of 0 as x®0, so their difference is close to 0!
P: 	That's just an accident. I mean, it doesn't always happen that way. Sometimes ®1 yet p(x) - q(x) doesn't ®0. See? One has a tendency to say » 1 hence p » q hence p - q » 0 and that could be wrong!
S:	Prove it.
P:	Let's see ... uh, yes ... let's try it with p(x) = + and q(x) = . Then = = 1+x ®1 as x®0 hence p is "close to" q when x is small (in our special meaning of the phrase "close to") so we might think that p(x) - q(x) ®0, but we'd be wrong since p(x) - q(x) = which certainly doesn't approach zero as x®0! It's like the sun and the asteroid; because their ratio is very close to 1 doesn't mean their difference is small. Got it?
S:	Got it. However, before you go on, tell me why you said, earlier, that ... to use your exact words:
	 = tells us that 1 - cos x » hence cos x » 1 - when x is small.
	You just said you couldn't do this, didn't you?
P:	You're right. Mia culpa. I apologize ... BUT the statement is still true, even though the reasoning is fallacious.
S:	Can I do that on an exam? I mean, get the right result with the wrong reasoning?
P:	Sure ... but you won't get any marks for it. But hold on, let me do it properly so you can see why the final statement is true. First, cos x » 1 - means that cos x - ® 0 (as x®0), so that's what we must prove, starting with the known result  = which we got using l'Hopital's rule. Now = means (according to the definition of "limit") that, for any choice of error e we can make  < e  by restricting x to lie in some small interval about x = 0, say 
0 < | x | < h.  Hence  - e <  - < e  and we can reorganize this to read: 
	-  x2 < cos x - <  x2. Now let x®0 and get (using the ol' SQUEEZE theorem):  
	£  £  and since the outside limits are 0, then 
	 = 0 as well.
S:	Do I have to know this for the final exam?
P:	No. I just thought you might be interested.
S:	Wrong!
Example:	Evaluate   .
Solution:	We must reorganize the expression  - , so it has the form , so we rewrite it as  . Using l'Hopital's rule twice we get:
=  =  = = 0.
Note: this says that not only is sin x » x but also » . 
	An interesting question: If p(x) - q(x) ® 0, does - ® 0? Answer? Sometimes, but not always. See if you can find a simple example where, say, = 0, yet ¹ 0

LECTURE 13

POLAR COORDINATES

	We usually describe the location of points on a plane by giving the distance left-right and distance up-down from some origin. Sometimes we think of it as distance east-west and north-south. Perhaps we think of latitude and longitude. In any case, they are "rectangular" or "Cartesian" coordinates for the point ... but they aren't the only way to describe the location of a point and, indeed, sometimes rectangular coordinates are a terrible choice. 
	For example, if you're in a desert and were describing how to get somewhere you wouldn't say "go 3 km east then 4 km north" (using rectangular coordinates). You're more likely to say something like "Go 5 miles north-east", giving a distance and a direction. These are POLAR COORDINATES. The distance from the origin is called  r and the direction is specified by the angle q measured (in RADIANS!) counterclockwise from the positive x-direction as shown ===>>>
	It's clear from the diagram that there is a simple relationship between the rectangular coordinates of the point P, namely (x,y), and the polar coordinates (r,q). These are:	          

x = r cos q,  y = r sin q   and  r2 = x2 + y2, tan q = 
	Before we continue with polar coordinates, let's digress to consider yet another coordinate system (just so you don't think these are the only ones). Whereas (x,y) provides 2 distances and (r,q) gives a distance and an angle, we might consider a coordinate system which describes the location of a point in the plane using two angles. We pick two origins (why not?) and give two angles q1 and q2 as shown.
	There are major problems with this (q1, q2) coordinate system. If q1 > q2 , then the two rays emanating from the origins don't intersect anywhere. Further, what are the coordinates of the points P1, P2 and P3 shown? They are P1(p,p) and P2(0,p) and 	     

P3(0,0) but they aren't the only points with these coordinates! In fact every point between the two origins has the same coordinates, namely (0,p). Because of this we won't spend any more time on this coordinate system!!

	Back to polar coordinates:
	In identifying a point (r,q) it is convenient to think of "polar" graph paper. Note that "rectangular" graph paper has the curves x = constant and y = constant drawn for you (such as x = -2,   x = -1, x = 0 etc.) whereas polar graph paper has the curves              r = constant and q = constant drawn ==>>
	Until you are accustomed to thinking in polar coordinates, it is convenient to convert polar equations (such as r = 2 or q = p/4) into rectangular coordinates: r = 2 becomes x2 + y2 = 22, a circle of radius 2 and centre the origin. q = p/4  becomes tan q = 1 = y/x  so   y = x (a line through the origin with slope 1).	

	The diagram illustrates various points ===>
	If the circles shown are described by r = 1, r = 2, etc. then p1 has polar coordinates (4,p/4) and p2(3,p/6), p3(4,5p/6), p4(4,5p/4), p5(3,4p/3) and p6(2,7p/4). However, every point in the plane has a whole host of polar coordinates! The point p6 can also be described by r = 2 and q = - p/4 (with negative q corresponding to clockwise measurements of the angle). We also have p1(4,9p/4) where the angle q corresponds to a complete revolution of 2p plus an additional p/4. Indeed, p1 can be described by r = 2 and q = 2pn + p/4 for any integer "n". But that's not all. If we regard negative q as meaning "move opposite to the positive direction" then we can also consider negative 	

values for r, also meaning "move opposite to the positive direction". The positive direction is in the direction of q so a negative r means move in the direction opposite to this. That gives to p1 (for example) the polar coordinates     r = - 4 and q = p/4 + p = 5p/4. In spite of the plethora of polar coordinates for each point in the plane, we usually identify a point with a positive r and an angle (in RADIANS!) in the interval 0 £ q < 2p.
	Now for some more interesting polar curves:
	Whereas the equation y = x (in rectangular coordinates) describes a straight line through the origin with slope 1, r = q describes quite a different curve in polar coordinates. As the q increases, r increases and the points with polar coordinates satisfying r = q lie on a spiral. Although the computer-plotted graph below shows r = q for positive values of q (hence of r), we can also plot r = q for negative q  as well. See what it'll look like? Just replace the polar coordinates of every point by their negatives. For example, (-2p, -2p) and (-p/2, -p/2) also satisfy r = q.

	Consider the polar curve r = 2 cos q. We'll convert to rectangular coordinates, hoping to recognize the curve. To do this we want to create terms r2 and/or r cos q and/or r sin q and/or tan q which we'll replace by x2+y2, x, y and y/x respectively. Multiplying by r gives r2 = 2 r cos q hence x2+y2 = 2x is the equivalent rectangular equation and this can be rewritten (x - 1)2 + y2 = 1, a circle of radius "1" with centre at (1,0). 
	After a while it gets tiring having to convert to rectangular coordinates ... and often we don't recognize the rectangular equation anyway, so we should get accustomed to sketching directly in polar coordinates.
	In order to sketch a polar curve r = f(q) it's convenient to first sketch this relation as though r and q were rectangular coordinates (or we could make a table of values, but a picture is worth a thousand tables).

	In the above example, we've identified 4 points at q = 0, q = a (where r is a local maximum), q = b (where r is a local minimum) and q = c ... then we show these points in polar coordinates, noting where r is decreasing and increasing.  
	But something wonderful happens if f(q) is negative, as shown in the example below:

	Again we sketch r = f(q) and identify a few points of interest at q = 0, a, b, c, d and e. Note that, when 
q = b, r has decreased to zero (so the distance from the origin, in polar coordinates, is zero and the polar curve goes through the origin). From q = b to q = d, r = f(q) is negative and although the q-direction is (roughly) into the second quadrant, the negative r-values indicate that we move opposite to that direction, placing the points (roughly) in the fourth quadrant. In particular, at q = c (which points roughly north-west, in polar coordinates), r has its most negative value ... so we move south-east.

Examples:	The polar curves, r = are conic sections (hyperbolas, parabolas, circles, ellipses), depending upon the value of "a". For each of the following a-values, plot the curve and identify:

	(a)   a = 0		(b)   a = .5		(c)   a = 1		(d)   a = 2
Solutions:
(a)	a = 0 is easiest. The polar equation is r = 1, a circle.
(b)	For a = .5, r is always positive and goes from a minimum value of = to a 
	maximum of = 2 (when q = p). It's the ellipse.
(c)	For a = 1, r = has its minimum of  at q = 0 but increases to ¥ as q®p (the denominator becoming zero). Or, to put it differently, r = ¥ and q = p gives the only infinity. This is the parabola.
(d)	For a = 2, r = not only becomes infinite but does so twice ... and r is also negative. 
	From q=0 to q=, r increases from its initial value of , becoming infinite as q® . 
	From q=to q=, r <0 (since 1+2 cos q<0) and the polar curve lies in the fourth, then the first quadrant. From q=to q=2p, r is again positive and returns from infinity (when q = ) to . 
	The curve is a hyperbola and it has two branches, the right-most branch being traversed while r is negative and q points into the second and third quadrants.

S: 	That's hard, isn't it? I mean, do you really expect ...
P:	Don't worry. I only hope you can follow the arguments I gave, and could sketch these curves if you had enough time, but I won't expect you to reproduce them on an exam.
S:	Whew!
P:	But they are nice, aren't they? In fact, these polar equations describe the conic sections with a focus at the origin and that's different than the usual rectangular equations. In fact, if you wanted to describe the orbit of heavenly objects as they moved about the sun then you'd likely pick the sun as focus and you'd get one of these polar equations for the orbit of planets or comets. Nice, eh?
S:	Wonderful ...

Examples:	Sketch  r2 = sin 2q
Solution:	Note that sin 2q is negative when p < 2q < 2p  (since that puts 2q in the third or fourth quadrant where the sine function is negative) ... and again when 3p < 2q < 4p. Hence, when  < q < p and again when     
< q < 2p, there is no curve!! That's because r2 = sin 2q cannot be negative. For q-values in between (starting at 
q = 0), r2 increases to a maximum when 2q = then decreases to zero when 2q = p  (i.e. q = ). Then we come to the sector where there is no curve, then we start again with q = p where r increases to a maximum of 1 when 2q = and decreases again to zero for 2q = 4p, or q = 2p ... and that takes us through one complete circuit of the origin and if we continue, the curve repeats.

 This polar curve is called a LEMNISCATE*.

S:	You say r2 can't be negative ... so there's no curve there. That's weird, isn't it?
P:	You've seen it before, you just don't recognize it. In fact, if you sketch y2 = 4 - x2 in rectangular coordinates you'd say that, for x2 > 4, there is no curve because y2 can't be negative ... hence the curve lies only in x2£ 4.
S:	I'd never say that! I don't even recognize y2 = 4 - x2!
P:	How about x2 + y2 = 4?
S:	Aah, that's different. Anyway, why didn't you sketch r2 = sin 2q  in rectangular coordinates first, as you suggested we do?
P:	Okay, I'll do it that way. First I sketch  r = sin 2q (which is easy) then I take ± its square root to get the graph of 
	r2 = sin 2q (but only where sin 2q is positive, of course).

S: 	How's that again!?
P: 	It's how you can sketch y2 = f(x). Just sketch y = f(x), then throw away all the negative pieces of f(x) (because there's no curve there, remember?), then take ± with what's left. That's y2 = f(x).

	Then you get those cute little loops wherever f(x) is positive.
	The method is something like sketching y = | f(x) |. We first sketch y = f(x), then reflect all the negative pieces of f(x) in the x-axis, i.e. replace them with - f(x). Remember?
S:	But the curve is different, right? I mean, y = doesn't look like y = f(x), does it?
P:	No, but when f(x) increases or decreases, so does and that's enough to sketch y = ... uh, except for one other thing which I almost hate to mention.
S: 	Go ahead. Nothing'll scare me now.
P: 	Well, where f(x) is zero, the graph of y = usually has a vertical tangent (i.e the derivative is infinite). That's because, for y = , we have = 1/2= -1/2 f'(x) = which becomes infinite as f(x)®0 (unless, of course  f'(x)®0 as well  ... in which case we've got a form and needn't be infinite).
S: 	That does scare me.

Examples:	Sketch each of the following:
		(a)  r = 4 + 3 cos q 	
		(b)   r = 4 + 4 cos q	
		(c)   r = 4 + 5 cos q

Solutions:

		All are plotted on the same graph. Note that r = 4 + 3 cos q  has max and min r-values of 7 and 1 and they occur at q = 0 and q = p (respectively) while r = 4 + 4 cos q has max and min r-values of 8 and 0, the latter being at the origin (and occurs for q = p). Finally, the last curve has negative r-values which occur whenever 
4 + 5 cos q < 0, hence when q lies between two particular angles in the second and third quadrant. For q in this interval, although the q-direction is west of the y-axis, the negative r-value places the point east of the y-axis ... generating a small loop with right-most point r = -1, q = p.
	All are called LIMAÇONS (with the form r = a + b cos q) although the middle curve, where   b = a, is more commonly known as a CARDIOID. When b > a there's an inner loop.	

INTERSECTION OF POLAR CURVES:
	A problem we'll meet shortly involves finding the points of intersections of two polar curves, say r = f(q) and r = g(q). The procedure is much the same as for rectangular coordinates: solve these 2 equations in 2 unknowns:  r and q. Because there are an infinite variety of ways to describe a single point in polar coordinates (i.e. (r,q) and (r,q+2p) and (-r,q+p) etc. etc.) it's best to sketch the polar curve and anticipate the location of points of intersection. That way you'll know when you have them all!

Example:	Find the point(s) of intersection of r = cos q and r = 1 - cos q.
Solution:	A sketch indicates two points of intersection: one in the first and one in the fourth quadrant. To find them, set cos q = 1 - cos q so cos q = hence q = and q = or, perhaps this one's simpler to describe as q = - . In any case r = cos = so the	      
	
two points are (, ±). Note that r = 1 - cos q is a cardioid with its minimum r-value (namely r = 0) occurring at   
q = 0 and its maximum (r = 2) at q = p. Also, r = cos q is a circle as we've already seen.

PS:
S:	I haven't seen ... have I?
P:	Well, I didn't sketch it last time. Pay attention:  r = cos q has its maximum (r = 1) at q = 0, then r decreases as q increases until, when q = , we have r = 0 (so the curve is now at the origin) and after that, q points into the second quadrant but now r is negative so we move opposite to the q-direction and get the curve going into the fourth quadrant (the lower half of the circle) until q = p and r = -1 which actually gives the right-most point on this circle even though q points due west (because r is negative, so the curve is east) and now q continues into the third quadrant but r is still negative so the curve is traced out in the first quadrant, again(!), retracing the upper half of the circle, then finally q points into the fourth quadrant and r becomes positive again and we go in the q-direction and retrace the lower half of the circle (again!) so we stand back and notice that when q goes from 0 to 2p the curve r = cos q is actually traced out twice! Got it?
S:	zzzzz
P:	Wake up ... here's one for you. Sketch the FOLIUM:  
	(x2+y2)2 = x2 y, but I'd suggest changing first to polars. And while you're at it, tell me the maximum value of r (i.e the maximum distance from the origin). And while you're at it, notice how many times the curve is traced when  q goes from 0 to 2p. Got it? Okay, I'll do it myself.  Put x2 + y2= r2 and x = r cos q  and y = r sin q and get   r4 = r3 cos2q sin q  so we cancel r3 		
from each side, checking to see if  we've thrown  any points away and noticing that the origin has r = 0 but we're not throwing this point away because it's satisfies the equation that's left, namely r = cos2q sin q  (in fact we get to the origin every time cos q = 0 or sin q = 0) and now we imagine q increasing from q = 0 (where we begin, at the origin) so r increases to some maximum value (and we'll find out where that occurs in a minute) then r decreases again to 0 when q = p/2 ('cause cos q = 0) then  q points into the second quadrant and cos q goes negative but r is still positive 'cause we've got a cos2q in the equation, but soon we get to q = p where sin q = 0 so we go to the origin again and for the rest of the time q points into the third and fourth quadrants but r is negative (because of the sin q) so the curve is traced out in the first and second quadrants (again!) until, finally, q = 2p and we re-arrive where we began, at the origin, ready to retrace the curve for a third time should q decide to continue. Got it?
S:	You forgot to find the maximum r-value.
P:	Aah yes, well, we must maximize the continuous function r = cos2q sin q on the closed interval 0 £ q £ p ... got that? a continuous function on a closed interval ...  so we find the critical points within this interval ... where 
	= cos2q (cos q) + 2 cos q (-sin q) sin q = 0 and that means that cos3q - 2 cos q sin2q = 0 or, let's see, I can factor this so it reads:  cos q (cos2q - 2 sin2q) = 0 hence either cos q = 0 (meaning q = ) or cos2q - 2 sin2q = 0 which I can rewrite, putting cos2q = 1 - sin2q, and I get 1 - 3 sin2q = 0 so sin q = and there are two q-values in 0 < q < p which have this sine and each yields a maximum for r (one's in the first and one in the second quadrant, at the points labelled p and q). See?
S:	You still haven't found the maximum r-value ...  and you have to check the end-points to find the maximum ... and you forgot that 1 - 3 sin2q = 0 means sin q = ±, so you forgot that too. 
P: 	Okay, the end-points ... q = 0 and q  = p  each give r = 0 (certainly not the maximum). Also, I only need to consider q's in the interval 0 < q < p, where sin q > 0 (so I ignore sin q = - 1/), but I guess I should find the maximum r-value. I substitute the appropriate q into r = cos2q sin q = (1 - sin2q) sin q and get rmax = (1 - ) = .
S: 	You can't leave it in that form ... rationalize the denominator. I learned that in kindergarten.
P:	Go back to sleep.