Examples:

  1. Type the following statements in a Maple worksheet. What do you expect a3 to contain?

            a1 := h*v 
            a2 := k*T
            a3 := exp(-a1/a2)
          
    Shows that the results for a3 have the expressions saved as a1 and a2 in their respective places.

    Comment: Use the := to assign names to terms in the final expression. NEVER use the same name to label two different expressions or equations. The name will be associated with the last expression assigned. This can be very confusing to Maple and will often create difficult-to-find errors for the user. Instead, assign a descriptive name or a sequence of simple names as was done in this example.

  2. Type the following statements in a Maple worksheet. What do you expect c2 to contain?

          c1 := (x+y)/z
          c2 := c1^2+5*x+6
          
    Maple Screenshot

    Comment: Note how the expression named c1 is put every place that c1 appears in the second expression named c2. Also note that the second term 5*x may be wrong. If you intended it to be 5*c1, just position the cursor in the previously typed expression, delete x and type in c1 and strike the Enter key. Maple treats mathematical statements like sentences in a word processor. You can go back and modify any statement to correct errors. HOWEVER, if later expressions depend upon a statement that you modified, you must type the Enter key repeatedly to reexecute the remaining statements until you have executed the entire subsequent math so that your change is updated in each of the subsequent expressions.

  3. Type the following statements in a Maple worksheet.

          MessyTerm := x/y+z
          QuadraticExpressionWithMessyTerm := MessyTerm^2 + 5*MessyTerm + 6
          
    Maple Screenshot

    Comment: This demonstrates that you can be creative with names if you wish.

  4. Type the following statements in a Maple worksheet. What do you expect b3 to contain?

            b1 := h*v 
            b2 := k*T
            v := 1.5
            b3 := exp(-b1/b2)
            
    Shows that the results for b3 have the expressions saved as b1 and b2 in their respective places.

    Comment: Do not use variable names as the names of expressions. Even if this was your intended result for this problem, you have effectively removed the variable v from your work. You will no longer be able to sub for different values of v since it will always be the value 1.5. It was a variable in the first expression, but once it was used as the name of an expression, it will never appear as a variable in subsequent statements.

    Instead, use the subs command (shown in a later lesson) to substitute values temporarily while preserving the ability to sub different values for a variable at a later point in your work.