Homework 11

Homework 11
Maple's function notation is great for functions of one variable, but it can be confusing when you
have more than one variable. Let's enter our profit function as an expression this time.
Remember that Profit = Revenue - Costs
(1)
This is nice, but we might want to distribute the multiplication and collect like terms in order to
write our profit as a polynomial expression. You can tell Maple to expand this expression by
using the expand command.
(2)
To calculate the derivative of an expression in Maple, you use the diff command. The diff
command calculates regular or partial derivatives, so it works in every situation! To calculate the
derivative of
with respect to some
, simply enter
into
Maple.
Let's calculate
and assign it to a variable name.
(3)
We could do the same thing for
, but there is another way to calculate derivatives in Maple.
Do you see the palettes on the left? Click on the Expression palette to open it if it is not open.
This palette contains templates for many common expressions, including derivatives. You
should see a template that looks like a partial derivative (it should be in the same location on
your computer, the 3rd icon in the second row).
To use this derivative template, you simply
1. Put your cursor where you want the derivative to be place. For us, that means we need to
set up a variable name, first, to put the derivative in a new variable.
2. Click on the template.
3. Change the appropriate features of the template. You'll know what to change by looking at
what is not in black.
When you first click on the partial derivative template, the in the denominator will be
highlighted automatically. Simply type what variable should be there. Next, if you press Tab,
the cursor will move and highlight the next piece in the template, the . Again, type what
expression should be there.
If you use the partial derivative template, your command should look like this
(4)
Now, we want to solve the equations
and
together. To get Maple to solve
multiple equatoins together (a system of equations), we simply put all the equations inside curly
braces (
) in the solve command. Remember to separate the equations from one another with
commas.
(5)
Now that we know where our maximum profit occurs, what is our maximum profit? We cannot
simply type
, because is a Maple expression not a Maple function.
To substitute values into an expression, you use the
command. The syntax is
For example, we could type
to calculate our maximum profit in this
problem. Notice, though, that the output from the solve command is exactly what we would type
in for the first argument of our subs command. That means we can use the % command!
27980
(6)
All of the major calculations in Homework 11 have now been performed with 6 simple lines in
Maple. If you wanted to make a change to the profit function and re-do these calculations, all
you have to do is change your profit function and then hit Enter (or Return) multiple times to rerun every line and calculate all the values again using the new profit function.
If you would like to visualize the profit function, there are two easy ways to do this. First is the
function.
The second is the
command in the
package. Note that the colon at the end of
the line tells Maple to execute the command but not to output anything.
1600
1400
1200
1000
y
800
600
400
200
0
0
200
400
600
x
800
1000