Dr. Roger Kraft: New Applications
https://www.maplesoft.com/applications/author.aspx?mid=287
en-us2022 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemMon, 24 Jan 2022 08:00:17 GMTMon, 24 Jan 2022 08:00:17 GMTNew applications published by Dr. Roger Krafthttps://www.maplesoft.com/images/Application_center_hp.jpgDr. Roger Kraft: New Applications
https://www.maplesoft.com/applications/author.aspx?mid=287
Maple Programming: 1.1 & 1.2: Functions in Mathematics
https://www.maplesoft.com/applications/view.aspx?SID=1518&ref=Feed
Functions play a major role in Mathematics so it is important to know how to work with them in Maple. Understanding functions in Maple is also a good starting point for our discussions about Maple programming.
We quickly review here the definition of a mathematical function.<img src="https://www.maplesoft.com/view.aspx?si=1518/programming.gif" alt="Maple Programming: 1.1 & 1.2: Functions in Mathematics" style="max-width: 25%;" align="left"/>Functions play a major role in Mathematics so it is important to know how to work with them in Maple. Understanding functions in Maple is also a good starting point for our discussions about Maple programming.
We quickly review here the definition of a mathematical function.https://www.maplesoft.com/applications/view.aspx?SID=1518&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 1.3: Functions in Maple
https://www.maplesoft.com/applications/view.aspx?SID=1519&ref=Feed
There are two ways to represent mathematical functions in Maple, as Maple expressions and as Maple functions. These two ways of representing mathematical functions are not equivalent. Each way has it advantages and disadvantages. In this section we review these two representations and in the next section we look at some examples that show how they are not equivalent.<img src="https://www.maplesoft.com/view.aspx?si=1519/programming.gif" alt="Maple Programming: 1.3: Functions in Maple" style="max-width: 25%;" align="left"/>There are two ways to represent mathematical functions in Maple, as Maple expressions and as Maple functions. These two ways of representing mathematical functions are not equivalent. Each way has it advantages and disadvantages. In this section we review these two representations and in the next section we look at some examples that show how they are not equivalent.https://www.maplesoft.com/applications/view.aspx?SID=1519&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 1.4: Expressions vs. functions
https://www.maplesoft.com/applications/view.aspx?SID=1520&ref=Feed
The following examples are meant to show that there are still a lot of subtle things to learn about variables and functions and how Maple handles them.<img src="https://www.maplesoft.com/view.aspx?si=1520/programming.gif" alt="Maple Programming: 1.4: Expressions vs. functions" style="max-width: 25%;" align="left"/>The following examples are meant to show that there are still a lot of subtle things to learn about variables and functions and how Maple handles them.https://www.maplesoft.com/applications/view.aspx?SID=1520&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 1.5: Working with expressions and Maple functions
https://www.maplesoft.com/applications/view.aspx?SID=1521&ref=Feed
There are many operations that you might want to perform on a function, for example, graph it, evaluate it, differentiate or integrate it, compose it with another function, etc. How you do these operations in Maple depends on how you choose to represent the function in Maple, as either a Maple expression or as a Maple function. In this section we review these ideas by looking at a number of examples.<img src="https://www.maplesoft.com/view.aspx?si=1521/programming.gif" alt="Maple Programming: 1.5: Working with expressions and Maple functions" style="max-width: 25%;" align="left"/>There are many operations that you might want to perform on a function, for example, graph it, evaluate it, differentiate or integrate it, compose it with another function, etc. How you do these operations in Maple depends on how you choose to represent the function in Maple, as either a Maple expression or as a Maple function. In this section we review these ideas by looking at a number of examples.https://www.maplesoft.com/applications/view.aspx?SID=1521&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 1.6: Anonymous functions and expressions
https://www.maplesoft.com/applications/view.aspx?SID=1522&ref=Feed
We can give functions and expressions names, and this of course makes it easier to work with them. But we do not have to give a function or expression a name in order to work with it.<img src="https://www.maplesoft.com/view.aspx?si=1522/programming.gif" alt="Maple Programming: 1.6: Anonymous functions and expressions" style="max-width: 25%;" align="left"/>We can give functions and expressions names, and this of course makes it easier to work with them. But we do not have to give a function or expression a name in order to work with it.https://www.maplesoft.com/applications/view.aspx?SID=1522&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 1.7: Functions that return a function
https://www.maplesoft.com/applications/view.aspx?SID=1523&ref=Feed
It is possible to do some unusual things with definitions of Maple functions. For example, we can define a function whose return value is another function.<img src="https://www.maplesoft.com/view.aspx?si=1523/programming.gif" alt="Maple Programming: 1.7: Functions that return a function" style="max-width: 25%;" align="left"/>It is possible to do some unusual things with definitions of Maple functions. For example, we can define a function whose return value is another function.https://www.maplesoft.com/applications/view.aspx?SID=1523&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.1 & 2.2: Full evaluation
https://www.maplesoft.com/applications/view.aspx?SID=1524&ref=Feed
This chapter begins our discussions of some of the details of Maple's inner workings. Here we look at Maple's evaluation rules for variables, expressions, and functions.
In this section, you will learn about full evaluation.<img src="https://www.maplesoft.com/view.aspx?si=1524/programming.gif" alt="Maple Programming: 2.1 & 2.2: Full evaluation" style="max-width: 25%;" align="left"/>This chapter begins our discussions of some of the details of Maple's inner workings. Here we look at Maple's evaluation rules for variables, expressions, and functions.
In this section, you will learn about full evaluation.https://www.maplesoft.com/applications/view.aspx?SID=1524&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.3: Levels of evaluation
https://www.maplesoft.com/applications/view.aspx?SID=1525&ref=Feed
In this section, you will learn about levels of evaluation.<img src="https://www.maplesoft.com/view.aspx?si=1525/programming.gif" alt="Maple Programming: 2.3: Levels of evaluation" style="max-width: 25%;" align="left"/>In this section, you will learn about levels of evaluation.https://www.maplesoft.com/applications/view.aspx?SID=1525&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.4: Delayed evaluation
https://www.maplesoft.com/applications/view.aspx?SID=1526&ref=Feed
Sometimes it is necessary to prevent Maple from evaluating a name or an expression that, because of the rule of full evaluation, would otherwise be evaluated. In this section we show that the right-quote character is used in Maple to prevent, or delay, evaluation.<img src="https://www.maplesoft.com/view.aspx?si=1526/programming.gif" alt="Maple Programming: 2.4: Delayed evaluation" style="max-width: 25%;" align="left"/>Sometimes it is necessary to prevent Maple from evaluating a name or an expression that, because of the rule of full evaluation, would otherwise be evaluated. In this section we show that the right-quote character is used in Maple to prevent, or delay, evaluation.https://www.maplesoft.com/applications/view.aspx?SID=1526&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.5: A no evaluation rule
https://www.maplesoft.com/applications/view.aspx?SID=1527&ref=Feed
We have made the claim that Maple uses full evaluation most of the time. You may have noticed already one place where Maple does not use full evaluation. In this section, you will learn about a no evaluation rule<img src="https://www.maplesoft.com/view.aspx?si=1527/programming.gif" alt="Maple Programming: 2.5: A no evaluation rule" style="max-width: 25%;" align="left"/>We have made the claim that Maple uses full evaluation most of the time. You may have noticed already one place where Maple does not use full evaluation. In this section, you will learn about a no evaluation rulehttps://www.maplesoft.com/applications/view.aspx?SID=1527&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.6: Last name evaluation
https://www.maplesoft.com/applications/view.aspx?SID=1528&ref=Feed
Maple uses the full evaluation rule most of the time, but as we have already seen, there are exceptions to this rule. Three exceptions that we have seen so far are delayed evaluation (i.e. using right quotes), forcing certain levels of evaluation with the eval command, and not evaluating names on the left hand side of an assignment operator. Another exception to the full evaluation rule is the last name evaluation rule that is used for the names of tables, arrays, procedures, and Maple functions. We have not discussed tables, arrays, and procedures yet, so for now we will only use Maple functions as examples for the last name evaluation rule.<img src="https://www.maplesoft.com/view.aspx?si=1528/programming.gif" alt="Maple Programming: 2.6: Last name evaluation" style="max-width: 25%;" align="left"/>Maple uses the full evaluation rule most of the time, but as we have already seen, there are exceptions to this rule. Three exceptions that we have seen so far are delayed evaluation (i.e. using right quotes), forcing certain levels of evaluation with the eval command, and not evaluating names on the left hand side of an assignment operator. Another exception to the full evaluation rule is the last name evaluation rule that is used for the names of tables, arrays, procedures, and Maple functions. We have not discussed tables, arrays, and procedures yet, so for now we will only use Maple functions as examples for the last name evaluation rule.https://www.maplesoft.com/applications/view.aspx?SID=1528&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.7: Evaluating function calls
https://www.maplesoft.com/applications/view.aspx?SID=1529&ref=Feed
In this section, you will learn about evaluating function calls.<img src="https://www.maplesoft.com/view.aspx?si=1529/programming.gif" alt="Maple Programming: 2.7: Evaluating function calls" style="max-width: 25%;" align="left"/>In this section, you will learn about evaluating function calls.https://www.maplesoft.com/applications/view.aspx?SID=1529&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.8: Evaluating function definitions
https://www.maplesoft.com/applications/view.aspx?SID=1530&ref=Feed
In the last section we emphasized how Maple evaluates function calls. Here we look at how Maple evaluates a function's definition. We will see that this also gives us more information about the evaluation of function calls.<img src="https://www.maplesoft.com/view.aspx?si=1530/programming.gif" alt="Maple Programming: 2.8: Evaluating function definitions" style="max-width: 25%;" align="left"/>In the last section we emphasized how Maple evaluates function calls. Here we look at how Maple evaluates a function's definition. We will see that this also gives us more information about the evaluation of function calls.https://www.maplesoft.com/applications/view.aspx?SID=1530&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 2.9: Evaluating concatenated names
https://www.maplesoft.com/applications/view.aspx?SID=1531&ref=Feed
In a previous section we looked at what Maple does with the left hand side of an assignment operator and we said that Maple does not evaluate any names that it finds there. But this is not entirely true. If there is a concatenated or indexed name on the left hand side of an assignment operator, then Maple must do some kind of evaluation. In this section we look at Maple's rules for evaluating concatenated names.<img src="https://www.maplesoft.com/view.aspx?si=1531/programming.gif" alt="Maple Programming: 2.9: Evaluating concatenated names" style="max-width: 25%;" align="left"/>In a previous section we looked at what Maple does with the left hand side of an assignment operator and we said that Maple does not evaluate any names that it finds there. But this is not entirely true. If there is a concatenated or indexed name on the left hand side of an assignment operator, then Maple must do some kind of evaluation. In this section we look at Maple's rules for evaluating concatenated names.https://www.maplesoft.com/applications/view.aspx?SID=1531&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple programming: 2.10: Evaluating indexed names
https://www.maplesoft.com/applications/view.aspx?SID=1532&ref=Feed
In this section we look at Maple's rules for evaluating indexed names.<img src="https://www.maplesoft.com/view.aspx?si=1532/programming.gif" alt="Maple programming: 2.10: Evaluating indexed names" style="max-width: 25%;" align="left"/>In this section we look at Maple's rules for evaluating indexed names.https://www.maplesoft.com/applications/view.aspx?SID=1532&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 3.1 & 3.2: Basic data structures in Maple
https://www.maplesoft.com/applications/view.aspx?SID=1533&ref=Feed
We have mentioned many times that Maple makes a distinction between expressions and functions. Expressions are what computer scientists call data structures and functions are what they call procedures. To put it very briefly, a data structure is a collection of information and a procedure is a collection of instructions. In order to explain this difference better, in this and the next chapter we look at some elementary examples of data structures and procedures in Maple.
To really understand what makes expressions and functions different in Maple we need to get a sense of what data structures and procedures are. This section is a very basic introduction to how Maple handles data structures.<img src="https://www.maplesoft.com/view.aspx?si=1533/programming.gif" alt="Maple Programming: 3.1 & 3.2: Basic data structures in Maple" style="max-width: 25%;" align="left"/>We have mentioned many times that Maple makes a distinction between expressions and functions. Expressions are what computer scientists call data structures and functions are what they call procedures. To put it very briefly, a data structure is a collection of information and a procedure is a collection of instructions. In order to explain this difference better, in this and the next chapter we look at some elementary examples of data structures and procedures in Maple.
To really understand what makes expressions and functions different in Maple we need to get a sense of what data structures and procedures are. This section is a very basic introduction to how Maple handles data structures.https://www.maplesoft.com/applications/view.aspx?SID=1533&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 3.3: Data vs. data structure vs. data type
https://www.maplesoft.com/applications/view.aspx?SID=1534&ref=Feed
Here is an example that shows that a data structure is more than just the data contained in it, but it also includes the way the data is organized or interpreted (which is expressed as the data structure's data type).<img src="https://www.maplesoft.com/view.aspx?si=1534/programming.gif" alt="Maple Programming: 3.3: Data vs. data structure vs. data type" style="max-width: 25%;" align="left"/>Here is an example that shows that a data structure is more than just the data contained in it, but it also includes the way the data is organized or interpreted (which is expressed as the data structure's data type).https://www.maplesoft.com/applications/view.aspx?SID=1534&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 3.4: Data types in Mathematics
https://www.maplesoft.com/applications/view.aspx?SID=1536&ref=Feed
This section discusses data types in Mathematics.<img src="https://www.maplesoft.com/view.aspx?si=1536/programming.gif" alt="Maple Programming: 3.4: Data types in Mathematics" style="max-width: 25%;" align="left"/>This section discusses data types in Mathematics.https://www.maplesoft.com/applications/view.aspx?SID=1536&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 3.5: Nested data structures
https://www.maplesoft.com/applications/view.aspx?SID=1537&ref=Feed
This section will discuss nested data structures.<img src="https://www.maplesoft.com/view.aspx?si=1537/programming.gif" alt="Maple Programming: 3.5: Nested data structures" style="max-width: 25%;" align="left"/>This section will discuss nested data structures.https://www.maplesoft.com/applications/view.aspx?SID=1537&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger KraftMaple Programming: 3.6: Expressions as data structures
https://www.maplesoft.com/applications/view.aspx?SID=1538&ref=Feed
Now that we have looked at some elementary data types and data structures, let us return to the idea of an expression. We have said several times that an expression is a data structure. So if it is a data structure, what is its data type?<img src="https://www.maplesoft.com/view.aspx?si=1538/programming.gif" alt="Maple Programming: 3.6: Expressions as data structures" style="max-width: 25%;" align="left"/>Now that we have looked at some elementary data types and data structures, let us return to the idea of an expression. We have said several times that an expression is a data structure. So if it is a data structure, what is its data type?https://www.maplesoft.com/applications/view.aspx?SID=1538&ref=FeedWed, 01 Oct 2003 00:00:00 ZDr. Roger KraftDr. Roger Kraft