Plotting 215 problem 01.mws

1. Plotting Inverse trig functions.

To plot graphs of functions in Maple, one can either identify the function by the expression which defines it, or one can define the function in Maple, and then use the function name in the plot command. For example, if f(x) = 3*x^2+2*x-1 , we can plot it as follows:

> plot(3*x^2+2*x-1,x=-3..2);

[Maple Plot]

Notice that the Maple command ends in a semicolon, as all Maple commands do, and that multiplication is indicated by a star, not simply by juxtaposition. The -3 .. 2 represents the domain on which we plot the function. Both domains and ranges are indicated to Maple in this manner. Another way to plot this same function on the same domain is to first define a function as follows:

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

f := proc (x) options operator, arrow; 3*x^2+2*x-1 ...

Then one can plot the function as follows.

> plot(f,-3..2);

[Maple Plot]

Notice that you do not tell Maple a variable name in giving the domain, as you need to do when plotting an expression.  We can evaluate the function in Maple in a similar manner as evaluating functions in mathematical notation. For example, to compute f(3) , we just type in:

> f(3);

32

If you have a function which is given by an expression, you can evaluate it at a certain input without formally defining a function in Maple as follows:

> subs(x=3,3*x^2+2*x-1);

32

The reader will note that it is much easier to evaluate functions if they are defined. Maple also has many built in, or predefined functions, like the trigonometric and inverse trigonometric functions. For example,

> sin(Pi/2);

1

> arcsin(1);

1/2*Pi

Notice that in Maple, Pi, represents Pi . If you type in pi, Maple will print it as Pi , but it will not represent the constant Pi .  Let us plot both the sine and the arcsin on the same graph.

> plot([sin,arcsin]);

[Maple Plot]

The plot of the arcsin in green does not look very attractive. By restricting the domain and range, we can get a much nicer picture.

> plot([sin,arcsin],-Pi/2..Pi/2,-Pi/2..Pi/2,color=[red,blue]);

[Maple Plot]

Now you can clearly determine that the graph of the sin function is the one in red, while the graph of the inverse sine function is in blue.

Submission:

(a) Plot the secant and the arcsecant on the same graph, so that the reader can get a good impression of what each of the graphs looks like, and which graph is which. Then explain what the domain and range of the arcsecant function is, and how you can see that from the graph.

(b) Plot the tangent and arctangent on the same graph, so that the reader can get a good impression of what each of the graphs looks like, and which graph is which. Then explain what the domain and range of the arctangent function is, and how you can see that from the graph .

Submission worksheet: