Example 1: Using the variable instead of the exponential constant e
In Maple, you can use letters as variables even when that letter is also used to represent a particular mathematical constant, such as the exponential constant or the imaginary unit . If you simply type or , you get the variable. In this example, the letter has been used.
This is analogous to trying to plot when does not have a value.
Solution 1 (Standard math notation): To plot this expression, replace with , where is the exponential constant. (Note: When using standard mathematical notation in Maple, variables are displayed in italics, so is the variable, is the constant.) You can enter the exponential constant by using the Expression or Common Symbols palettes, or you can enter it using symbol completion:
Type e, then press Esc, and select Exponential 'e' from the popup list.
>
|
|
Solution 2 (Maple syntax): Use the exp function to enter exponentials.
>
|
plot(exp(x), x = 0 .. 1);
|
Example 2: Using pi instead of Pi or
>
|
plot(sin(pi*x), x = 1 .. 2);
|
Solution 1 (Maple syntax): Use "Pi" instead of "pi".
>
|
plot(sin(Pi*x), x = 1 .. 2);
|
Solution 2 (Standard math notation): Enter the symbol using symbol completion (type pi, press Esc, and select from the popup list) or using the Common Symbols palette.
>
|
|
Example 3: Using the variable instead of the imaginary unit
In Maple, you can use letters as variables even when that letter is also used to represent a particular mathematical constant, such as the exponential constant or the imaginary unit . If you simply type or , you get the variable. In this example, the letter has been used.
>
|
|
Solution 1 (Standard math notation): To plot this expression, replace the variable with the imaginary unit . (Note: When using standard mathematical notation in Maple, variables are displayed in italics, so is the variable, but is the imaginary unit.) You can enter the imaginary unit by using the Common Symbols palette, or you can enter it using symbol completion:
Type , then press Esc, and select Imaginary 'i' from the popup list.
>
|
|
Solution 2 (Maple syntax): Use uppercase instead of lowercase . Maple uses to represent one of the square roots of -1.
>
|
|
Example 4: Variable mismatch: parametric plot
In this example, the variable name used in the arguments for the real functions to be plotted do not match the variable name given to the range variable.
>
|
|
Solution: Changing one of the variable names to match the other solves this problem. Here, has been changed to
>
|
|
Example 5: Forgetting to assign a value to a variable
The constant has not been assigned a value.
>
|
|
Solution 1: Assign a value to
>
|
|
Solution 2: Use Explore to see how the plot depends on the parameter .
Note: To interact with the solution provided below, open this help page as a worksheet and then move the slider.
From the Context Panel for the plot expression, select Explore. Use the default settings in the dialog box and click Explore to see the resulting interactive application. Use the slider to see how the graph depends on the parameter .
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example 6: Forgetting to assign a value to a variable, multiple curves
Similar to Example 5, in the list of expressions to be plotted, the first expression contains an undefined constant, . As a result, only one curve is plotted.
>
|
|
Solution: Assign a value to
>
|
|
Now both curves are plotted.
Example 7: Mismatched variable names: 3-D plot example
>
|
|
Solution: The expression is defined in terms of and , but the ranges are defined in terms of and . Making them match fixes the problem.
>
|
|