>

WORKSHEET 6

>

Sketching Graphs of Functions

>

In this worksheet we will apply the ability of MapleV to find limits, derivatives and zero's to discuss graphs of functions in a systematic way.

>

1. Example 1

Consider the function

>

> f:=x->x^3-5*x^2 + 1;

>

1.1. Asymptotes

For a vertical asymptote, the function must tend to infinity for a finite value of [Maple Math] . The function [Maple Math] will only tend to infinity when the value [Maple Math] itself tends to infinity. So there is no vertical asymptote. To have a horizontal asymptote, the limit for [Maple Math] going to infinity must be finite. Again, this is not the case:

>

> limit(f(x),x=infinity);limit(f(x),x=-infinity);

>

Therefore, there are no horizontal asymptotes. To have an oblique asymptote, one expects the function to behave like a line ( [Maple Math] ~ [Maple Math] ) for very large values of [Maple Math] . If this is the case, the limit of [Maple Math] for large values of [Maple Math] must be finite (and then it yields the slope [Maple Math] ):

>

> limit(f(x)/x,x=infinity);

> limit(f(x)/x,x=-infinity);

>

So there are also no oblique asymptotes.

1.2. Special points

The zeros can be found using fsolve() :

>

> fsolve(f(x)=0);

>

In this case, we know there are at most three zeros ( [Maple Math] is a polynomial of order three) so that we have obtained all zeros. The next step is to locate the stationary points and the points of inflexion:

>

> df:=D(f);ddf:=D(df);

> fsolve(df(x)=0);

> fsolve(ddf(x)=0);

>

Again, we are sure here that we have found all zeros. In order to decide whether the zeros of the first derivative do indeed correspond to extrema or that the zeros of the second derivative do indeed correspond to points of inflexion, we need to analyse the sign of the derivative and the second derivative in each subregion bounded by its zeros. This can be done by evaluating [Maple Math] and [Maple Math] in a few points. Since MapleV is capable of providing the graph, one can also plot the graph to read off the sign:

>

> plot(f,-4..8);

> plot(df,-4..8);

> plot(ddf,-4..8);

>

Or you can make the composite plot containing the information of all three functions:

>

> plot({f,df,ddf},-4..8);

1.3. Summary

We can now derive the major properties of the graph of the function [Maple Math] . In your printed worksheet you'll find a schematic summary of the zeros and sign of the function, its derivative and second order derivative and finally the interpretation of this data.

>

This information can be sketched. When doing so, we do not bother about function evaluations, but are merely concerned with indicating the essential properties like increase/decrease, concave upwards/downwards, zeros, extrema and points of inflexion. If asymptotes exist, these are indicated on the sketch as well. A sketch for this example is given in the printed notes. As you can see, no attempt is made to scale the function exactly, so that all features for small values of [Maple Math] are clearly recognised.

1.4 Exercise

Now analyse the function [Maple Math] . First collect the information in your lab book. Then fill in the table on the answer sheet and make a sketch of the properties of this graph (Question 1!) .

>

>

>

>

>

>

>

>

>

>

>

2. Example 2

>

In the previous example, there were no complications: no asymptotes, a well defined number of zeros, ... Sometimes the graph is not as easy understood and plotting it may often not be sufficient to describe it completely.

> restart;

Given is the function

>

> g:=x->(x+2)/(3+(x^2+1)^3);

>

2.1. Asymptotes

Again it should be clear that there are no vertical asymptotes. The limit for large values of x is however finite:

>

> limit(g(x),x=infinity);

> limit(g(x),x=-infinity);

>

So the line with equation y=0 is a horizontal asymptote for both very large positive values of x and very large negative values of x. The existence of a horizontal asymptote for both large positive and negative values of x excludes the possibility of an oblique asymptote.

>

2.2. Special points

The first and second derivatives can easily be found:

>

> dg:=D(g);

> ddg:=D(dg);

>

We can calculate the zeros of g, dg and ddg:

>

> fsolve(g(x)=0);

>

This is indeed the only zero of the function g (as can be read off from its prescription!)

>

> fsolve(dg(x)=0);

> plot(dg,-5..5,-0.05..0.05);

>

The plot indicates that in addition there must be at least one further zero and possibly another for x>2. We can zoom in on this region to check this:

>

> plot(dg,2..7,-0.01..0.01);

>

which seems to suggest that there are no further zeros. One can not be 100% certain, using plots, that one has obtained all zeros. But by putting together all available information, one can obtain a certain level of confidence in the result. First find the one missing zero:

>

> fsolve(dg(x)=0,x=-3..0);

>

we can then try to simplify the prescription of dg:

>

> dg1:=simplify(dg(x));

>

Any zeros of dg must be roots of the numerator

>

> dg2:=numer(dg1);

> plot(dg2,x=-3..3,y=-1000..200);

> plot(dg2,x=-10..10);

> fsolve(dg2=0,x);

>

We also know that the number of real zeros of a polynomial of degree 6 with real coefficients is either 0, 2, 4 or 6. So there is definitely not just one extra zero for x>2. All information therefore strongly suggests that the two zeros found are the only ones.

>

Now consider the second order derivative:

>

> fsolve(ddg(x)=0,x=0..10);

> plot(ddg,-5..5);

> fsolve(ddg(x)=0,x=-1..0);

> fsolve(ddg(x)=0,x=-3..-1);

> fsolve(ddg(x)=0,x=1..10);

> plot(ddg,1..10);

>

Let us again simplify the expression for ddg(x):

>

> ddg1:=simplify(ddg(x));

> ddg2:=numer(ddg1);

> fsolve(ddg2=0);

> plot(ddg2,x=1..5);

> plot(ddg2,x=1..3);

>

In this case the numerator has an odd degree and therefore we expect an odd number of real roots. All indications are that we actually found all roots. The sign of the function, its derivative and second order derivative can again be determined from the composite plot:

>

> plot({g,dg,ddg},-3..3);

> plot({g,dg,ddg},-3..-1.99,-0.01..0.01);

2.3. Summary

>

Again, the printed worksheet contains a summary of all results and their interpretation. Notice how difficult it is to realise the existence of the minimum near [Maple Math] from the graph alone. Yet it should be clear that when [Maple Math] has a zero at [Maple Math] , the graph must have both a minimum (where [Maple Math] is negative) and a maximum (where [Maple Math] is positive) so that for large (positive and negative) values of [Maple Math] , the graph is again very close to zero! The information in the table is also sketched.

>

2.4. Exercise

Now consider the function [Maple Math]

>

> g:=x->(2.3*x^3+5*x^2-x-0.5)*(x-exp(x))/(x^3+2);

> fsolve(x^3+2);

>

This function clearly has a vertical asymptote at [Maple Math] ... The limit of the function for large values of [Maple Math] is infinite so there is no horizontal asymptote. But the limit of [Maple Math] is finite for large negative values of [Maple Math] :

>

> limit(g(x),x=infinity);

> limit(g(x),x=-infinity);

> limit(g(x)/x,x=infinity);

> limit(g(x)/x,x=-infinity);

>

so that there exists an oblique asymptote with slope [Maple Math] . The equation of the oblique asymptote can in this case be calculated by evaluating the limit:

>

> limit(g(x)-2.3*x,x=-infinity);

>

So [Maple Math] is an oblique asymptote for the function [Maple Math] . Now complete the table on the answer sheet with the necessary details, i,.e. find zeros, extrema and points of inflexion, and sketch the information in the table. The vertical asymptote has to be used in the table. You can use the symbol | to indicate what is happening at [Maple Math] (Question 2!) .

>

>

>

>

>

>

>

>

>

>

>

>

>

>

3. Example 3

The last example concerns the function

>

> h:=x->sinh(x)/sin(x) - x^2;

>

First notice that the function is even, therefore, it is symmetric with respect to the [Maple Math] -axis and we can limit our investigation to positive values of [Maple Math] .

3.1. Asymptotes

>

The function is not defined whenever [Maple Math] , or for [Maple Math] (with [Maple Math] an integer). There are thus an infinite number of vertical asymptotes. But there is one exception! At [Maple Math] , [Maple Math] also becomes zero, and the limit is given by

>

> limit(h(x),x=0);

>

This means that at [Maple Math] , there is no vertical asymptote. There is no horizontal asymtote:

>

> limit(h(x),x=infinity);

>

An oblique asymptote, i.e. a line [Maple Math] , only exists when the limit of [Maple Math] is finite:

>

> limit((h(x)/x),x=infinity);

>

So there are no oblique asymptotes.

>

3.2. Special points

Because there are an infinite number of vertical asymptotes, a full description becomes rather tedious. Let us therefore concentrate on the interval [Maple Math] . First we look for the zeros:

>

> fsolve(h(x)=0,x=0..8);

> plot(h,0..Pi,-2..8);

> fsolve(h(x)=0,x=1..2);

>

Because of the symmetry, corresponding zeros should be found for negative values of x:

>

> fsolve(h(x)=0,x=-3..-2);

> fsolve(h(x)=0,x=-2..-1);

>

The symmetry with respect to the y-axis is clearly illustrated here. Let us also scan the other intervals (for positive values of x):

>

> fsolve(h(x)=0,x=Pi..2*Pi);

> plot(h,Pi..2*Pi,-1000..0);

> plot(h,2*Pi..8,0..10000);

>

Here, the value of the function increases rapidly with x. But no zeros are found outside the interval [Maple Math] . Let us now consider the first derivative:

>

> dh:=D(h);

> fsolve(dh(x)=0,x=0..Pi);

> plot(dh,0..Pi,-10..10);

> fsolve(dh(x)=0,x=-1..1);

> dh(0);

>

There seems to be a zero at [Maple Math] , but the MapleV function fsolve() is confused by the apparent division by zero. A straightforward evaluation fails for the same reason. Let us use the function limit() to see what the value of [Maple Math] at [Maple Math] is:

>

> limit(dh(x),x=0);

>

So there are three zeros in the interval [Maple Math] : -1.7446..., 0 and 1.7446... Then check the other intervals:

>

> fsolve(dh(x)=0,x=Pi..2*Pi);

> plot(dh,Pi..2*Pi,-10..10);

> fsolve(dh(x)=0,x=2*Pi..8);

> plot(dh,2*Pi..8,-100..100);

>

Then we have to analyse the second derivative:

>

> ddh:=D(dh);

> fsolve(ddh(x)=0,x=0..Pi);

> plot(ddh,0..Pi,-10..10);

>

So there seem to be only two zeros in the interval [Maple Math] : -1.1404... and 1.1404... .Then consider the other intervals:

>

> fsolve(ddh(x)=0,x=Pi..2*Pi);

> plot(ddh,Pi..2*Pi,-1000..0);

> fsolve(ddh(x)=0,x=2*Pi..8);

> plot(ddh,2*Pi..8,0..10000);

>

So it seems there are no zeros outside the interval [Maple Math] . One can study both derivatives further by simplifying their expressions:

>

> dh1:=simplify(dh(x));

> dh2:=numer(dh1);

> plot(dh2,x=0..8);

> plot(dh2,x=0..4);

> ddh1:=simplify(ddh(x));

> ddh2:=numer(ddh1);

> plot(ddh2,x=0..8);

> plot(ddh2,x=0..3);

>

Notice that the singularity suggested by the [Maple Math] term in the second derivative near [Maple Math] is only apparent:

>

> limit(ddh1,x=0);

>

This also confirms that the apparent zero in the numerator does not lead to a zero for [Maple Math] !

3.3. Summary

>

We can now summarise the results, as is done on the typed worksheet. A sketch of this information is also given there. Notice that here again, it is difficult to envisage the nature of the graph by just using the MapleV plot facility.

>

3.4. Exercise

Finally, discuss the graph of the function [Maple Math] Put the table and sketch in your lab book. But first determine the domain of this function, the asymptotes and the special points and write them on the answer sheet (Question 3!) .

>

>

>

>

>

>

>

>

>

>

4. Exercises on derivatives

On your worksheet is a list of functions which you should be able to differentiate by hand. First try to find the derivative by hand and write the result in your lab book. Then check your result using MapleV, which typically requires the following sequence of commands:

>

> f:=x->....

> df:=D(f);

> simplify(df(x));

>

>

>

>

>

>