Click on each subsection below, read and execute the Maple commands, and do the problems at the end of each one. There is a hyperlink at the top of each subsection called Debugging that will take you to the section at the end of the worksheet that discusses what errors mean and how to fix them.
Execution groups and paragraphs
Sine function,
> sin(Pi/4);
>
The purpose of the text portion is to document what you are doing. Please document your code. I will be glad you did, the grader will be glad you did, and six months from now when you remember that you once solved a problem like the one you just got assigned and you go looking for it, you will be glad you did.
>
You should now be looking at a mess inside the execution group; 1+1 didn't work and you got an error.
Maple will allow you to do more than one calculation inside an execution group. You can do this in two ways: (i) with several commands on a single line separated by semicolons, or (ii) several commands stacked vertically, each with its own >. To get extra >'s, just move the cursor to the left of the first > and hit Enter. Examples that you can execute are displayed below; try them out. Oh, and notice how the # symbol can be used to add brief comment lines in red right on the command line. The rule is that anything after # is a comment
> 1+1;2+2;3+3; # three additions in a row
> 1+1;
> 2+2;
> 3+3;
>
OK, hopefully this is enough to get you around on the window. There are a lot of things that won't be mentioned here, but they are all described in online help and you can find most of them on the toolbar. This might be a good time to take a tour of the toolbar to see what's up there. To begin, click on Help and enable Balloon Help; then move the cursor across each icon to see what each one is about. And for a more thorough introduction to the way the window is managed, click on Help and try the New Users Tour. After you click on the New Users Tour go to the bottom of the introduction page and click on the blue hyperlink called Click here to begin the New Users's Tour , then select item (2), The Worksheet Environment . Oh, and when you want to close a Help screen, use Ctrl-F4 or the X at the upper right-hand corner of the window (in Windows).
Problem 1.1
Make an execution group and document it before the > sign with the phrase:
Add the integers from 1 to 10.
Then build a Maple command line to get the answer to 1+2+3+...+10.
------------------------------------------------------------------------------------
Quick guide to managing the worksheet
This is just a collection of recipes for making the worksheet look like you want it to. I have given you several control sequences here; you can also do these things from the Edit and Insert menus.
Make an execution group:
Ctrl-j makes one after the execution group or paragraph the cursor is in.
Ctrl-k makes one before the execution group paragraph the cursor is in.
Adding another > to an execution group
Use the arrow keys, or the mouse, to move the cursor just to the left of a > already in the group. Hit Enter and another one will appear just above.
Make a paragraph for text inside an execution group
Shift-Ctrl-j makes one after the cursor.
Shift-Ctrl-k makes one before the cursor (you also get one if you left arrow past the < sign and hit Enter)
Slip a paragraph for text between two execution groups
Click on the big [ at the left of the group; it will become a double line; then type Shift-Ctrl-k to get one before, Shift-Ctrl-j to get one after.
Delete a paragraph or execution group
Put the cursor in the paragraph or execution group to be deleted and type Ctrl-Del. To kill everything in the execution group you may have to do this several times.
Enter equations or expressions within text
Click on
on the toolbar (or type
Ctrl-r
) then watch the equation being typed in the window on the toolbar. The syntax for entering typeset mathematics is Maple's own syntax. For instance, to display the integral of the sine function from 0 to 1 you would type this: int(sin(x),x=0..1) but with
Ctrl-r
turned on, like this
. (Highlight this integral expression with the mouse and watch it appear as Maple code on the toolbar.) Hit Enter when it is complete, then click on T on the toolbar (or type
Ctrl-t
) to go back to text mode. On some systems you will need to click on the check mark two buttons to the left of the math insertion window on the tool bar, followed by
Ctrl-t
(or clicking on T).
Split or join execution groups
See the Edit menu on the toolbar.
Remove all of the blue Maple output from the worksheet
See the Edit menu.
Close all of the sections and subsections in a worksheet
See the bottom of the View menu on the toolbar.
Removing the output and closing all of the sections fully restores this book to its original condition.
Other interesting tricks
Explore the toolbar and see what's up there. Of special interest are:
(a) Tile in the Window menu allows you to see the worksheet and do your assignment in side-by-side windows. Cascade under Window overlays them.
(b) You can get bold, italic, and underlined text with B , I, and u on the toolbar.
(c) Use the magnifying glass icons on the toolbar to change the size of the type.
(d) Notice the curvy arrow icons on the toolbar--they undo the last operation and redo the last undo.
(e) The stop sign will kill a calculation that has gone on so long you can't stand it anymore.
Problem 1.2
Open a new worksheet. At the top of the worksheet, above the first execution group, open up some white space and put in a bold title that says Problem 1.2. Below this title, in italics, put your name. Then expand the execution group so that it contains four >'s instead of just one and put comment lines that say "Comment 1", "Comment 2", etc., above each >.
> ?factor;
When you do you will find that this is the wrong command because it does algebra on polynomials. But if you read a bit, and look at the helpful See Also links at the bottom of the page you will see that the command you want is ifactor , so you either go there or use
> ?ifactor;
Now help will tell you that this is just what you want, and you can try
> ifactor(5040);
>
You can find lots of interesting stuff in Maple this way; happy hunting. And remember that the quick way to kill the help windows is with Ctrl-F4.
Problem 1.3
Use online help to find the Maple commands for integrating a function and for taking a derivative of a function.
-----------------------------------------------------------------------
Problem 1.4
Use online help to find the Maple command for taking the second derivative of a function.
------------------------------------------------------------------------
There are several constants pre-loaded in Maple that are useful for physics. They are:
> Pi;I;infinity;
Pi is the number Pi to about as many significant figures as you want. To see its digits, use the Maple command evalf to convert a number to floating point form
> evalf(Pi,100);
and you should be impressed. I is the imaginary unit, i.e.,
; try executing
> sqrt(-5);
Infinity is, of course, not a number, but an idea, and only makes sense in limits. And Maple does the right thing in calculations involving limits, like
> limit(exp(-x),x=infinity);
or
> sum('1/2^n','n'=1..infinity);
>
We will do more of this kind of thing in Chapter 4.
Problem 1.5
Compare the Maple commands cos(pi) and cos(Pi) by trying them in an execution group. Explain why they don't behave the same way. (This issue will be discussed in more detail in the section on variable names).
----------------------------------------------------
Problem 1.6
Calculate the complex division problem (3+4i)/(7-6i) in a Maple execution group.
----------------------------------------------------
Problem 1.7
Calculate the limit, as x approaches infinity, of the expression (3-5x)/(7+3x) using a Maple execution group.
----------------------------------------------------
Now let me warn you about a bad habit into which this naming freedom seems to have led your generation of computer users. Here is how some students I have worked with would write Newton's law of universal gravitation in a computer code:
Newtons_Gravitational_Constant*Mass_1*Mass_2/Distance_Between_The_Masses^2
Here is what this would look like in a Maple execution group:
> Newtons_Gravitational_Constant*Mass_1*Mass_2/Distance_Between_The_Masses^2;
> G*m1*m2/r12^2;
>
But Maple has the ability to go even further toward the standard physics style because it has Greek letters! To get them just write out their names in English, as in the example below.
> alpha*beta/delta;
The capital Greek letters are also available, and even though some of them look like English capital letters, they are not the same, as you can see in the example below:
> Alpha*A;Beta+B;Chi/Gamma;
Well, OK; not all of the Greek capital letters are produced this way. Some of them you do this way
> CHI;
You can get all of them by creatively switching between a capital letter first and all capitals. If you persevere you can work in Maple with beautifully typeset equations just like you see in your textbooks. (And if you don't want to memorize their spellings and capitalizations, click on View, Palettes, Symbol Palettes and you will have a table of symbols you can get with the mouse.)
Note that a few are not available for your use:
> gamma:=4;Chi:=3;
Error, attempting to assign to `gamma` which is protected
Error, attempting to assign to `Chi` which is protected
>
These two, and possibly others, are used by the system. It may be possible to unassign them so that they are available for your own use, but I recommend against it. The more you work strictly within the Maple system the better off you will be; or in the language of Sunday afternoon in America, "take what the defense gives you."
Also avoid putting subscripts on variables, even though Maple's typesetting ability will let you do it. For instance you might want to work with the variables
and
which you get by doing this in Maple
> x[1]:=1;x[2]:=2;
They look great, but now watch what happens if you give
a value, then display
> x:=3;
> x[1];
>
I think we can all agree that this is not going to help us do mathematics. So if you want to code
in Maple, call it x1. And as you choose variables, experiment a little with the names and try for elegance and simplicity.
Problem 1.8
Set the variable
to have the value 5/3 and then coax the Maple command
into giving you cos(5/3) as a floating point number.
-----------------------------------------------------------
What can a variable represent?
a=5
would assign to the variable a the value 5. But in Maple the statement
> a=5;
doesn't do assignment at all. Instead it is just the really stupid equation
. Maple is capable of solving this equation and discovering that a is 5, but it is not a statement that assigns a value. In order that Maple be able to work directly with equations (expressions containing the symbol =), the assignment statement has been given a different form. To assign to variable
the value 5 the Maple statement would be
> a:=5;
One of the clearest ways of indicating the difference is to note that the following statement in Maple makes sense:
> Eq:=b=5;
This statement means that the variable
contains the equation
. Here's a less dumb example:
> Eq2:= x^2 + y^2 = R^2;
Well, this probably looks a little strange; how come that 9 is there instead of an x? Well, maybe it isn't, depending on how you got here, but if you get a 9, here's why. In the last section on variable names x was set to 3, and Maple remembers forever. This will bite you over and over. The quickest way to cure it if you don't care about the stuff you have done before is to just restart Maple, like this:
> restart;
Now use the mouse to move the cursor back up to the Eq2 assignment, click on the red text, and it will execute properly. Note that this works even though the restart is below the Eq2:=... . Maple is not like C or Matlab. Order in the worksheet is not what's important--order in time spent at the keyboard is what matters.
So, what are the possible things that a variable can represent? The subsections given below are a partial list of the ones you are most likely to encounter. They are just Maple examples without comment. We will discuss each one in detail sometime during the course. To get a full look at what's possible, use
> ?type
And if you are confused about the type of, say, a variable named a, you can use the Maple command whattype(a).
Problem 1.9
On a clean worksheet use the Maple command b:=a=5 and then use the type command to check the type of b by using the commands type(b,integer), type(b,float), and type(b,equation) . Explain why the results of these three commands make sense to Maple.
--------------------------------------------------------------------------------
The sections below contain examples of the most important data types we will be using in this book.
Complex numbers
Note that
.
> cn1:=(1+3*I)*(5-2*I);
Equations
> Eq1:=sin(x)=x;
> f1:=4./3.;
> Digits:=50;
> f1:=4./3.;
> Digits:=10;
An expression looks like what you would probably call a function, but there is a subtle difference. An expression is a combination of variables and Maple functions like this
> Fn1:=cosh(x^3)/(1+x^2);
The reason it isn't a function is because of what you have to do to evaluate it for a specific value of x: Fn1(x) doesn't work! Instead you have to assign x a value like this
> x:=2.;
then evaluate Fn1
> Fn1;
A Maple function is defined with this syntax
> Fn2:=x->cosh(x^3)/(1+x^2);
This does behave like a function because you give it an argument and it gives you an answer back
> Fn2(2.);
Or you can define a function with multiple arguments like this
> Fn3:=(x,y,z)->x*y^2*z^3;
> Fn3(1,2,3);
Hence, the -> function notation makes functions like you are used to from math classes. So why would you even want to mess with expressions? Because Maple often has an easier time doing algebra with them, integrating them, differentiating them, plotting them, and using them to build differential equations. So you have to get used to both. I try to remember it this way: an expression looks like a function in a math book; a function is a machine that takes input and gives back output.
Integers
> I1:=12345678987654321;
Matrices
> M1:=matrix([[1,2],[3,4]]);
Polynomials
> P1:=y^3+y^2+y-1;
> S1:="Mary had a little lamb.";
Vectors
> V1:=Vector([1,2,3]);
Lists and sets
> s1:=[1,2,4,6,8,12];
> s2:=[seq(2*n^2-3*n+2,n=1..6)];
Their elements can be referred to with Maple's square bracket subscript notation
> s1[3];s2[2..5];
A set is similar to a list, but not quite. It is enclosed in curly brackets and Maple, instead of you, decides what order the elements should be listed in. The most important difference is that a list may contain repeated elements, but a set may not. Sets are often used in the arguments of Maple commands. In the example below note that the list stays the way it was defined while the set is re-ordered and reduced to unique elements.
> s1:=[1,3,2,6,4,3,2];
> s2:={1,3,2,6,4,3,2};
>
Suppose you want to know the sine of the number 1 (in radians; all calculus is done in radians, so forget about degrees). You might think this would work:
> restart;
> sin(1);
This is not what we had in mind; we already know we want
, but what is the answer? Maple
is having trouble here because it doesn't think it makes sense to take the sine of an integer constant; it expects floating point numbers. See what happens with the small addition of a decimal point
> sin(1.);
Difficulties like this are not always so easy to fix, so Maple provides a command to take care of it: evalf . It would be used in this example this way:
> sin(1);
> evalf(%);
>
The
%
sign means "the last result Maple calculated" (like Ans on some calculators). It is
in this case, and
evalf
stands for "evaluate as a floating point number". You will be using
evalf
a lot because Maple will be doing its symbolic thing when you want a numeric result. It's just the price you have to pay to have a calculator that is at home in both the symbolic and numerical worlds.
Warning: if you get in the habit of using % routinely, you will routinely make mistakes. Only use it sparingly. Most of the time you should assign results to variable names, then work with these names to avoid confusion, like this:
> s:=sin(1);
> evalf(s);
Oh; and what's the number one most annoying thing about Maple? It doesn't give you very good error messages when you louse up. It tends either to just parrot back to you the thing you asked it to do, or it gives you gobbledygook like "Can't evaluate Boolean". But be patient; it is a great tool and it is improving all the time. It is definitely worth learning.
Debugging (when bad things happen to good programmers)
Everybody who writes or uses software has something in common--their programs don't work. And when this happens the most important skill you can have is the ability to find out exactly what went wrong. Here are some beginning tips for debugging Maple. More information is in the Debugging section at the end of the worksheet.
> restart: f:=x-> sin(a^2*x^2)/sin(a*2)^2;
then use
> plot(f(x),x=-1..1);
Plotting error, empty plot
You will come to hate this error message. What it really means is that there is something wrong with the function f(x), but because Maple is so powerful and allows you to do all kinds of things, it can't tell you what the problem is. Hopefully at some point in time Maple will have better error messages. But you have a problem right now. When this happens, evalf can help. Let's check a particular value of this function to see if we can get a hint about what's wrong
> evalf(f(1.));
This is an error message in disguise. What it means is that Maple tried to give you a number back, but couldn't because you hadn't told it what
was. As soon as you give
a value, the plot will work. (Set a to be 5 in the execution group below and go back up and execute the plot.)
>
Here's another example. Suppose you forgot the value of
and needed Maple to tell you, so you try
> s:=sin(pi/2);
"No!", you scream, "GIVE ME THE NUMBER!" The Maple command for this would be
> evalf(s);
This, believe it or not, is an error message. It says that Maple tried to give you the number, but couldn't because it didn't know what
is. You have been done in by Maple's ability to deal with Greek letters. The symbol pi is just the Greek letter
; what you want is the ratio of circle area to the square of circle radius, which is Pi in Maple. When you do it this way it works
> sin(Pi/2.);
>
When Maple gives you back something unexpected, try to turn it into a number that you can check by using evalf . As you try to get a number out you will probably discover what the problem is.
check := vs =
You will make this mistake 100 times at least: only use = when you are defining an equation; assignment, i.e., you want a to be 5, is done with a:=5 .
> restart;
> int(sin(x)/(1-cos(x)),x=0..Pi);
You thought you were going to get a number, but Maple gave you infinity. You could use floating point arguments to check the function like this
> sin(1.)/(1-cos(1.));
but that looks fine. To check a whole bunch of values over the integration range, make a plot using Maple's command plot:
> plot(sin(x)/(1-cos(x)),x=0..Pi);
>
Now you can see that the integrand is singular at x=0, so Maple was right: the answer is infinity. Making plots is a great way to debug.
assume (tie Maple down)
> restart;
> int(exp(-a^2*x^2),x=0..infinity);
Definite integration: Can't determine if the integral is convergent.
Need to know the sign of --> a^2
Will now try indefinite integration and then take limits.
You wanted a formula containing
, but instead you got this mess. This time Maple gives you a hand--since Maple can handle complex numbers, it can't tell whether
is positive or negative. It will give you the answer if you give it a little help with
assume
> assume(a,real);
> int(exp(-a^2*x^2),x=0..infinity);
>
Look the assume command up in online help; it will help you keep Maple under control.
Warning: Once you have used assume on a variable, however, you may have trouble having Maple give you numbers. The trouble happens when you assume something about a, use a in an expression and assign it to another variable (say b), then give a a value, and finally try to evaluate b. Observe:
> restart;
> assume(a,real);
> b:=cos(a);
> a:=2.;
> evalf(b);
Now watch what happens to the same sequence without the assume
> restart;
> b:=cos(a);
> a:=2.;
> evalf(b);
The lesson here is only to use assume when absolutely necessary.
Finally, you may need to assume two conditions on a variable, like both c>0 and c<1. Maple lets you do this in two ways. You can either put both conditions inside a single assume command like this
> assume(c>0,c<1);
or you can do it in two (or more) steps using the command additionally , like this
> assume(c>0);
> additionally(c<1);
The reason you can't just use two assume commands is that whenever you use assume on a variable it erases all previous assumptions set on that variable.
>
restart (punt)
> restart;
> x:=1.5;BesselJ(0,x);
And then after trying a few different values of
, you decided to plot the function like this
> plot(BesselJ(0,x),x=0..5);
Error, (in plot) invalid arguments
This is a pretty mysterious error message, and you have to know quite a bit about Maple to be able to tell what's wrong. But if you do this
> restart: plot(BesselJ(0,x),x=0..5);
>
all is well. This is the Maple equivalent of ctrl-alt-del on the PC, and you will be using it regularly.
Cool stuff you can do right now
Even knowing the little bit you have learned right now you can do some rather amazing things. Open each subsection and see what you can do.
Integration is done with the int command.
Here's an indefinite integral
:
> restart;
> int(exp(-x)*sin(x),x);
Here's a definite integral
> s1:=int(exp(-x)*sin(x),x=0..1);
This is a perfectly valid expression, but perhaps you want a number?
> evalf(s1);
Here's an integral Maple can't do
> s2:=int(exp(-x^4)*cos(x),x=0..1);
so it just prints it nicely and lets you worry about how to get an actual number out. You do this by asking Maple to do it numerically
> evalf(s2);
>
Problem 1.10
Find the numerical answer to
. Put a comment on the same line as the command with Maple's
#
notation.
-----------------------------------------------------------
Take the derivative of any function using diff
> restart;
> d1:=diff(sin(x)/sqrt(1+x^2),x);
Perhaps you don't like the look of this and would rather have a common denominator. This is called normal form and can be obtained this way (we will do more of this in Chapter 9)
> normal(d1);
You can do second derivatives too
> d2:=diff(exp(-x)*tan(x),x$2);
Maybe you think this could look prettier? Try
> simplify(d2);
then try to pull out the common exponential factor with
> factor(%);
and then get the polynomial in
to be in the right order
> sort(%);
And now that I like the final answer I will assign it to d2. This is one of the few times that I use the previous answer variable % . It is useful here because if one of the algebra commands I use to get an improved form doesn't work, I haven't messed up what's in d2, so I can just keep trying things until I like what I get.
> d2:=%;
These algebra commands, and more, are discussed in Chapter 9. During the semester you should get used to going to Chapter 9 and looking around whenever you want Maple put an expression in a form you like better.
>
Problem 1.11
Take the first derivative of the function
. Put a comment about what you are doing in text within the execution group and above the
diff
command.
-----------------------------------------------------------
Build a sequence
> restart;
> s:=seq((5+n)/(3+n),n=1..50);
or
> evalf(s);
so it is clear that the sequence is approaching a limit of 1.
Or you can build a sequence of expressions, like the terms of a power series. Here are the terms in the series for the exponential function
> seq(x^n/n!,n=1..20);
>
Problem 1.12
Generate the first 15 terms of the sequence defined by
. Put a comment about what you are doing in text below the seq command, but within the same execution group.
-----------------------------------------------------------
Sum a series
Find a formula for the sum of the integers raised to the 6th power using sum
> restart;
> s1:=sum(k^6,k=1..n);
Find the result of summing the reciprocals of the integers raised to the 6th power from 1 to
> s2:=sum(1/n^6,n=1..infinity);
then convert this to a numerical value
> evalf(s2);
>
Problem 1.13
Find the sum of the reciprocals of the squares of the odd integers from 1 to
. Put a comment about what you are doing in a separate paragraph above and outside the execution group containing the
sum
command.
-----------------------------------------------------------
f(x) = f(a) + f'(a)(x-a) + f''(a) (x-a)^2/2! + f'''(a)(x-a)^3/3! + ...
This is very useful in getting approximations. For instance, the quantity
appears all the time in relativity theory. It is sometimes nice to have an approximate form for this formula if
is small. Use the
taylor
command to find it.
> restart;
> taylor(1/sqrt(1-x^2),x,5);
>
where the 5 means get terms up through
in the expansion. The term
in the answer means that the error in this expansion is of order
.
Problem 1.14
Find an approximate formula for the function
including terms up through
. Display the coefficients of the series in both rational and floating point form. Put a comment about what you are doing in a text paragraph outside and below the execution group containing the
taylor
command.
-----------------------------------------------------------
Plot functions
If you want to quickly find out what some function that you have run across looks like, use plot
> restart;
> plot(exp(sin(x)),x=0..50);
>
Problem 1.15
Make a plot of the function
from
to
. Then put a comment about what you are doing in a paragraph between the two execution groups.
-----------------------------------------------------------
Solve hard equations
Suppose you need a solution of
. Use
solve
on the equation
> restart;
> sol:=solve(exp(-x)=x,x);
Well, this is an answer in terms of some function you have never heard of when what you really wanted was just a number. No problem; just use
> evalf(sol);
Or if you already know that there isn't going to be a symbolic solution and you just want a number, you could tell Maple to just numerically solve this equation with Maple's numerical equation solver fsolve , telling Maple to start looking for a solution near x=1:
> fsolve(exp(-x)=x,x=1);
If you don't give it a good guess it may take longer to get the answer or it may get lost and go to infinity instead of finding the answer.
Problem 1.16
Find the solution of the equation
. Put a comment about what you are doing in a paragraph within the execution group just above the command. Within this paragraph of text use Maple's math mode (
on the toolbar) to include the equation
.
Maple will also solve equations (even systems of equations) for you symbolically. For example, here is how Maple solves the quadratic equation symbolically:
> Q:=a*x^2+b*x+c=0;
> solve(Q,x);
And here's the symbolic solution of the general problem of two equations in two unknowns, with
and
unknown and
as the coefficients:
> E1:=a*x+b*y=e;E2:=c*x+d*y=f;
> solve({E1,E2},{x,y});
>
You may find this an easier way of handling simultaneous equations than using Maple's linear algebra package.
>
-----------------------------------------------------------
Solve differential equations
Suppose you need the two fundamental solutions of the second order differential equation
f'' + xf' +f = 0 where ' denotes differentiation by x; use Maple's differential equation solving command dsolve
> restart;
> dsolve(diff(f(x),x$2)+x*diff(f(x),x)+f(x)=0);
>
The variable
is the arbitrary multiplier of the first fundamental solution and
is the multiplier of the second. It involves a function
that you haven't encountered yet, but you will. Solving differential equations is a big subject and we will devote all of Chapter 7 to it.
Problem 1.17
Find the solution of the differential equation y' = x+y. After Maple finds the general solution, find the value of the arbitrary constant from the condition y(0)=1. Put a comment about what you are doing in a paragraph of text below and outside the execution group.
-----------------------------------------------------------
Maple can also handle the initial conditions for you, like this (using
and
):
> Eq:=diff(f(x),x$2)+x*diff(f(x),x)+f(x)=0;
> dsolve({Eq,f(0)=1,D(f)(0)=2},f(x));
>
Handle matrices and solve systems of equations
x + 2y + 3z = 6
4x + 5y + 6z = 15
7x + 8y + 10z = 25
which has been carefully built so that its solution is [x,y,z] = [1,1,1]. Maple would solve this system this way. First load the part of Maple's brain that knows how to do linear algebra with the command with(LinearAlgebra) . Then load the matrix with the matrix command, load the right-hand side vector with the vector command, and finally solve the system with the linsolve command.
> restart;
> with(LinearAlgebra);
(If you don't want to see all of this stuff that printed because we pulled in Maple's linear algebra package, put a colon at the end instead of a semicolon.)
> A:=Matrix([[1,2,3],[4,5,6],[7,8,10]]);
> b:=Vector([6,15,25]);
> c:=LinearSolve(A,b);
>
Problem 1.18
Jack is twice as old as Jill. Jill's age added to Jack's age is the same as Joan's age. The sum of their three ages is 48. How old is each person? Solve this problem by copying and modifying the above example. Put a comment about what you are doing between the Vector and LinearSolve execution groups. If your copy of the code above doesn't have these in separate execution groups, split them by looking in the edit menu.
-----------------------------------------------------------
This is a very big topic and one of the main things Maple was designed to do. Chapter 9 has a description of common algebra commands that you will be using throughout this course. You can use Chapter 9 as a reference whenever Maple gives you an answer whose form doesn't impress you. Take a few minutes now and read through Chapter 9, down to the section on algebra with matrices. Don't try to understand in detail everything that you read; just become familiar with what's available in Chapter 9 so you know where to look when problems come up later. Then come back here and do the problem below. (Don't do the problems at the end of Chapter 9.) Chapter 9
Problem 1.19
Use Maple commands to put the expression
into a simpler form. Put a comment about what you are doing in text above and outside the first execution group.
-----------------------------------------------------------