The difference between f := ... and f := x -> ...

Expressions and Maple functions are two closely related but strikingly different ideas. Here are a couple of examples to contrast their different usage. Let's let [Maple Math] denote the expression [Maple Math] and [Maple Math] denote the corresponding Maple function [Maple Math] :

> f := x^2 + 3*x + 5;
g := x -> x^2 + 3*x + 5;

First of all, note that you can get the expression from the Maple function simply by plugging x into the Maple function:

> g(x);

Similarly, you can find the value of the expression / Maple function when [Maple Math] by:

> subs( x = 812, f );
g( 812 );

(which seems more natural?) and you can plot the expression / Maple function from 0 to 8 by:

> plot( f, x = 0..8 );
plot( g(x), x = 0..8 );

Note that plot( g, x = 0..8 ) will not work, that is, you really need g(x) not just g in this form of plot .

You can find where the expression / Maple function crosses the line [Maple Math] by:

> solve( f = 12 );
solve( g(x) = 12 );


To summarize: expressions require one notation and Maple functions another; don't confuse the two notations! Often, you can accomplish the same end by either means, if only you use the appropriate notation. But expressions and Maple functions are fundamentally different data structures, and we will later see some things that can be done only using one or the other.

If you have any questions about the above, talk to your instructor now !