PDF-Version - am Institut für Baustatik
PDF-Version - am Institut für Baustatik
PDF-Version - am Institut für Baustatik
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
11.3 Arbeiten mit Maple<br />
11.3.1 Simplification<br />
For the most part, Maple leaves expressions the way you entered them or the way they were created<br />
from some computation. However, there are some obvious simplifications that it automatically<br />
performs. An ex<strong>am</strong>ple of this would be turning 0 * x into the simpler 0.<br />
The simplify command provides typical expression simplifications. By using simplify(expr, property)<br />
you can control what simplifications are performed:<br />
> 4^(1/2) + 3;<br />
1/2<br />
4 + 3<br />
> simplify (%); (Anmerkung: das % ist ein Platzhalter <strong>für</strong> den zuletzt berechneten Wert;<br />
5 in Maple <strong>Version</strong> 4 ist es statt dessen ein " )<br />
The expand command forces distribution of multiplication over addition. For instance:<br />
> f := (x + y) * (x - y);<br />
f := (x + y) (x - y)<br />
> expand(f);<br />
2 2<br />
x - y<br />
Since expand turns f into x^2 + y * x - x * y - y^2, the automatic simplifications turn the expression into<br />
x^2 - y^2.<br />
For more information on simplification, see ?simplify, ?expand, ?factor, ?normal.<br />
11.3.2 Some Predefined Symbols (Vordefinierte Symbole)<br />
There are four kinds of symbols that have some form of predefined meaning within Maple:<br />
Syntactic parts of the Maple command and progr<strong>am</strong>ming language. The meanings of these cannot be<br />
redefined. ("if" and "quit" are typical ex<strong>am</strong>ples.)<br />
System-supplied functions. These may be redefined, but you will lose the functionality of the systemsupplied<br />
function. ("solve" and "trace" are typical ex<strong>am</strong>ples.)<br />
Predefined constants and n<strong>am</strong>es. Library functions assume that these symbols exist with no assigned<br />
value, so errors or incorrect results will usually result if they are redefined. ("I", the complex square<br />
root of -1, and "true" are typical ex<strong>am</strong>ples. See ?constants for the complete list.)<br />
System progr<strong>am</strong>ming variables. These are used to control computational effects, so they can<br />
(cautiously!) be assigned new values. ("Digits" and "printlevel" are typical ex<strong>am</strong>ples.)<br />
The global variable "printlevel" is a particularly handy one to know. By setting "printlevel := 0;" you turn<br />
off the automatic printing of your commands; setting "printlevel := 1;" is the default behaviour. See<br />
?printlevel for the effect of other settings.<br />
11.3.3 Summation<br />
Maple allows you to specify both definite and indefinite symbolic summations using the sum<br />
command:<br />
> # Be sure that the index variable is a mathematical variable.<br />
> # If i had a value (say, 3), it would be meaningless to say<br />
> # something like "sum 3 squared for 3 from 1 to n" when you<br />
> # meant to say "sum i squared for i from 1 to n":<br />
> i;<br />
i<br />
> # This is an ex<strong>am</strong>ple of a sum over an indefinite (non-negative)<br />
> # index range:<br />
> x; # Just to be sure, we want to see if x is a mathematical variable.<br />
x<br />
> sum(x^i, i);<br />
109