Contents Previous Next Index
|
5 Mathematical Problem Solving
|
|
This chapter focuses on solving problems in specific mathematical disciplines. The areas described below are not all that Maple provides, but represent the most commonly used packages. Examples are provided to teach you how to use the different methods of calculation available in Maple, including tutors, assistants, commands, task templates, plotting, and context-sensitive operations.
The examples in this chapter assume knowledge of entering commands and mathematical symbols. For information, see Entering Expressions. For information on basic computations, including integer operations and solving equations, see Basic Computations.
|
5.1 In This Chapter
|
|
Section
|
Topics
|
Algebra - Performing algebra computations
|
|
Linear Algebra - Performing linear algebra computations
|
•
|
Creating Matrices and Vectors
|
•
|
Accessing Entries in Matrices and Vectors
|
•
|
Linear Algebra Computations
|
•
|
Student LinearAlgebra Package
|
|
Calculus - Performing calculus computations
|
|
Optimization - Performing optimization computations using the Optimization package
|
•
|
Point-and-Click Interface
|
|
Statistics - Performing statistics computations using the Statistics package
|
•
|
Probability Distributions and Random Variables
|
•
|
Statistical Computations
|
|
Teaching and Learning with Maple - Student and Instructor resources for using Maple in an academic setting
|
•
|
Student Packages and Tutors
|
•
|
More Student and Instructor Resources
|
|
Clickable MathTM - Solve math problems using some of the interactive methods available in Maple
|
|
|
|
|
|
5.2 Algebra
|
|
Maple contains a variety of commands that perform integer operations, such as factoring and modular arithmetic, as described in Integer Operations. The following section describes Maple's support of polynomial algebra.
For information on matrix and vector algebra, see Linear Algebra.
For information directed to students of algebra or precalculus, see Teaching and Learning with Maple.
|
Polynomial Algebra
|
|
A Maple polynomial is an expression in powers of an unknown. Univariate polynomials are polynomials in one unknown, for example, Multivariate polynomials are polynomials in multiple unknowns, such as
The coefficients can be integers, rational numbers, irrational numbers, floating-point numbers, complex numbers, variables, or a combination of these types.
|
Arithmetic
|
|
The polynomial arithmetic operators are the standard Maple arithmetic operators excluding the division operator (/). (The division operator accepts polynomial arguments, but does not perform polynomial division.)
Polynomial division is an important operation. The quo and rem commands find the quotient and remainder of a polynomial division. See Table 5.1. (The iquo and irem commands find the quotient and remainder of an integer division. For more information, see Integer Operations.)
Table 5.1: Polynomial Arithmetic Operators |
Operation
|
Operator
|
Example
|
Addition
|
|
>
|
|
|
Subtraction
|
|
>
|
|
|
Multiplication1
|
*
|
|
Division: Quotient and Remainder
|
quo
rem
|
>
|
|
>
|
|
|
Exponentiation2
|
^
|
|
1You can specify multiplication explicitly by entering *, which displays in 2-D Math as . In 2-D Math, you can also implicitly multiply by placing a space character between two expressions. In some cases, the space character is optional. For example, Maple interprets a number followed by a name as an implicit multiplication.
2In 2-D Math, exponents display as superscripts.
|
|
To expand a polynomial, use the expand command.
If you need to determine whether one polynomial divides another, but do not need the quotient, use the divide command. The divide command tests for exact polynomial division.
>
|
|
Important: You must insert a space character or a multiplication operator () between adjacent variables names. Otherwise, they are interpreted as a single variable.
For example, without a space, is considered a single variable, and does not divide the single variable
But, divides the product of and
>
|
|
For information on polynomial arithmetic over finite rings and fields, refer to the mod help page.
|
|
Sorting Terms
|
|
To sort the terms of a polynomial, use the sort command.
>
|
|
Note: The sort command returns the sorted polynomial, and updates the order of the terms in the polynomial.
The terms of p1 are sorted.
To specify the unknowns of the polynomial and their ordering, include a list of names.
>
|
|
>
|
|
By default, the sort command sorts a polynomial by decreasing total degree of the terms.
>
|
|
The first term has total degree 4. The other two terms have total degree 3. The order of the final two terms is determined by the order of their names in the list.
To sort the terms by pure lexicographic order, that is, first by decreasing order of the first unknown in the list option, and then by decreasing order of the next unknown in the list option, specify the 'plex' option.
>
|
|
For information on enclosing keywords in right single quotes ('), see Delaying Evaluation.
The first term contains to the power 3; the second, to the power 2; and the third, to the power 0.
Using context-sensitive operations, you can perform operations, such as sorting, for polynomials and many other Maple objects.
To sort a polynomial:
1.
|
Select the polynomial.
|
2.
|
From the Context Panel, under the Sorts menu, select:
|
•
|
Single-variable, and then the unknown, or,
|
•
|
Two-variable (or Three-variable), Pure Lexical or Total Degree, and then the sort priority of the unknowns.
|
See Figure 5.1.
|
Figure 5.1: Sorting a Polynomial Using the Context Panel
|
|
|
Maple sorts the polynomial.
In Worksheet mode, Maple inserts the calling sequence that performs the sort followed by the sorted polynomial. For this example, choose Sorts > Two-variable > Pure Lexical > y,x.
>
|
|
You can use the Context Panel to perform context-sensitive operations on 2-D Math content including output. For more information, see Computing with the Context Panel (for Document mode) or The Context Panel (for Worksheet mode).
|
|
Collecting Terms
|
|
To collect the terms of polynomial, use the collect command.
>
|
|
|
|
Coefficients and Degrees
|
|
Maple has several commands that return coefficient and degree values for a polynomial. See Table 5.2.
Table 5.2: Polynomial Coefficient and Degree Commands |
Command
|
Description
|
Example
|
coeff
|
Coefficient of specified degree term
|
>
|
|
|
lcoeff
|
Leading coefficient
|
|
tcoeff
|
Trailing coefficient
|
|
coeffs
|
Sequence of all coefficients, in one-to-one correspondence with the terms
Note: It does not return zero coefficients
|
|
degree
|
(Highest) degree
|
|
ldegree
|
Lowest degree term with a non-zero coefficient
|
|
|
|
|
Factorization
|
|
To express a polynomial in fully factored form, use the factor command.
The factor command factors the polynomial over the ring implied by the coefficients, for example, integers. You can specify an algebraic number field over which to factor the polynomial. For more information, refer to the factor help page. (The ifactor command factors an integer. For more information, see Integer Operations.)
To solve for the roots of a polynomial, use the solve command. For information on the solve command, see Solving Equations and Inequations. (The isolve command solves an equation for integer solutions. For more information, see Integer Equations.)
|
|
Other Commands
|
|
Table 5.3 lists other commands available for polynomial operations.
Table 5.3: Select Other Polynomial Commands |
Command
|
Description
|
content
|
Content (multivariate polynomial)
|
compoly
|
Decomposition
|
discrim
|
Discriminant
|
gcd
|
Greatest common divisor (of two polynomials)
|
gcdex
|
Extended Euclidean algorithm (for two polynomials)
|
CurveFitting[PolynomialInterpolation]
See also the CurveFitting Assistant (Tools → Tutors → Statistics → Curve Fitting)
|
Interpolating polynomial (for list of points)
|
lcm
|
Least common multiple (of two polynomials)
|
norm
|
Norm
|
prem
|
Pseudo-remainder (of two multivariate polynomials)
|
primpart
|
Primitive part (multivariate polynomial)
|
randpoly
|
Random polynomial
|
PolynomialTools[IsSelfReciprocal]
|
Determine whether self-reciprocal
|
resultant
|
Resultant (of two polynomials)
|
roots
|
Exact roots (over algebraic number field)
|
sqrfree
|
Square-free factorization (multivariate polynomial)
|
|
|
|
Additional Information
|
|
Table 5.4: Additional Polynomial Help |
Topic
|
Resource
|
General polynomial information
|
polynom help page
|
PolynomialTools package
|
PolynomialTools package overview help page
|
Algebraic manipulation of numeric polynomials
|
SNAP (Symbolic-Numeric Algorithms for Polynomials) package overview help page
|
Polynomial information and commands
|
Maple Help System Table of Contents: Mathematics→Algebra→Polynomials section
|
|
|
|
|
|
5.3 Linear Algebra
|
|
Linear algebra operations act on Matrix and Vector data structures.
You can perform many linear algebra operations using task templates. In the Task Browser (Tools → Tasks → Browse), expand the Linear Algebra folder.
|
Creating Matrices and Vectors
|
|
|
Creating Matrices
|
|
You can create a Matrix using
•
|
The angle bracket shortcut notation
|
When creating a Matrix using the Matrix command, there are several input formats available. For example, enter a list of lists. The dimensions of the matrix are inferred from the number of entries given.
>
|
|
Alternatively, use the angle bracket shortcut, <>. Separate items in a column with commas, and separate columns with vertical bars, |.
>
|
|
For information on the Matrix command options, see Creating Matrices and Vectors with Specific Properties.
Use the Matrix palette to interactively create a matrix without commands:
|
Figure 5.2: Matrix Palette
|
|
|
In the Matrix palette, you can specify the matrix size (see Figure 5.3) and properties. To insert a matrix, click the Insert Matrix button.
|
Figure 5.3: Matrix Palette: Choosing the Size
|
|
|
After inserting the matrix:
1.
|
Enter the values of the entries. To move to the next entry placeholder, press Tab.
|
2.
|
After specifying all entries, press Enter.
|
>
|
|
|
|
Creating Vectors
|
|
You can create a Vector using angle brackets (< >).
To create a column vector, specify a comma-delimited sequence, <a, b, c>. The number of elements is inferred from the number of expressions.
To create a row vector, specify a vertical-bar-delimited (|) sequence, <a | b | c>. The number of elements is inferred from the number of expressions.
For information on the Vector command options, refer to the Vector help page.
You can also create vectors using the Matrix palette. If either the number of rows or number of columns specified is 1, then you have the option of inserting a matrix, or inserting a vector of the appropriate type. See Figure 5.4.
|
Figure 5.4: Insert Matrix or Insert Vector
|
|
|
|
|
Viewing Large Matrices and Vectors
|
|
Matrices and smaller, and vectors with 10 or fewer elements, display in the document. For larger matrices or vectors, a portion is shown inline.
For example, insert a matrix.
In the Matrix palette:
1.
|
Specify the dimensions: 30 rows and 30 columns.
|
2.
|
In the Type drop-down list, select a matrix type, for example, Random.
|
3.
|
Click Insert Matrix. The command is inserted; execute it to see the result.
|
>
|
|
Note the output shows ellipses indicating the data continues and the output is scrollable meaning that you can explore the values directly within the worksheet, using your trackpad or mouse wheel.To view the entire matrix or vector, double-click the summary placeholder. This launches the Matrix Browser. See Figure 5.5.
|
Figure 5.5: Matrix Browser
|
|
|
To modify the entries using the Matrix Browser:
2.
|
Double-click an entry, and then edit its value. Press Enter.
|
3.
|
Repeat for each entry to edit.
|
4.
|
When you have finished updating entries, click Done.
|
You can view the matrix or vector as a table or as an image, which can be inserted into the document.
To set the maximum dimension of matrices and vectors displayed inline:
•
|
Use the interface command with the rtablesize option.
|
For example, interface(rtablesize = 15).
For more information, refer to the interface help page.
|
|
Creating Matrices and Vectors with Specific Properties
|
|
By default, matrices and vectors can store any values. To increase the efficiency of linear algebra computations, create matrices and vectors with properties. You must specify the properties, for example, the matrix shape or data type, when defining the object.
The Matrix palette (Figure 5.2) supports several properties.
To specify the matrix type:
•
|
Use the Shape and Type drop-down lists.
|
To specify the data type:
•
|
Use the Data type drop-down list.
|
For example, define a diagonal matrix with small integer coefficients.
In the Matrix palette:
1.
|
Specify the size of the matrix, for example, .
|
2.
|
In the Shapes drop-down list, select Diagonal.
|
3.
|
In the Data type drop-down list, select integer[1].
|
4.
|
Click the Insert Matrix button.
|
5.
|
Enter the values in the diagonal entries.
|
>
|
|
You cannot specify properties when defining vectors using the angle-bracket notation. You must use the Vector constructor.
To define a column vector using the Vector constructor, specify:
•
|
The number of elements. If you explicitly specify all element values, this argument is not required.
|
•
|
A list of expressions that define the element values.
|
•
|
Parameters such as shape, datatype, and fill that set properties of the vector.
|
The following two calling sequences are equivalent.
>
|
|
>
|
|
To create a row vector using the Vector constructor, include row as an index.
>
|
|
>
|
|
The Matrix palette does not support some properties. To set all properties, use the Matrix constructor.
To define a matrix using the Matrix constructor, specify:
•
|
The number of rows and columns. If you explicitly specify all element values, these arguments are not required.
|
•
|
A list of lists that define the element values row-wise.
|
•
|
Parameters such as shape, datatype, and fill that set properties of the matrix.
|
For example:
>
|
|
The Matrix palette cannot fill the matrix with an arbitrary value. Use the fill parameter.
>
|
|
For more information on the constructors, including other calling sequence syntaxes and parameters, refer to the storage, Matrix, and Vector help pages.
See also Numeric Computations.
|
|
|
Accessing Entries in Matrices and Vectors
|
|
|
Matrices
|
|
To select an entry in a Matrix, enter the matrix name with a sequence of two non-zero integer indices, row first.
>
|
|
To select an entire row, enter a single index; to select an entire column, enter first the entire range of rows, then the column index.
Similarly, you can access submatrices. Enter the indices as a list or range.
|
|
Vectors
|
|
To select an entry in a vector, enter the vector name with a non-zero integer index.
>
|
|
Negative integers select entries from the end of the vector.
To create a Vector consisting of multiple entries, specify a list or range of integers in the index.
|
|
|
Linear Algebra Computations
|
|
Maple has extensive support for linear algebra. You can perform many matrix and vector computations using context-sensitive operations. Matrix operations such as multiplication and inverses can be done with the basic matrix arithmetic operators. The LinearAlgebra package provides the full range of Maple commands for linear algebra and vector space computations, queries, and linear system solving.
|
Matrix Arithmetic
|
|
The matrix and vector arithmetic operators are the standard Maple arithmetic operators up to the following two differences.
•
|
The scalar multiplication operator is the asterisk (*), which displays in 2-D Math as . The noncommutative matrix and vector multiplication operator is the period (.).
|
•
|
There is no division operator (/) for matrix algebra. (You can construct the inverse of a matrix using the exponent .)
|
Table 5.5 lists the basic matrix operators.
>
|
|
Table 5.5: Matrix and Vector Arithmetic Operators |
Operation
|
Operator
|
Example
|
Addition
|
|
|
Subtraction
|
|
|
Multiplication
|
.
|
|
Scalar Multiplication1
|
*
|
|
Exponentiation2
|
^
|
|
1You can specify scalar multiplication explicitly by entering *, which displays in 2-D Math as . In 2-D Math, you can also implicitly multiply a scalar and a matrix or vector by placing a space character between them. In some cases, the space character is optional. For example, Maple interprets a number followed by a name as an implicit multiplication.
2In 2-D Math, exponents display as superscripts.
|
|
A few additional matrix and vector operators are listed in Table 5.6.
Define two column vectors.
>
|
|
Table 5.6: Select Matrix and Vector Operators |
Operation
|
Operator
|
Example
|
Transpose
|
^%T1
|
|
Hermitian Transpose
|
^%H1
|
>
|
|
|
Cross Product
(3-D vectors only)
|
&x2
|
>
|
|
|
1Exponential operators display in 2-D Math as superscripts.
2After loading the LinearAlgebra package, the cross product operator is available as the infix operator &x . Otherwise, it is available as the LinearAlgebra[CrossProduct] command.
|
|
For information on matrix arithmetic over finite rings and fields, refer to the mod help page.
|
|
Point-and-Click Interaction
|
|
Using the Context Panel, you can perform many matrix and vector operations.
Matrix operations available in the Context Panel include the following.
•
|
Perform standard operations: determinant, inverse, norm (1, Euclidean, infinity, or Frobenius), transpose, and trace
|
•
|
Compute eigenvalues, eigenvectors, and singular values
|
•
|
Compute the dimension or rank
|
•
|
Convert to the Jordan form, or other forms
|
•
|
Perform Cholesky decomposition and other decompositions
|
For example, compute the infinity norm of a matrix. See Figure 5.6.
|
Figure 5.6: Computing the Infinity Norm of a Matrix
|
|
|
In Document mode, Maple inserts a right arrow and the name of the computation performed, followed by the norm.
Vector operations available in the Context Panel include the following.
•
|
Compute the norm (1, Euclidean, and infinity)
|
For more information on context-sensitive operations, see Computing with the Context Panel (for Document mode) or The Context Panel (for Worksheet mode).
|
|
LinearAlgebra Package Commands
|
|
The LinearAlgebra package contains commands that construct and manipulate matrices and vectors, compute standard operations, perform queries, and solve linear algebra problems.
Table 5.7 lists some LinearAlgebra package commands. For a complete list, refer to the LinearAlgebra/Details help page.
Table 5.7: Select LinearAlgebra Package Commands |
|
For information on arithmetic operations, see Matrix Arithmetic.
For information on selecting entries, subvectors, and submatrices, see Accessing Entries in Matrices and Vectors.
Example: Determine a basis for the space spanned by the set of vectors {(2, 13, -15), (7, -2, 13), (5, -4, 9)}. Express the vector (25, -4, 9) with respect to this basis.
>
|
|
>
|
|
Find a basis for the vector space spanned by these vectors, and then construct a matrix from the basis vectors.
>
|
|
To express (25, -4, 9) in this basis, use the LinearSolve command.
>
|
|
|
|
Numeric Computations
|
|
You can very efficiently perform computations on large matrices and vectors that contain floating-point data using the built-in library of numeric linear algebra routines. Some of these routines are provided by the Numerical Algorithms Group (NAG®). Maple also contains portions of the CLAPACK and optimized ATLAS libraries.
For information on performing efficient numeric computations using the LinearAlgebra package, refer to the EfficientLinearAlgebra help page.
See also Creating Matrices and Vectors with Specific Properties and Reading from Files.
|
|
|
Student LinearAlgebra Package
|
|
The Student package contains subpackages that help instructors teach concepts and allow students to visualize and explore ideas. These subpackages also contain computational commands.
In the Student[LinearAlgebra] subpackage, the environment differs from that of the LinearAlgebra package in that floating-point computations are generally performed using software precision, instead of hardware precision, and symbols are generally assumed to represent real, rather than complex, quantities. These defaults, and others, can be controlled using the SetDefault command.
For information on using Maple as a teaching and learning tool, see Teaching and Learning with Maple.
|
|
|
5.4 Calculus
|
|
This section describes the key Maple calculus commands. Many of these commands are also available in the Context Panel for an expression.
For a complete list of calculus commands, refer to the Mathematics (including Calculus, Differential Equations, Power Series, and Vector Calculus subfolders) and Education >Student Package sections of the Maple Help System Table of Contents.
The Task Browser (Tools→Tasks→Browse) contains numerous calculus task templates.
For more about resources for teaching or learning calculus, see Teaching and Learning with Maple.
|
Limits
|
|
To compute the limit of an expression as the independent variable approaches a value:
1.
|
In the Calculus palette, click the limit item
.
|
2.
|
Specify the independent variable, limit point, and expression, and then evaluate it. Press Tab to move to the next placeholder.
|
For example:
>
|
|
|
The limit Command
|
|
By default, Maple searches for the real bidirectional limit (unless the limit point is ∞ or -∞). To specify a direction, include one of the options left, right, real, or complex in a call to the limit command. See Table 5.8.
Table 5.8: Limits |
Limit
|
Command Syntax
|
Output
|
|
>
|
|
|
undefined
|
|
>
|
|
|
|
|
>
|
|
|
|
|
Using the limit command, you can also compute multidimensional limits.
>
|
|
For more information on multidimensional limits, refer to the limit/multi help page.
|
|
Numerically Computing a Limit
|
|
To numerically compute a limit:
•
|
Use the evalf(Limit(arguments)) calling sequence.
|
Important: Use the inertLimit command, not the limit command.
The Limit command accepts the same arguments as the limit command.
For example:
>
|
|
For information on the evalf command, see Numerical Approximation.
The Limit command does not compute the limit. It returns an unevaluated limit.
>
|
|
For more information on the Limit command, refer to the Limit help page.
|
|
|
Differentiation
|
|
Maple can perform symbolic and numeric differentiation.
To differentiate an expression:
1.
|
In the Calculus palette, click the differentiation item
or the partial differentiation item
.
|
2.
|
Specify the expression and independent variable, and then evaluate it.
|
For example, to differentiate with respect to :
>
|
|
>
|
|
You can also differentiate using the Context Panel. For more information, see The Context Panel.
To calculate a higher order or partial derivative, edit the derivative symbol inserted. For example, to calculate the second derivative of with respect to :
>
|
|
To calculate the mixed partial derivative of :
>
|
|
Note: To enter another symbol, you can copy and paste the existing symbol, or enter d and use symbol completion.
|
The diff Command
|
|
Maple computes derivatives using the diff command. To directly use the diff command, specify the expression to differentiate and the variable.
>
|
|
| (5.4) |
For information on equation labels such as (5.3), see Equation Labels.
You can calculate a higher order derivative by specifying a sequence of differentiation variables. Maple recursively calls the diff command.
>
|
|
| (5.5) |
To calculate a partial derivative, use the same syntax. Maple assumes that the derivatives commute.
>
|
|
To enter higher order derivatives, it is convenient to use the syntax diff(f, x$n). This syntax can also be used to compute the symbolic nth order derivative.
For example:
|
|
Differentiating an Operator
|
|
You can also specify a mathematical function as a functional operator (a mapping). For a comparison of operators and other expressions, see Distinction between Functional Operators and Other Expressions.
To find the derivative of a functional operator:
The D operator returns a functional operator.
For example, find the derivative of an operator that represents the mathematical function
First, define the operator F.
1.
|
In the Expression palette, click the single-variable function definition item
.
|
2.
|
Enter placeholder values.
|
•
|
To move to the next placeholder, press the Tab key. Note: If pressing the Tab key inserts a tab, click the Tab icon
in the toolbar.
|
Now, define the operator, G, that maps to the derivative of
F and G evaluated at return the expected values.
For more information on the D operator, refer to the D help page. For a comparison of the diff command and D operator, refer to the diffVersusD help page.
|
|
Directional Derivative
|
|
To compute and plot a directional derivative, use the Directional Derivative Tutor. The tutor computes a floating-point value for the directional derivative.
To launch the tutor:
•
|
From the Tools menu, select Tutors, Calculus - Multivariate, and then Directional Derivatives. Maple launches the Directional Derivative Tutor. See Figure 5.7.
|
|
Figure 5.7: Directional Derivative Tutor
|
|
|
To compute a symbolic value for the directional derivative, use the Student[MultivariateCalculus][DirectionalDerivative] command. The first list of numbers specifies the point at which to compute the derivative. The second list of numbers specifies the direction in which to compute the derivative.
For example, at the point the gradient of points in the direction which is the direction of greatest increase. The directional derivative in the orthogonal direction is zero.
>
|
|
>
|
|
>
|
|
|
|
|
Series
|
|
To generate the Taylor series expansion of a function about a point, use the taylor command.
>
|
|
Note: If a Taylor series does not exist, use the series command to find a general series expansion.
For example, the cosine integral function does not have a taylor series expansion about 0.
>
|
|
Error, does not have a taylor expansion, try series()
To generate a truncated series expansion of a function about a point, use the series command.
>
|
|
By default, Maple performs series calculations up to order 6. To use a different order, specify a non-negative integer third argument.
>
|
|
To set the order for all computations, use the Order environment variable. For information about the Order variable and the term, refer to the Order help page.
The expansion is of type series. Some commands do not accept arguments of type series. To use the expansion, you must convert it to a polynomial. You can do this by using the convert/polynom command on the series, or by computing the series with the option oterm=false.
>
|
|
For information on Maple types and type conversions, see Maple Expressions.
For information on plotting, see Plots and Animations.
|
|
Integration
|
|
Maple can perform symbolic and numeric integration.
To compute the indefinite integral of an expression:
1.
|
In the Calculus palette, click the indefinite integration item
.
|
2.
|
Specify the integrand and variable of integration, and then evaluate it.
|
For example, to integrate with respect to x:
>
|
|
Recall that you can also enter symbols, including and using symbol completion.
•
|
Enter the symbol name (or part of the name), for example, int or d, and then press the completion shortcut key.
|
For more information, see Symbol Names.
You can also compute an indefinite integral using the Context Panel. For more information, see The Context Panel.
To compute the definite integral of an expression:
1.
|
In the Calculus palette, click the definite integration item
.
|
2.
|
Specify the endpoints of the interval of integration, integrand expression, and variable of integration, and then evaluate it.
|
For example, to integrate over the interval (0, ):
>
|
|
Maple treats the parameter a as a complex number. As described in Assumptions on Variables, you can compute under the assumption that a is a positive, real number using the assuming command.
>
|
|
To compute iterated integrals, line integrals, and surface integrals, use the task templates (Tools → Tasks → Browse) in the Multivariate and Vector Calculus folders.
|
The int Command
|
|
and use the int command. To use the int command directly, specify the following arguments.
•
|
Expression to integrate
|
•
|
Variable of integration
|
| (5.7) |
For a definite integration, set the variable of integration equal to the interval of integration.
>
|
|
|
|
Numeric Integration
|
|
To perform numeric integration:
•
|
Use the evalf(Int(arguments)) calling sequence.
|
Important: Use the inertInt command, not the int command.
In addition to the arguments accepted by the int command, you can include optional arguments such as method, which specifies the numeric integration method.
>
|
|
For information on the evalf command, see Numerical Approximation.
For information on numeric integration, including iterated integration and controlling the algorithm, refer to the evalf/Int help page.
|
|
|
Calculus Packages
|
|
In addition to top-level calculus commands, Maple contains calculus packages.
|
VectorCalculus Package
|
|
The VectorCalculus package contains commands that perform multivariate and vector calculus operations on VectorCalculus vectors (vectors with an additional coordinate system attribute) and vector fields (vectors with additional coordinate system and vectorfield attributes), for example, Curl, Flux, and Torsion.
>
|
|
>
|
|
>
|
|
>
|
|
Note: For information on changing the display format in the VectorCalculus package, see the VectorCalculus[BasisFormat] help page.
Find the curl of VectorField1.
>
|
|
Find the flux of VectorField1 through a sphere of radius r at the origin.
>
|
|
Compute the torsion of a space curve. The curve must be a vector with parametric function components.
>
|
|
For information on the assuming command, see The assuming Command.
For more information on the VectorCalculus package, including a complete list of commands, refer to the VectorCalculus help page.
To find other calculus packages, such as VariationalCalculus, refer to the index/package help page.
|
|
Student Calculus Packages
|
|
The Student package contains subpackages that help instructors teach concepts and allow students to visualize and explore ideas. These subpackages also contain computational commands. The Student calculus subpackages include Calculus1, MultivariateCalculus, and VectorCalculus. The Student[VectorCalculus] package provides a simple interface to a subset of the functionality available in the VectorCalculus package.
For information on using Maple as a teaching and learning tool, including the comprehensive interactive Study Guides, see Teaching and Learning with Maple.
|
|
|
Differential Equations
|
|
Maple has a powerful set of solvers for ordinary differential equations (ODEs) and partial differential equations (PDEs), and systems of ODEs and PDEs.
For information on solving ODEs and PDEs, see Other Specialized Solvers.
|
Student ODEs Package
|
|
The Student subpackage for ODEs has commands for computation, visualization, and step-by-step solutions, designed to support a first year course in ordinary differential equations.
|
|
|
|
5.5 Optimization
|
|
Using the Optimization package, you can numerically solve optimization problems. The package uses fast Numerical Algorithms Group (NAG) algorithms to minimize or maximize an objective function.
The Optimization package solves constrained and unconstrained problems.
•
|
Linear and nonlinear least-squares problems
|
The Optimization package contains local solvers. In addition, for univariate finitely-bounded nonlinear programs with no other constraints, you can compute global solutions using the NLPSolve command. To find global solutions generally, purchase the Global Optimization Toolbox. For more information, visit http://www.maplesoft.com/products/toolboxes.
|
Point-and-Click Interface
|
|
The primary method for solving optimization problems is the Optimization Assistant.
To launch the Optimization Assistant:
•
|
From the Tools menu, select Tutors, Optimization, and then Optimization.
|
Maple launches the Optimization Assistant. See Figure 5.8.
|
Figure 5.8: Optimization Assistant
|
|
|
To solve a problem:
1.
|
Enter the objective function, constraints, and bounds.
|
2.
|
Select the Minimize or Maximize radio button.
|
3.
|
Click the Solve button. The solution is displayed in the Solution text box.
|
You can also enter the problem (objective function, constraints, and bounds) in the calling sequence of the Optimization[Interactive] command.
For example, find the maximum value of subject to the constraints .
>
|
|
•
|
When the Optimization Assistant opens, select Maximize, then Solve.
|
After finding a solution, you can plot it. To plot a solution:
•
|
In the Optimization Assistant window, click the Plot button. The Optimization Plotter window is displayed. See Figure 5.9.
|
Note: When you close the Optimization Assistant, you can choose to return the solution, problem, command used, plot, or nothing, using the drop-down in the bottom right corner of the assistant window.
|
Figure 5.9: Optimization Assistant Plotter Window
|
|
|
For information on the algorithms used to solve optimization problems, refer to the Optimization/Methods help page.
|
|
Large Optimization Problems
|
|
The Optimization Assistant accepts input in an algebraic form. You can specify input in other forms, described in the Optimization/InputForms help page, in command calling sequences.
The Matrix form, described in the Optimization/MatrixForm help page, is more complex but offers greater flexibility and efficiency.
For example, solve the linear program:
Maximize subject to , where is the vector of problem variables.
1.
|
Define the column vector, c, of the linear objective function.
|
>
|
|
>
|
|
2.
|
Define the matrix A, the coefficient matrix for the linear inequality constraints.
|
>
|
|
3.
|
Define the column vector b, the linear inequality constraints.
|
>
|
|
4.
|
The QPSolve command solves quadratic programs.
|
>
|
|
This example uses a random data set to demonstrate the problem. You could also read data from an external file as Matrices, and use that data. For details and an example, see Reading from Files.
Note: For information on creating matrices and vectors (including how to use the Matrix palette to easily create matrices), see Linear Algebra.
For additional information on performing efficient computations, refer to the Optimization/Computation help page.
|
|
MPS(X) File Support
|
|
To import linear programs from a standard MPS(X) data file, use the ImportMPS command.
|
|
Optimization Package Commands
|
|
Each Optimization package command solves the problem using a different optimization method. These are described in Table 5.9, along with the general input form for each command.
Table 5.9: Optimization Package Commands |
Command
|
Description
|
LPSolve
|
Solve a linear program (LP), which involves computing the minimum (or maximum) of a linear objective function subject to linear constraints; input is in equation or Matrix form
|
LSSolve
|
Solve a least-squares (LS) problem, which involves computing the minimum of a real-valued objective function having the form where is a vector of problem variables, possibly subject to constraints; input is in equation or Matrix form
|
Maximize
|
Compute a local maximum of an objective function, possibly subject to constraints
|
Minimize
|
Compute a local minimum of an objective function, possibly subject to constraints
|
NLPSolve
|
Solve a non-linear program (NLP), which involves computing the minimum (or maximum) of a real-valued objective function, possibly subject to constraints; input is in equation or Matrix form
|
QPSolve
|
Solve a quadratic program (QP), which involves computing the minimum (or maximum) of a quadratic objective function, possibly subject to linear constraints; input is in equation or Matrix form
|
|
For a complete list of commands and other Optimization package information, refer to the Optimization help page.
|
|
|
5.6 Statistics
|
|
The Statistics package provides tools for mathematical statistics and data analysis. The package supports a wide range of common statistical tasks including quantitative and graphical data analysis, simulation, and curve fitting.
In addition to standard data analysis tools, the Statistics package provides a wide range of symbolic and numeric tools for computing with random variables. The package supports over 35 major probability distributions and can be extended to include new distributions.
|
Probability Distributions and Random Variables
|
|
The Statistics package supports:
•
|
Continuous distributions, which are defined along the real line by probability density functions. Maple supports many continuous distributions, including the normal, Student-t, Laplace, and logistic distributions.
|
•
|
Discrete distributions, which have nonzero probability only at discrete points. A discrete distribution is defined by a probability function. Maple supports many discrete distributions, including the Bernoulli, geometric, and Poisson distributions.
|
For a complete list of distributions, refer to the Statistics/Distributions help page.
You can define random variables by specifying a distribution in a call to the RandomVariable command.
>
|
|
Find the probability distribution function for X. (For information on statistics computations, see Statistical Computations.)
|
Adding Custom Distributions
|
|
To add a new distribution, specify a probability distribution in a call to the Distribution command.
>
|
|
To construct a piecewise-continuous function in 1-D Math, use the piecewise command, for example, t -> piecewise(t < 0, 0, t < 3, 1/3, 0).
Define a new random variable with this distribution.
>
|
|
Calculate the mean value of the random variable.
|
|
|
Statistical Computations
|
|
In addition to basic functions, like mean, median, standard deviation, and percentile, the Statistics package contains commands that compute, for example, the interquartile range and hazard rate.
|
Example 1 - Interquartile Range
|
|
Compute the average absolute range from the interquartile of the Rayleigh distribution with scale parameter 3.
>
|
|
To compute the result numerically:
•
|
Specify the 'numeric' option.
|
>
|
|
|
|
Example 2 - Hazard Rate
|
|
Compute the hazard rate of the Cauchy distribution with location and scale parameters a and b at an arbitrary point t.
>
|
|
>
|
|
You can specify a value for the point t.
>
|
|
You can also specify that Maple compute the result numerically.
>
|
|
|
For more information, refer to the Statistics/DescriptiveStatistics help page.
|
|
Plotting
|
|
You can generate statistical plots using the visualization commands in the Statistics package. Available plots include:
For example, create a scatter plot for a distribution of points that vary from by a small value determined by a normally distributed sample.
>
|
|
>
|
|
>
|
|
>
|
|
To fit a curve to the data points, include the optional fit equation parameter.
Using the plots[display] command, create a plot that contains:
•
|
a scatter plot of the data points
|
•
|
a quartic polynomial fitted to the data points:
|
•
|
the function
|
>
|
|
>
|
|
>
|
|
For more information on statistical plots, refer to the Statistics/Visualization help page.
For an overview of plotting, see Plots and Animations.
|
|
Student Statistics Package
|
|
The Student[Statistics] package helps instructors teach concepts and allows students to understand and explore concepts in an introductory statistics course. The Student[Statistics] package provides a simple interface to a limited subset of the functionality available in the Statistics package, as well as some additional resources. You can create and explore random distributions, perform hypothesis testing, and more.
The Student Statistics Example worksheet provides some starting examples.
|
|
Additional Information
|
|
For more information on the Statistics package, including regression analysis, estimation, data manipulation, and data smoothing, refer to the Statistics help page.
|
|
|
5.7 Teaching and Learning with Maple
|
|
Table 5.10 lists the available resources for instructors and students. For additional resources, see Available Resources.
Table 5.10: Student and Instructor Resources |
Resource
|
Description
|
Student Packages and Tutors
|
The Student package contains computational and visualization (plotting and animation) functionality, and point-and-click interfaces for explaining and exploring concepts (Tools→Tutors).
|
Study Guides
|
Study guides - Complete lessons with interactive examples for academic courses. Maple includes these study guides:
•
|
Precalculus Study Guide contains worked problems, each solved as in a standard textbook, using Maple commands and custom Maplet graphical interfaces.
|
•
|
Calculus Study Guide contains worked problems, each solved as in a standard textbook, using Maple commands and custom Maplet graphical interfaces.
|
|
Teacher Resource Center
|
The Maple Teacher Resource Center contains resources and tips for teachers using Maplesoft products to help in the classroom. Available resources include:
•
|
Classroom content for subjects including Precalculus, Calculus, and Engineering
|
(http://www.maplesoft.com/TeacherResource)
|
Maple Portal
|
The Maple Portal includes material designed for all Maple users as well as a specific portal for students. The Maple Portal includes:
•
|
How Do I... topics that give quick answers to essential questions
|
•
|
Tutorials that provide an overview of topics from getting started to plotting and working with matrices
|
•
|
Navigation to portals with specialized information for students and engineers
|
Access the portal the table of contents in the Maple Help System, under Getting Started.
|
Mathematics and Engineering Dictionary
|
The Maple Help System has an integrated dictionary of over 5000 mathematics and engineering terms. You can search the dictionary by entering a term in the Help System search field.
|
Maple Application Center
|
The Maple Application Center contains tutorials and applications that help instructors begin using Maple and use Maple in the classroom. Browse the many resources by category or search for a topic.
(http://www.maplesoft.com/applications)
|
Student Help Center
|
The Maple Student Help Center contains tutorials and applications that help students learn how to use Maple, explore mathematical concepts, and solve problems. Available resources include:
•
|
Free course lessons for many subjects including precalculus to vector calculus; high school, abstract, and linear algebra; engineering; physics; differential equations; cryptography; and classical mechanics.
|
•
|
Applications for students, written by students, providing examples in many subject areas.
|
•
|
Student FAQs with answers from experts.
|
(https://www.maplesoft.com/studentcenter/index.aspx)
|
|
|
Student Packages and Tutors
|
|
The Student package is a collection of subpackages for teaching and learning mathematics and related subjects. The Student package contains packages for a variety of subjects, including precalculus, calculus, and linear algebra.
Instructors can:
•
|
Teach concepts without being distracted by the mechanics of the computations.
|
•
|
Create examples and quickly update them during a lesson to demonstrate different cases or show the effect of the variation of a parameter.
|
•
|
Create plots and animations to visually explain concepts, for example, the geometric relationship between a mathematical function and its derivatives (Tools→Tutors→Calculus - Single Variable→Derivatives). See Figure 5.10.
|
|
Figure 5.10: Calculus 1 Derivatives Tutor
|
|
|
Students can:
•
|
Perform step-by-step computations, for example, compute a derivative by applying differentiation rules using commands or a tutor (Tools→Tutors→Calculus - Single Variable→Differentiation Methods). See Figure 5.11.
|
•
|
Visually explore concepts.
|
|
Figure 5.11: Calculus 1 Differentiation Methods Tutor
|
|
|
Tutors provide point-and-click interfaces to the Student package functionality.
To launch a tutor:
1.
|
From the Tools menu, select Tutors.
|
2.
|
Select a subject, for example, Calculus - Multivariate.
|
3.
|
Select a tutor, for example, Gradients.
|
Maple inserts the Student[MultivariateCalculus][GradientTutor]() calling sequence (in Worksheet mode), and launches the Multivariate Calculus Gradient Tutor.
By rotating the three-dimensional plot, you can show that the gradient points in the direction of greatest increase of the surface (see Figure 5.12) and show the direction of the gradient vector in the x-y plane by rotating the plot (see Figure 5.13).
|
Figure 5.12: Multivariate Calculus Gradient Tutor
|
|
|
|
Figure 5.13: Multivariate Calculus Gradient Tutor Showing x-y Plane
|
|
|
When you close the tutor, Maple inserts the 3-D plot.
>
|
|
Many Student package commands can return a value, mathematical expression, plot, or animation. This allows you to compute the final answer, see the general formula applied to a specific problem, or visualize the underlying concepts.
For example, the Student[VectorCalculus][LineInt] (line integral) command can return the following.
•
|
Plot that visually indicates the vector field, path of integration, and tangent vectors to the path
|
•
|
Unevaluated line integral
|
•
|
Numeric value of the line integral
|
>
|
|
>
|
|
>
|
|
| (5.9) |
To evaluate the integral returned by the output = integral calling sequence, use the value command.
By default, the LineInt command returns the value of the integral.
>
|
|
For more information on the Student package, refer to the Student help page.
|
|
Calculus Problem Solving Examples
|
|
Maple is a powerful application with many resources to guide you. The following examples provide you with scenarios to learn about using Maple resources and the Maple program.
When using Maple to solve a problem, consider the following process.
1.
|
Formulate your problem.
|
2.
|
Obtain Maple resources that allow you to solve it.
|
|
Problem
|
|
Scenario A:
Your company is designing a bottle for its new spring water product. The bottle must contain 18 ounces of water and the height is fixed. The design includes an undulating curved surface. You know the amplitude and equation of the curve, but you must find the radius. You require the Volume of Revolution.
|
|
Scenario B:
You want to teach your students the concept of a Volume of Revolution. Specifically, you want to plot and compute the volume of a solid generated by rotating , about an axis or a line parallel to an axis.
|
|
|
|
|
Figure 5.14: Flowchart of solving a problem
|
|
|
|
|
Check for Existing Tools: Tutor
|
|
Begin by examining the Tools menu for a Tutor to a Volume of Revolution problem.
To access a Tutor for the Volume of Revolution:
1.
|
From the Tools menu, select Tutors, and then Calculus-Single Variable. Notice that a Volume of Revolution tutor exists.
|
2.
|
Click the Volume of Revolution menu item. The following Maple command is entered in your document.
|
>
|
|
The Volume of Revolution Tutor is displayed. See Figure 5.15. Use this tutor to enter a function and an interval, view and manipulate the corresponding plot, and view the full Maple command associated with your entries and selections.
|
Figure 5.15: Volume of Revolution Tutor
|
|
|
After you Close the tutor, the plot is inserted into your worksheet.
|
|
Check for Existing Tools: Task Template
|
|
1.
|
From the Tools menu, select Tasks, and then Browse. The Browse Tasks dialog opens, displaying a list of tasks in the left pane. The tasks are sorted by subject to help you quickly find the desired task.
|
2.
|
Expand the Calculus - Integral→ Applications → Solids of Revolution folder.
|
3.
|
From the displayed list, select Volume. The Volume of Revolution task is displayed in the right pane of the Browse Tasks dialog.
|
4.
|
Select the Insert into New Worksheet check box.
|
Click Insert Default Content. Before inserting a task, Maple checks whether the task variables have assigned values in your worksheet. If any task variable is assigned, the Task Variables dialog opens allowing you to modify the names. Maple uses the edited variable names for all variable instances in the inserted task. The content is inserted into your document. See Figure 5.16.
|
Figure 5.16: Inserted Task Template
|
|
|
6.
|
When a Task Template is inserted, parameters are marked as placeholders, denoted by purple font. To navigate between placeholders, press the Tab key. After updating any parameters, execute the command by pressing Enter.
|
|
|
Check for Instructions: Help Page and Example Worksheet
|
|
The help system provides command syntax information.
To access a help page:
1.
|
From the Help menu, select Maple Help.
|
2.
|
In the search field, enter volume of revolution and click Search. The search results include the command help page, the dictionary definition, and the associated tutor help page.
|
3.
|
Review the calling sequence, parameters, and description in the Student[Calculus1][VolumeOfRevolution] help page.
|
4.
|
Copy the examples into your worksheet: from the help system Edit menu, select Copy Examples.
|
5.
|
Close the Help Navigator.
|
6.
|
In your document, from the Edit menu, select Paste. The examples are pasted into your document.
|
7.
|
Execute the examples and examine the results.
|
To access an example worksheet:
1.
|
In the worksheet, enter examples/index. The Examples and Applications Index opens.
|
2.
|
Expand the Calculus topic.
|
3.
|
Click the examples/Calculus1IntApps link. The Calculus1: Applications of Integration worksheet opens. See Figure 5.17.
|
4.
|
Expand the Volume of Revolution topic.
|
5.
|
Examine and execute the examples.
|
|
Figure 5.17: Example Worksheet
|
|
|
|
|
Check for Other Ready-To-Use Resources: Application Center
|
|
The Maple Application Center contains free user-contributed applications related to mathematics, education, science, engineering, computer science, statistics and data analysis, finance, communications, graphics, and more.
To access a free application for volume of revolution:
2.
|
In the menu of the main webpage, click Support & Resources, and then Maple Application Center.
|
3.
|
In the Application Search section, enter Volume of Revolution in the Keyword or phrase field.
|
5.
|
From the search results page, under Displaying applications, click the Click here link.
|
6.
|
From the list of archived applications, select any of the Maple document you want to view.
|
7.
|
Click on the Download Maple Document link to download the .mw file.
|
8.
|
Execute the worksheet and examine the results.
|
|
|
|
|
5.8 Clickable MathTM
|
|
For years, Maple has led the way in making math software easy to use. With its collection of Clickable MathTM tools, including palettes, interactive assistants, context-sensitive operations, tutors, and more, Maple has set the standard for making it easy to learn, teach, and do mathematics.
The Study Guides are a core feature of our Clickable Math resources. These are described in Teaching and Learning with Maple.
In addition, two key features of the Clickable Math tool collection are Smart Popups and Drag-to-SolveTM.
|
Smart Popups
|
|
Smart Popups are interactive popup options that are invoked when you select certain types of equations, expressions or subexpressions.
With Smart Popups you can:
•
|
Select operations to apply to just one part of your equation or mathematical expression, leaving the rest unchanged.
|
•
|
Preview the result of the operation before going ahead.
|
•
|
Explore your expression to deepen your understanding of the problem.
|
•
|
Easily determine if your subexpression can be factored, what its plot looks like, what mathematical identities could be applied, and more.
|
Smart popups, if any, are shown at the top of the Context Panel. For more information on Smart Popups, as well as examples, see the Clickable Math: Smart Popups help page.
|
|
Drag-to-Solve
|
|
The Drag-to-Solve feature enables you to solve your equations step-by-step by dragging terms to where you want them to be.
With Drag-to-Solve you can:
•
|
Easily take complete control over each individual step of your calculation.
|
•
|
Let Maple apply the appropriate addition, subtraction, division, or multiplication operation to both sides of your equation, to avoid mechanical errors.
|
•
|
Keep the full record of steps produced by Maple to document your work.
|
For more information on Drag-to-Solve, as well as examples, see the Clickable Math: Drag-to-Solve help page.
|
|
Examples
|
|
This chapter is designed to show several ways to solve the same problem in Maple. Throughout these examples, you will need to insert new document block regions. This is done using the Create document block icon (
) on the toolbar or through the Edit menu, by selecting Document Blocks>Create Document Block. Also, these examples only give the keyboard keys needed for a Windows operating system. Refer to Shortcut Keys by Platform for the keys needed for your operating system.
|
Example 1 - Graph a Function and its Derivatives
|
|
On the interval , graph , , and for .
We solve this problem using the following methods:
|
Solution by Context-Sensitive Operations
|
|
Action
|
Result in Document
|
1.
|
Enter the expression .
|
|
|
Make a copy of the expression and calculate the derivative:
2.
|
Insert a new document block region by selecting from the Format menu Create Document Block.
|
3.
|
Highlight the original expression. Ctrl + drag the expression to the new document block.
|
4.
|
Select the expression and, from the Context Panel select Differentiate → With Respect To → x.
|
|
|
Make a copy of the derivative and calculate the second derivative:
5.
|
Insert a new document block, and Ctrl + drag the derivative to the document block.
|
6.
|
From the Context Panel for the derivative, select Differentiate → With Respect To → x.
|
|
|
Plot the original expression:
7.
|
Insert a new document block, and Ctrl + drag the original expression to the new block.
|
8.
|
From the Context Panel for the expression, select Plots → 2-D Plot.
|
9.
|
Modify the plot through the Context Panel: select Axes → Properties.
|
10.
|
In the Axis Properties dialog, de-select Use data extents and change the range to -3.14 to 3.14. Click OK.
|
|
|
Add the first and second derivatives to the plot:
11.
|
Select and then Ctrl + drag the derivative of the expression onto the plot region. Do the same for the second derivative.
|
|
|
Enhance the plot by adding a legend:
12.
|
From the Context Panel for the plot region, select Legend → Show Legend.
|
13.
|
In the legend, double-click Curve 1. Notice that the Text icon is selected in the toolbar,
. Delete the text and select the Math icon in the toolbar,
. This allows you to enter 2-D Math in a text region. Enter the original expression,
|
14.
|
Repeat for Curve 2 and Curve 3.
|
|
|
Add a title:
15.
|
From the Context Panel, select Title → Add Title.
Replace the text New title with the text "Plot the expression ".
|
16.
|
Click the Math icon, and enter the expression . Click the Text icon once again and enter " and its derivatives".
|
|
|
|
|
|
|
Solution by Tutor
|
|
The Student Calculus 1 package contains a tutor called Derivatives, which displays a plot of the expression along with its derivatives. In this example, we solve the same problem as previously, using this tutor
Action
|
Result in Document
|
1.
|
Load the Student Calculus 1 package. From the Tools menu, select Load Package → Student Calculus 1.
|
2.
|
Ctrl + drag the expression to a blank document block region.
|
|
Loading Student:-Calculus1
|
3.
|
From the Context Panel for the expression, select Student Calculus 1 → Tutors → Derivatives. Note: The Student Calculus 1 menu is now available in the Context Panel because we loaded the package in step 1.
|
In the Derivative Tutor, the color swatch shown beside the original expression is the color used for the curve in the plot region. Similarly for and .
4.
|
Change the lower endpoint to -Pi. Select the check box to display in the plot. Click Display to make these changes take effect.
|
|
|
5.
|
You can change the expression and modify plot options from within this tutor. For each change made, click Display to view the altered plot. When complete, click Close to display the resulting plot in the document.
|
|
|
|
|
|
|
Access the Tutor from a Task Template
|
|
Maple also comes with a Task Template to solve this problem without using any commands.
Action
|
Result in Document
|
1.
|
Launch the Task Template Browser by selecting Tools → Tasks → Browse.
|
2.
|
In the table of contents of the Task Browser dialog, select Calculus -Differential→ Derivatives → Graph and its Derivatives.
|
|
|
3.
|
Click Insert Minimal Content at the top of the dialog to insert the task template into the current document.
|
|
|
4.
|
Enter the new expression in the f(x) region.
|
5.
|
Enter the interval . To insert the symbol for pi, you can use command completion or select from the Common Symbols palette.
|
|
|
6.
|
Click Launch Differentiation Tutor to launch the same tutor as in the previous solution.
|
7.
|
When complete, click Close. A plot of the expression and its derivatives displays in the plot region of the inserted task template.
|
|
|
|
|
|
|
|
Example 2 - Solve for x in a Quadratic Equation
|
|
Solve for in the equation .
We solve this problem using the following methods:
|
Solution through Equation Manipulator
|
|
Maple provides a dialog that allows you to single-step through the process of manipulating an expression. This manipulator is available from the Context Panel.
Action
|
Result in Document
|
1. Enter the equation in a new document block region.
|
|
2.
|
From the Context Panel for this equation, select Manipulate Equation. The Manipulate Equation dialog displays.
|
|
|
Group all of the terms to the left:
3.
|
In the Addition region, the Group terms row allows you to group terms on a specified side. With the left side already selected, click Do.
|
|
|
Expand the left side of the equation:
4.
|
In the Miscellaneous Operations region, we can manipulate the equation by applying a command from the drop-down menus. Since we want to expand the left side of the equation only, click the first drop-down menu in the second row and select expand. Click Do. Note: This example is carried out with no assumptions. You can assume the solution to be real, positive, nonnegative or integer from the drop-down menu.
|
|
|
Factor the equation:
5.
|
From the same drop-down menu, select factor and click Do.
|
|
|
6.
|
Click Return Steps to close the dialog and return all of the steps to the Maple document.
|
|
|
7.
|
Ctrl + drag the factored form of the original equation to a new document block region.
|
8.
|
From the Context Panel, select Solve → Obtain Solutions for → x.
|
Or,
Alternatively, click on the output from step 6 and select Solve → Obtain Solutions for → x in the Context Panel.
|
|
|
|
|
|
Instant Solution
|
|
To apply an instant solution to this problem, use the Context Panel.
Action
|
Result in Document
|
1. Ctrl + drag the equation to a new document block region.
|
|
2.
|
From the Context Panel for the expression, select Solve → Obtain Solutions for → x.
|
|
|
|
|
|
|
Step-by-step Interactive Solution
|
|
This equation can also be solved interactively in the document, by applying context-sensitive operations or commands one step at a time.
Action
|
Result in Document
|
1. Ctrl + drag the equation to a blank document block region.
|
| (5.11) |
|
Group all terms on the right:
2.
|
From the Context Panel for this equation, select Move to Right.
|
|
|
Expand the expression on the right-hand side:
3.
|
From the Context Panel for this output (or Ctrl + drag the equation to a blank document block region), select Right-hand side.
|
4.
|
From the Context Panel for this result, select Expand.
|
|
|
Use Maple's factor command on the resulting right-hand side:
5.
|
From the Context Panel for the result, select Right-hand Side.
|
6.
|
From the Context Panel for the result, select Factor.
|
|
|
Solve for x:
7. From the Context Panel for the result, select Solve → Obtain Solutions for → x.
|
|
|
|
|
|
Graphical Solution
|
|
Now that we have seen several methods to solve this problem, we can check the answer by plotting the expression.
Action
|
Result in Document
|
1. Ctrl + drag the equation to a new document block region and press Enter.
|
|
First, manipulate the equation to become an expression:
2.
|
Select the output and from the Context Panel select Move to Left.
|
Note the difference in the alignment when using context-sensitive operations on output rather than input. The result is centered in the document with the self-documenting arrow positioned at the left.
|
|
3.
|
Select the output and from the Context Panel select Left-hand Side.
|
|
|
4.
|
Select the output and from the Context Panel select Expand.
|
|
|
Now that the equation is in its simplest form, plot the result:
5.
|
Ctrl + drag the output to a new document block.
|
6.
|
From the Context Panel for thee expression select Plots → 2-D Plot.
|
Or,
Right-click the output from step 4 and select Plots → 2-D Plot.
|
|
Change the - and - axis ranges using the Context Panel:
7.
|
By default, the plot uses a range chosen to fit the key features of the graph. To better see the -intercepts, change the range: from the Context Panel, select Axes → Properties. In the Horizontal tab of the Axes Properties dialog, clear the Use data extents check box and change the Range min and Range max to 0 and 5, respectively.
Click the Vertical tab and clear the Use data extents check box. Change the Range min and Range max to -5 and 10, respectively.
|
8.
|
Click OK to apply the changes and return to the plot.
|
The interception points of this graph with the -axis are 1 and 3, the same solutions that we found previously.
|
|
|
|
|
|
Graphical Solution Using Smart Popups
|
|
Use Smart Popup menu options to find a graphical solution.
Copy the equation to a new document block region and press Enter.
|
| (5.12) |
|
Highlight the right-hand side of the output expression. Smart popups are shown in the top of the Context Panel.
|
|
Select the Subtract menu option.
|
|
The results of the calculation are displayed in the document.
|
| (5.13) |
| (5.14) |
|
Select the left side of the equation. A smart popup window is displayed.
|
|
Select normal. The results of the calculation are displayed in the document.
|
| (5.15) |
| (5.16) |
|
Once again, select the left side of the equation. A smart popup window is displayed. Select 2D plot.
|
|
The resulting plot is displayed in the document.
|
| (5.18) |
| (5.19) |
|
You can also solve the equation using smart popups. Highlight the simplified equation and from the Smart Popup menu, select solve.
|
|
The solution to the equation is displayed.
|
|
|
|
|
|
|
Example 3 - Solve a Quadratic Trig Equation
|
|
Find all of the solutions to the equation in the interval .
We solve this problem using the following methods:
|
Graphical Solution
|
|
Action
|
Result in Document
|
1.
|
Ctrl + drag the equation to a blank document block.
|
2.
|
From the Context Panel for the equation, select Left-hand Side.
|
|
|
3.
|
Click the output and select Plot Builder in the Context Panel. A plot appears. In the Plot Builder panel, in the plot type list, the initally selected plot type is 2-D plot.
|
|
|
4.
|
Modify the plot range to to .
|
|
|
5.
|
Click Plot to display the plot in the document.
|
6.
|
From the graph, we can see all of the solutions within the interval . To approximate the values, click the plot, select the type of coordinates that you want to view from the selection menu (
) in the toolbar, and then use the point probe tool to view the coordinates of the mouse pointer.
|
|
|
|
|
|
|
Solution by Task Template
|
|
Action
|
Result in Document
|
1.
|
From the Tools menu, select Tasks → Browse. Expand the Algebra folder and select Solve Analytically in a Specified Interval.
|
|
|
2.
|
Click Insert Minimal Content.
|
|
|
3.
|
Replace the current equation with the one from this example, , and then execute the commands. Notice that equation labels are used to reference the results.
|
|
|
|
|
|
|
Analytic Solution
|
|
Action
|
Result in Document
|
1.
|
Ctrl + drag the equation to a blank document block region.
|
|
|
2.
|
From the Context Panel, select Left-hand Side.
|
|
|
3.
|
From the Context Panel, select Factor.
|
4.
|
Click the new factored output and select Solve → Solve in the Context Panel.
|
Alternatively, you can select each factor, Ctrl + drag the expressions to separate document block regions and for each one select Solve → Solve.
|
=
|
|
|
|
|
|
Example 4 - Find the Inverse Function
|
|
If , find and graph the rule for , its functional inverse.
We solve this problem using the following methods:
|
Implement the Definition Graphically
|
|
The graph of the inverse function is the set of ordered pairs formed by interchanging the ordinates and abscissas.
Action
|
Result in Document
|
1.
|
In a blank document block, enter and press Enter.
|
|
|
2.
|
Click the output and select Plot Builder in the Context Panel. In the Plot Builder panel select 2-D plot (parametric) for the plot type.
The plot appears.
|
|
|
3.
|
Adjust the domain for to the interval .
|
|
|
4.
|
Copy and paste the expression onto this graph.
|
Notice that the axis ranges alter.
|
|
5.
|
Copy and paste the expression onto this graph. The resulting graph shows , , and the line .
|
|
|
Adjust the and axis ranges:
6.
|
Select the plot and from the Plot menu, select Axes → Properties.
|
7.
|
In the Axis Properties dialog, de-select Use data extents and change the range to 0 to 2.
|
8.
|
Click the Vertical tab and repeat step 9. Click OK to apply these settings and close the dialog.
|
|
|
|
|
|
|
Solution by Tutor
|
|
Action
|
Result in Document
|
1.
|
Load the Student Calculus 1 package. From the Tools menu, select Load Package → Student Calculus 1.
|
|
Loading Student:-Calculus1
|
2.
|
Enter the expression in a blank document block.
|
|
|
3.
|
From the Context Panel, select Student Calculus 1 → Tutors → Function Inverse. The Function Inverse Tutor displays.
|
4.
|
Adjust the domain to .
|
|
|
5.
|
When you are finished, click Close. The plot of the function, its inverse, and the line is returned to the document.
|
|
|
|
|
|
|
|
Example 5 - Methods of Integration - Trig Substitution
|
|
Evaluate the integral by making the substitution .
We solve this problem using the following methods:
|
Immediate Evaluation of the Integral
|
|
Action
|
Result in Document
|
1.
|
Enter the integral in a blank document block region.
|
|
|
2.
|
From the Context Panel for the expression and select Evaluate and Display Inline.
|
|
=
|
|
|
|
|
Solution by Integration Methods Tutor
|
|
Action
|
Result in Document
|
1.
|
Load the Student Calculus 1 package. From the Tools menu, select Load Package → Student Calculus 1.
|
|
Loading Student:-Calculus1
|
2.
|
Ctrl + drag the integrand to a blank document block region.
|
|
|
3.
|
From the Context Panel, select Student Calculus 1 → Tutors → Integration Methods. The Integration Methods Tutor displays.
|
|
|
4.
|
Perform a change of variables by selecting Change and entering x = 2*sin(u).
|
|
|
5.
|
Apply the constant rule by clicking Constant.
|
6.
|
To revert back to the original variable, click Revert.
|
|
|
7.
|
Now that the integral has been evaluated, click Close to close the tutor and return the evaluated integral to the document.
|
|
|
|
|
|
|
Solution by First Principles
|
|
Action
|
Result in Document
|
1.
|
Ctrl + drag the integrand to a blank document block region and press Enter.
|
|
|
Perform trig substitution:
2.
|
From the Context Panel for the output, select Evaluate at a point. In the dialog that displays, enter 2*sin(u).
|
|
|
3.
|
From the Context Panel for the output, select Simplify → Symbolic.
|
|
|
Calculate :
4.
|
In a blank document block, enter the substitution equation: and press Enter.
|
5.
|
From the Context Panel for the output, select Differentiate → Implicitly. In the dialog that displays, change the Dependent Variable to x and change Differentiate with respect to to u.
|
|
|
Calculate the integral in terms of :
6.
|
Referencing the results by their equation labels, multiply the original simplified expression by this derivative.
|
|
|
7.
|
Integrate the resulting expression.
|
|
|
Revert the substitution:
8.
|
Place the equation in a blank document block. Delete and insert the equation label for the previous result, the value of the integral in terms of Press Enter.
|
9.
|
From the Context Panel for the output, select Solve → Solve for Variable → u.
|
The solution is .
|
|
|
|
|
|
|
Example 6 - Initial Value Problem
|
|
Solve and plot the solution of the initial value problem
|
|
|
|
|
|
Solution by ODE Analyzer Assistant
|
|
The ODE Analyzer Assistant lets you solve ODEs numerically or symbolically and displays a plot of the solution.
Action
|
Result in Document
|
1.
|
Enter the ODE in a blank document block region.
|
|
|
2.
|
Select the equation and from the Context Panel, select Solve DE Interactively. The ODE Analyzer Assistant displays with the ODE automatically inserted.
|
|
|
To insert the initial conditions:
3.
|
In the Conditions region, click Edit. The Edit Conditions dialog opens.
|
|
|
4.
|
In the Add Condition region, with y selected in the drop-down menu, enter 0 in the first text field to the right and 2 in the second text field. Click Add. Your entry should match the one shown to the right.
|
|
|
5.
|
To enter the initial condition for , select y' from the drop-down menu. In the text fields, enter 0 and -1. Click Add.
|
Click Done to close this dialog and return to the main dialog. Notice that the initial conditions are in the Conditions section.
|
|
6.
|
Click Solve Numerically. A new dialog appears.
|
|
|
7.
|
Click Solve to solve the initial value problem.
|
8.
|
Click Plot to plot the solution of the DE.
|
|
|
9.
|
Click the Plot Options button to modify the default graph, if desired.
|
10.
|
Click Quit to close the ODE Analyzer and return a plot of the solution to the document.
|
|
|
|
|
|
|
|
|
|
Contents Previous Next Index
|