MATH 1441 Technical Mathematics for Biological Sciences Graph Sketching As previously explained, graph sketching is a process of several steps of specific sorts of analysis of a formula for a function which results in a sketch of the overall shape of the graph of that function, highlighting certain important characteristics of the graph. A few points may be plotted as part of the graph sketching process, but the graph sketching process is quite different from the graph plotting process in which one simply plots a sequence of points which are then joined by what appears to be an appropriate curve. Typically textbooks list approximately eight to ten procedures or "clues" to for determining aspects of the shape of a graph from its formula. Some of these "clues" are quite difficult to evaluate, others give useful information only relatively rarely. In this document, we demonstrate an approach to graph sketching which involves just five steps, with early steps providing the greatest amount of information about the shape of the graph, and subsequent steps making use as much as possible on information already obtained. If you follow the process described below, you should find that the shape of the desired graph emerges virtually automatically, and in many cases with very little effort. In the process you gain insight into the way in which the value of the dependent variable varies as a function of the independent variable. The 5-Step Procedure We will illustrate these steps in detail in several examples below. However, it is useful to state the steps briefly and explicitly in one list first. Each of these steps involves some mathematical analysis or calculation, along with immediate additions to the graph sketch. You will find that this sort of analysis becomes difficult or impossible if you first try to do all of the calculations for the five steps, and only then begin to develop your sketch. The five steps are: 1. Carry out the increasing/decreasing analysis for the function, as described and illustrated in the previous document in this series. Sketch the coordinate axes, label the horizontal axis, and sketch rough arrows indicating intervals of increasing/decreasing values of the dependent variable. 2. Determine the coordinates of all local maximums and minimums in the graph. Sketch these features. Note that nearly all of the information you need to do this has been generated in step 1. 3. Sketch in any vertical asymptotes as well as the shape of the graph in the vicinity of those asymptotes. Again, the information necessary to do this has been generated in step 1. 4. Calculate the coordinates of any intercepts and plot those points. Sketch small bits of the graph in the vicinity of each of these points. 5. Determine the behavior of the dependent variable for large values (positive and negative) of the independent variable, and sketch these features. At the completion of these five steps, your sketch will consist of a number of disjoint pieces of the total graph. However, they are the only pieces that really have any "shape" to them. These may be joined sequentially by appropriately smooth curves to complete the sketch of the entire graph. Again, we stress how important it is that each step of this process that results in useful information also results in features being added to the graph sketch. If that is done, by the time you complete step 5, the shape of the graph will be very obvious. By proceeding stepwise, you are also dealing with manageable quantities of information at each stage. We'll now illustrate this process with a number of examples. David W. Sabo (2000) Graph Sketching Page 1 of 12 Example 1: Sketch the graph of y = x3 + 2x2 - 19x - 80. You may use the fact that y(5) = 0 in your work. Solution This is a cubic polynomial, and so we have a rough idea of what the shape of the graph is (see Example 1 in the document entitled "Graphs of Functions and Their Derivatives" earlier in this series). Step 1: (increasing/decreasing analysis) We have dy 3 x 2 4 x 19 dx Thus, the values of x satisfying condition 1 in the increasing/decreasing analysis are the solutions of the equation 3x 2 4x 19 0 These are x 4 4 2 4 3 19 2 3 4 244 1.937, 3.270 6 There are no values of x which satisfy condition 2 of the increasing/decreasing analysis. Thus, y' can only change sign at the values x -3.270 and x 1.937. Thus, we partition the x-axis into three intervals: interval x < -3.270 -3.270 < x < 1.937 x > 1.937 test value (x) -5 0 5 y'(test value) 36 (positive) -19 (negative) 76 (positive) on this interval, y is … increasing decreasing increasing The results of this step are shown in the sketch just below to the right. The dotted vertical lines here do not indicate the location of vertical asymptotes, but of the values of x separating the intervals of interest in this increasing/decreasing analysis. y Step 2: From step 1, we know that local maximums and local minimums occur at x -3.270 and x 1.937. Substituting these values into the formula for y gives y(-3.270) -31.45 x -5 and 5 y(1.937) -102.031 From the directions of the arrows in Figure 1a, we know that the point (-3.270, -31.45) must be a local maximum, whereas the point (1.937, -102.031) must be a local minimum. These two features are sketched in in Figure 1b, on the next page. x = -3.270 x = 1.937 Figure 1a Notice how we've not only plotted the two points (so now a scale is necessary along the vertical axis as well as along the horizontal axis) but we've also sketched in a bit of graph on either side of these points following the directions indicated in Step 1. That is, the graph must be increasing to the local maximum from the left and decreasing from the local maximum to its right. Similarly, the graph must be dropping to the local minimum from its left and rising away from the local minimum to its right. Page 2 of 12 Graph Sketching David W. Sabo (2000) Step 3: There were no points satisfying condition 2 in Step 1, so there are no vertical asymptotes in this graph. This step adds nothing new to the graph sketch. 100 Step 4: The coordinates of the vertical intercept are easily obtained by simply substituting x = 0 into the formula for y. This gives x -5 y(0) = - 80 5 -100 so the vertical intercept is at (0, -80). To get the horizontal intercepts, we need to substitute y = 0, and solve for x. In this case, we get a cubic equation, which is not easily solved. However, we were told in the original x = -3.270 x = 1.937 problem that y(5) = 0 (which you can easily verify to be Figure 1b correct). Thus, one of the horizontal intercepts is at the point (5, 0). Examining the sketch so far in Figure 1b, we conclude that this must be the only horizontal intercept, since there is no other place that a graph with the known pattern of increasing/decreasing could intersect the horizontal axis. Figure 1c below shows the sketch with the intercepts added. Again, notice that we include small rough tracings of what the graph must look like in the vicinity of these points, based on the directions we know the graph must be heading from the information obtained in Step 1. In the vicinity of the vertical intercept the graph is decreasing, whereas in the vicinity of the horizontal intercept, the graph is increasing. Step 5: Finally, we need to determine what the graph is doing far to the left of and far to the right of the vertical axis. As the numerical value of x gets large, the x3 term in the formula for y dominates. As x increases positively on its way to +, x3 and hence y increases faster and faster. Thus, the graph leaves the small region shown in the figures heading steeply upwards to the right. As x decreases negatively on its way to -, x3 and hence y also becomes more and more negative, heading towards -. Thus, the graph leaves the small region shown in the figures heading downwards steeply towards the left. These features are added to the sketch in Figure 1d below. y 100 100 x -5 x -5 5 5 -100 -100 x = -3.270 x = 1.937 x = -3.270 x = 1.937 Figure 1c Figure 1d Figure 1d includes all of the features of the graph detected in Steps 1 - 5. There are no other local maximums, local minimums, vertical asymptotes, or intercepts possible, since we've accounted for all of them. Thus, the missing parts of the graph must consist simply of smooth arcs joining the pieces already present. The overall shape of the graph is really quite obvious now. So, to complete the graph sketch, just join the existing pieces together smoothly. Our result is shown in Figure 1e, on the next page. David W. Sabo (2000) Graph Sketching Page 3 of 12 100 x -5 5 -100 Figure 1e x = -3.270 x = 1.937 We've left some of the "helps" in this final sketch so you can see how the clues determined in the steps of the analysis correspond to the final shape of the sketch. As we've worked through this example, we've sketched a fresh graph with each addition to make the steps more obvious. However, when you are sketching a graph on your own, you would just add the new features discovered at each step to the existing sketch, so that you end up with just this final sketch when you're done, rather than a series of sketches as shown here. Example 2: Sketch the graph of y 7x . x2 9 Solution Once again, we just go through the five steps in sequence. The results are: Step 1: It is easy to determine that the derivative of this function is y 7 9 x2 x 2 9 2 Thus, condition 1 of the increasing/decreasing analysis yields two values of x: -3 and +3, as values of x which make the derivative equal to zero. There are no values of x making the denominator of y' zero. Thus, y' can change sign at most at the points with x = -3 and x = +3. So, we need to examine three intervals along the x-axis: interval x < -3 -3 < x < 3 x>3 test value (x) -5 0 5 y'(test value) -0.0969 (negative) 0.778 (positive) -0.0969 (negative) on this interval, y is … decreasing increasing decreasing The results in this table are shown pictorially in Figure 2a on the next page. Step 2: The points at x = -3 and x = +3 correspond to y' = 0. Further, the pattern of arrows in Figure 2a (or the information in the table above) indicates that the point x = -3, y = -7/6 -1.667 is a local minimum, whereas the point x = 3, y = 7/6 1.667 Page 4 of 12 Graph Sketching David W. Sabo (2000) is a local maximum These two new features have been added to our sketch, as shown in Figure 2b. y y 1 -5 x 5 -5 x 5 -1 x = -3 x = -3 x=3 x=3 Figure 2a Figure 2b Step 3: No new information results here, because none of the values of x enumerated in Step 1 satisfied condition 2 in the increasing/decreasing analysis. So, the graph does not have any vertical asymptotes. Step 4: Substituting x = 0 into the formula for y gives y = 0, so the vertical intercept of this graph is at the origin: (0, 0). Substituting y = 0 into this formula gives the equation 7x 0 x 9 2 7x 0 x 0 so the only horizontal intercept of this graph is the same point, (0, 0). Figure 2c incorporates this feature. Step 5: As x , the '9' in the denominator of the formula for y becomes negligible, so we can write y 7x 7x 7 0 x 2 9 x x 2 x x Furthermore, from the second last form in this sequence, we can see that y approaches zero from the negative side when x is negative (since then 7/x is a negative value that is getting smaller and smaller or closer to zero). On the other hand, y approaches zero from the positive side when x is positive. This feature is added to the graph in Figure 2d. y y 1 1 -5 5 x -5 -1 Figure 2c x = -3 David W. Sabo (2000) 5 x -1 x=3 x = -3 Graph Sketching x=3 Figure 2d Page 5 of 12 The shape of the overall graph is now obvious from Figure 2d. It's just a matter of smoothly joining the five small segments of the graph already present. Our version of the final result is: y 1 -5 5 -1 x = -3 x Figure 2e x=3 We've distorted the shape of this graph a bit near the left and right extreme to indicate y approaching zero as x approaches . If you were to plot this graph out using a similar horizontal scale, you'd find that the accurate graph moves much more gradually towards zero. Example 3: Sketch the graph of y 7x . x2 9 Solution This function differs from the one in Example 2 by the change of the sign of the constant term in the denominator. That this perhaps seemingly minor change has a major effect on the characteristics of the function will become obvious from the graph sketch we produce. Once again, we just go through the five steps in sequence. The results are: Step 1: It is easy to determine that the derivative of this function is y 7 9 x 2 x 2 9 2 Notice that the derivative here differs from that in Example 2 by the change in sign of a few terms. However, the effect of these sign changes is that there are no longer any values of x that satisfy condition 1 of the increasing/decreasing analysis (and so this graph will have no local maximums or local minimums). The denominator of y' will be zero when x = +3 or x = -3, so here there are two values of x which satisfy condition 2 of the increasing/decreasing analysis (and so there will be two vertical asymptotes in this graph). Thus, there are two values of x at which y' may change sign, and so we need to consider three intervals along the x- axis: interval x < -3 -3 < x < 3 x>3 test value (x) -5 0 5 y'(test value) -0.930 (negative) -0.778 (negative) -0.930 (negative) on this interval, y is … decreasing decreasing decreasing These results are sketched in Figure 3a below. Page 6 of 12 Graph Sketching David W. Sabo (2000) Step 2: There is no new information from this step, since, as already noted, this graph does not contain any local maximums or local minimums. Step 3: From Step 1 we know that this graph has a vertical asymptote at x = -3, and another vertical asymptote at x = +3. Since the graph is decreasing for all values of x, we can say immediately that as x -3 from the left, y drops to - as x -3 from the right, y climbs to + as x 3 from the left, y drops to - as x 3 from the right, y climbs to + Adding these features to the sketch gives Figure 3b. In this case, the vertical lines at x = -3 and x = +3 are rendered with somewhat longer dashes than were used in the previous examples as an attempt to indicate that these are the positions of vertical asymptotes. y y -5 x 5 x = -3 -5 x = -3 x=3 x 5 x=3 Figure 3a Figure 3b Step 4: As in Example 2 above, we find here that there is just one intercept, at (0, 0). Step 5: The behavior of this graph as x is exactly the same as for the graph in Example 2. Figure 3c and Figure 3d incorporate these features from Step 4 and Step 5, respectively: y y -5 5 x = -3 x=3 x -5 5 x = -3 x=3 Figure 3d Figure 3c David W. Sabo (2000) x Graph Sketching Page 7 of 12 Joining the five bits of graph already present in Figure 3d by a series of smooth curves then gives the sketch of the entire graph. Our final result is y -5 5 x Figure 3e x = -3 x=3 Example 4: Sketch the graph of y x2 7 x 2 10 Solution You've seen the detailed step-by-step process three times now, so we'll condense the solution of this problem a bit, by putting the results of the entire analysis on a single diagram, Figure 4a below. Imagine Figure 4a appearing bit by bit as we go through the following five steps of analysis. Step 1: The derivative here is y 34 x x 2 10 2 Thus, condition 1 (that y' = 0) of the increasing/decreasing analysis is satisfied by just one value of x: x = 0. Since the denominator of y' is not zero for any values of x, condition 2 does not contribute any value of x. Thus, we need to consider just two intervals along the -axis: interval x<0 x>0 test value (x) -1 1 y'(test value) -0.281 (negative) 0.281 (positive) on this interval, y is … decreasing increasing To the left of x = 0, the graph is decreasing (indicated by the large arrow downwards to the right in Figure 4a) and to the right of x = 0, the graph is increasing (indicated by the large arrow upwards to the right in Figure 4a). Step 2: Since y' = 0 when x = 0, and since the graph is decreasing to the left of x = 0 and increasing to the right of x = 0, the point x = 0 (y = -0.7) must be a local minimum in the graph. Step 3: Since the denominators of y and or y' can never have the value zero, there are no vertical asymptotes in this graph. Step 4: When x = 0, we get y = -0.7, so the vertical intercept of the graph is at (0, -0.7), which we've already identified as the position of a local minimum in the graph. Setting y = 0 give x = 7 2.646, so there are Page 8 of 12 Graph Sketching David W. Sabo (2000) two horizontal intercepts in the graph: (-2.646, 0) and (+2.646, 0). These are sketched into Figure 4a with small sections of graph sketched through both points giving the general direction the graph must be following in the vicinity of those points. Step 5: For very large positive and negative values of x, we see that y x2 7 x2 2 1 2 x x 10 x Thus, the value of y tends to the value 1 for the extreme left and right of the graph. Furthermore, the numerator of the fraction in the formula for y is always at least slightly smaller than the denominator, so that y is always at least slightly smaller than 1. Thus the graph is approaching y = 1 from below as x . (This has to be true anyway to fit what we know about the shape of the graph so far. Near x = 0, the graph is below y = 1, and so for the graph to approach y = 1 from above as x , the graph would have to get above 1 and then drop down. But if it did that, then there would have to either be gaps in the graph -vertical asymptotes -- or two local maximums. Since neither are known to be present, it would be impossible for the graph to have a shape in which y approached the value 1 from above as x .) These individual details from Steps 1 - 5 are shown in Figure 4a. Then Figure 4b results when we join the individual pieces of Figure 4a together with smooth curves. Figure 4b is the final solution to this example. y y y=1 0.5 0.5 -5 y=1 x 5 -5 5 x Figure 4b Figure 4a Example 5: Sketch the graph of the function y 2x 7 2x 7 x 2 x 12 x 3 x 4 Solution Step 1: The derivative of this function is y 2x 2 14 x 31 x 3 x 4 2 2 Setting this expression equal to zero results in an equation that has no real solutions, so there are no values of x that satisfy condition 1 of the increasing/decreasing analysis. However, the denominator of this expression is zero for both x = -4 and x = +3, so there are two values of x satisfying condition 2. Thus, the sign of y' can change at either x = -4 or at x = +3, and so we must consider three intervals along the x-axis: David W. Sabo (2000) Graph Sketching Page 9 of 12 interval x < -4 -4 < x < 3 x>3 test value (x) -5 0 4 y'(test value) -0.172(negative) -0.215 (negative) -0.446 (negative) on this interval, y is … decreasing decreasing decreasing Thus, the graph of y vs x is decreasing for all values of x. Step 2: Since there are no values of x for which y' = 0, the graph has no local minimums or local maximums. Step 3: There are vertical asymptotes at x = -4 and x = +3. Since the graph of y vs x is decreasing for all values of x, we can state that the graph drops to - on the left side of each vertical asymptote, and drops from + on the right side of each vertical asymptote. Step 4: Substituting x = 0 into the formula for y gives y = -7/12 -0.583. Thus, the vertical intercept of the graph is at (0, -0.583). Substituting y = 0 into the formula for y results in an equation that can be solved to give x = -3.5. So there is just one horizontal intercept for the graph, at (-3.5, 0). Step 5: For very large positive and negative values of x, we get y 2x 7 2 x 2 x 12 x x so, the graph tends to zero at the extreme left and right. When x is negative and numerically large, y is negative and approaching zero, so the graph approaches the x-axis from below at the left extreme. When x is positive and numerically large, y is positive and approaching zero, so the graph approaches the x-axis from above at the right extreme. All of these features are illustrated in Figure 5a below to the left. Figure 5b below to the right shows our final sketch. y y x x = -4 x x=3 x = -4 Figure 5a x=3 Figure 5b Page 10 of 12 Graph Sketching David W. Sabo (2000) Example 6: Sketch the graph of the function y 3 x 5 2x 7 . 3 5 Solution Step 1: The derivative of this function is y 48x 13 3x 5 2x 7 2 4 Setting y' = 0 results in an equation that has three solutions: x = -5/3 -1.667, x = 13/48 0.271, and x = 3.5. There are no values of x satisfying condition 2 of the increasing/decreasing analysis, so there are just three values of x where y' may change sign. Thus we need to examine four intervals along the x-axis: interval x < -1.667 -1.667 < x < 0.271 0.271 < x < 3.5 x > 3.5 test value (x) -2 0 1 4 y'(test value) -1595869 (negative) -780325 (negative) 1400000 (positive) 51731 (positive) on this interval, y is … decreasing decreasing increasing increasing The values are large here, but that's no problem since we can sketch our vertical scale appropriately. Step 2: There are three values of x making y' = 0, each of which may be a local minimum or a local maximum (or neither). x -1.667 gives y = 0. However, since the graph is decreasing both to the left and to the right of this point, it is neither a local minimum or a local maximum. It is just a point at which the graph levels out and then resumes decreasing. x 0.271 gives y -2.206 x 106. Since the graph is decreasing to the left of this point and increasing to the right of this point, it must be a local minimum. x = 3.5 gives y = 0. However, the graph is increasing both to the left and to the right of this point, so it is neither a local minimum or a local maximum. It is just a point at which the graph levels out and then resumes increasing. Step 3: From Step 1, we know that there are no vertical asymptotes in this graph. Step 4: Substituting x = 0 into the formula for y gives y = -2,100,875, the coordinate of the vertical intercept of the graph. Substituting y = 0 into its formula results in an equation with two solutions: x = -5/3 and x = 3.5, the coordinates of the two horizontal intercepts of the graph. Step 5: For numerically very large values of x, y 864x8, which will increase rapidly, rising to + as x . Thus, to the extreme right and left, the graph rises rapidly to +. These five sets of clues to the shape of the graph are displayed in Figure 6a, on the left at the top of the next page. Because of the lack of space, we haven't displayed the vertical scale explicitly. The two hash marks on the vertical scale correspond to 1,000,000, respectively. As well, because the vertical intercept is so close to the local minimum on the scale of the sketch over the page, we haven't sketched it in in Figure 6a. David W. Sabo (2000) Graph Sketching Page 11 of 12 y y 2 2 -2 4 x -2 4 x x = -5/3 x = 3.5 x = 0.271 x = -5/3 x = 3.5 x = 0.271 Figure 7a Figure 6b Other Information Sometimes Used in Graph Sketching In the method presented above, and the examples illustrating that method, we relied on five types of information to determine the major features of the graph being sketched. Textbooks often mention several other types of information as useful in sketching graphs. Some of the more common are: i) The sign of the second derivative distinguishes between regions of the graph which are concave upwards and regions of the graph which are concave downwards. You would have to go through an analysis similar to our increasing/decreasing analysis, only using the formula for the second derivative. The points at which the second derivative is zero, are called points of inflection, and some books recommend noting these points in the sketch. The direction of concavity of the graph can be deduced from the pattern of increasing/ decreasing intervals, however. In addition, the second derivative is often a much more complicated formula than the first derivative. For these reasons, we do not believe that analyzing the second derivative repays the effort expended with additional significant useful information about the graph. ii) The graphs of some functions have an obvious symmetry, which can be predicted by noting whether or not the formula for the function changes or does not change when x is replaced by -x and/or y is replaced by -y. We noted a few examples of symmetry the earlier document on the shapes of graphs of functions and their derivatives. When symmetry is present, it can be used as a way to verify that the sketch obtained without taking it into account is correct. However, since relatively few formulas have symmetry with respect to the x-axis or the origin, this analysis is not often helpful. iii) In the examples we've looked at, the only sorts of points at which a graph may not have existed were points where a division by zero occurs in the formula for y. These points correspond to gaps in the graph, and vertical asymptotes. Of course, there are other mathematical features of some formulas that may cause gaps in a graph, or even large intervals along the x-axis for which the graph does not exist. For instance, the graph of a formula which involves a square root will only exist for those values of x for which the expression inside the square root is non-negative. This sort of restriction in the domain of the function being sketched must, of course, be taken into account. Page 12 of 12 Graph Sketching David W. Sabo (2000)