# Maple Worksheet 1

Some things to try in MAPLE:

1. Put your cursor between the bracket and the prompt to type in text. This is good for labeling your work. Then hit Enter and the prompt will reappear.

2. Try some simple arithmetic. For example, compute
4×5+4×2+3×2+3×2.

Use * for multiplication. After the expression, put a semicolon “;” and hit
Enter.

Here is my example:

**> 4*5+4*2+3*2+3*2;
**Try some of your own.

Now try to find by typing

**> 3+sqrt(15);**

If we want the decimal form, type

**> evalf(%);**The % means the previous line.

We saw the function .
To work with this function, we need to define it.

**> f:=x->7*x+48/x;**

Don’t forget to hit enter.

Now we can use it. For example, to find f(3) simply type it in, then ; and
Enter.

**> f(3);**

Now find f(2),f(4),f(6) Find f(π) by typing

**> f(pi);
> f(Pi);**

Notice that they look the same. However maple thinks pi is a Greek letter but Pi is a number. To find this number as a decimal, type

**>evalf(Pi);**

Don’t forget the semicolon. Now try

**> evalf(f(Pi));**

To get a picture of your function, type

**> plot(f(x),x);**

Not such a nice picture, but if you look at the axes you
will see why. We are only interested in this function for positive values, say
between 1 and 6, so try **>plot(f(x),x=1..6);**

Looks better. What do you think the minimum is, and for what x should it occur?

Zoom in by trying different values for x. For example, try

**> plot(f(x),x=2..4);**

**Please note that you do not need to retype everything:
just edit.
**Let’s cut to the chase. We want to find the minimum value, and the input for
which it occurs. Of course we are supposed to learn a lot of machinery first,
but why not ask the machine?!

**> minimize(f(x));**

You should not be surprised by the result. However, we
want the minimum value over a small domain, say from 2 to 4. Type

**> minimize(f(x),x=2..4);**

To find the number as a decimal, type

**> evalf(%);**

To find the input that gives the minimum output, type

**>solve(f(x)=8*sqrt(21));**

**Cutting and pasting is easier than retyping.**

Find the number you got as a decimal.

Congratulations, you just solved your first calculus problem without using or
learning any calculus!

Problem 1:

Using maple, define the simple quadratic function
by typing

**> g:=x->x^2-2*x-3;**

Graph this function.

Find minimum value of this function, and the value that produces it. In other
words, find the vertex of the function.

Find the zeros of the function.

Note: you need neither maple nor calculus to solve this problem.

Problem 2:

Define the quadratic function and repeat as
above.