Maple Introduction for Calculus IJohn Bukowski(with thanks to Dr. Cathy Stenson)Notes: All of my classroom demonstrations are available for your use on the P drive at P:\134Academic\134Bukowski\134Calc1\134MapleDemos. There are also numerous files available at P:\134Academic\134Calc1. You should feel free to use these worksheets as models or even cut and paste from them into your own worksheet. The P:\134Academic\134Calc1 folder also contains Maple10Guide.mws, which should also help you with Maple 2016. Maple's own help functions are also very useful. To get help on a particular command, say "plot", type "?plot" at the > prompt and hit Enter. The examples at the bottom of each help page are often the most useful part of the help page.To use this worksheet, hit Enter at all the red commands to execute them.restart;(We'll discuss the "restart" command later in the worksheet.)This worksheet is a brief introduction to the kinds of things you can do with Maple. We'll use it to solve the following problem (which is based on #40 in Section 1.1):The graph of Fahrenheit temperature F as a function of Celsius temperature C is a line. You know that 212F and 100C both represent the temperature at which water boils. Similarly, 32F and 0C both represent water's freezing point.(a) What is the slope of the graph? Note that F will play the role of y and C will play the role of x. We know that slope = change in F / change in C. We can use Maple just like a calculator (provided we remember the semicolon):(212-32)/(100-0);So the line has slope 9/5. If we want this expressed in decimal form (no particular reason we need this now, but in some other problem you may find this useful), we can use the evalf command (the f of evalf stands for "floating point"). The % symbol means "the last value entered".evalf(%);(b) What is the equation of the line?We still need the intercept, but actually we already have it: 0C is 32F. So F = 32 + 9/5 * C.Maple lets you work with this formula in several different ways.FunctionsIn Maple, functions are defined byfunctionname := variable -> formula; or you can think of it as functionname := input -> output; as we have discussed before.Notice that you need to use a * for multiplication.F := C -> 32 + (9/5)*C;(c1) What Fahrenheit temperature corresponds to 20 degrees Celsius?F(20);(c2) What Celsius temperature corresponds to 20 degrees Fahrenheit?The solve command solves equations; we want to know when F(C)=20. What's the second C for? It tells Maple which variable to solve for. Here we only have one variable, so it is obvious, but later we may encounter expressions with more than one variable.solve(F(C)=20,C);evalf(%);(d) What temperature is the same in both Fahrenheit and Celsius? We want to know when F(C)=C, so...solve(F(C)=C,C); Let's check our work.F(-40);solve(F(C)=-40,C);Just to get some practice, let's plot this functionplot(F(C), C=-50..100);Now let's plot it along with the line F=C so that we can confirm our answer to part (d). To make the vertical and horizontal scales equal, click on the plot and then click on the 1:1 button. Now you can see that the line F=C really does have slope 1.plot([F(C),C], C=-50..100);Here's another way to make the vertical and horizontal scales equal: include "scaling=constrained" in your plot statement. You can also use color to help you keep track of which function is which. Since you have listed the two functions in square brackets, Maple will keep track of their order. So use that same order to specify color. The statement color=[blue, orange] will color the first function blue and the second function orange. WARNING: Maple (almost) always interprets symbols in square brackets as ordered lists. Square brackets are not equivalent to parentheses, so don't use them when you are defining a complicated function.plot([F(C),C], C=-50..100, scaling=constrained, color=[blue,orange]);Now we're going to illustrate one of the problems that people often have with Maple. Close this file (but read the end of this paragraph first!) and exit Maple. Then restart Maple, reopen this file, and come back down here. See you soon....Welcome back! Let's continue our work. Find F(10).F(10);Oh no! What happened? Maple hates me and I'll never, never, never finish this assignment! Auugggghhhhh!Here's the deal. Once you exit Maple, it forgets all your commands. When you reopen your file, the commands are still sitting there, but they need to be executed. That means you need to go back and hit "enter" on each of your command lines before Maple can use the functions you've defined. Here's one good way to keep track of what Maple knows. Either before you exit your file or right when you first open it, go to the Edit menu and select "Remove Output" and then "From Worksheet". That removes the blue output from the previous session, so you are not fooled into thinking you have entered a command that you haven't entered this session.Remember that "restart" command at the beginning of the worksheet? That helps you avoid the opposite problem. Maple remembers your commands throughout a session. So at one point you may have set a=10, and then later on you decide you want to use a as a variable again. There are ways to do this (see the various Maple guides), but if you find it easier to start from scratch, just hit enter after the "restart" command. That will clear Maple's memory. This is a good idea if you've gotten muddled and changed your commands so many times that you can't keep track of what's going on.Most of our work will be with functions. However, Maple allows you to handle problems in several different ways. Here's a quick introduction to two more approaches. I won't go through this in class, since I will try to stick with functions, but I am making this available in case you look at other worksheets and want to know what is going on.EquationsFirst we define and name the equation relating F and C. Remember that := is used to define things; the equationF=32 + (9/5)*C now has the name "eq".eq := F = 32 + (9/5)*C;(c1) What Fahrenheit temperature corresponds to 20 degrees Celsius?subs(C=20,eq);(c2) What Celsius temperature corresponds to 20 degrees Fahrenheit?subs(F=20,eq);Let's solve this for C.solve(%,C);evalf(%);(d) What temperature is the same in both Fahrenheit and Celsius? We know we want F=C, so we can substitute that into our equation.subs(F=C,eq);solve(%,C);ExpressionsDefine and name the expression for Fahrenheit in terms of Celsius.Fexpr := 32 + (9/5)*C;(c1) What Fahrenheit temperature corresponds to 20 degrees Celsius?subs(C=20,Fexpr);(c2) What Celsius temperature corresponds to 20 degrees Fahrenheit?solve(Fexpr=20,C);evalf(%);3) What temperature is the same in both Fahrenheit and Celsius? Fexpr;solve(Fexpr=C,C);