0% found this document useful (0 votes)
85 views4 pages

Maple Basics and Integration Techniques

The document provides an overview of key concepts for using Maple including: 1) Different brackets have specific uses such as parentheses for expressions, braces for sets, and brackets for lists. 2) Constants like pi, i, and e can be used and functions are defined using commands like diff and int. 3) Variables are assigned using : = and functions take an input to return an output.

Uploaded by

facosot521
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views4 pages

Maple Basics and Integration Techniques

The document provides an overview of key concepts for using Maple including: 1) Different brackets have specific uses such as parentheses for expressions, braces for sets, and brackets for lists. 2) Constants like pi, i, and e can be used and functions are defined using commands like diff and int. 3) Variables are assigned using : = and functions take an input to return an output.

Uploaded by

facosot521
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Notes for Maple

The Basics

The different brackets are not interchangeable:


 ( ) = used in mathematical expressions
 { } = contains elements of a set
 [ ] = contain elements of a list
 < > = used to enter in vectors and matrices.

Constants
 π = Pi
 I = i (sqrt(-1))
 Infinity
 e^x = exp(x)

Assigning Variables

You can assign any Maple expression to a variable for future use.
To assign a variable you must you ‘:=’, with there being no spaces between : and =.

E.g. f:= sin(x), f is assigned the value of sin(x).

Unassigning Variables

To unassign a variable, use the command unassign (‘variable1’, ‘variable2’)

To unassign all variables at once, use the restart command.

Expressions vs Functions

Functions take an input from its domain and returns an output in its range.
g: = x-> x^2-x
g is assigned to be the rule that takes x as input and returns x^2-x as output.
Packages
To load a package, use with(name of package).

Evaluating a function
If a function f is defined, you can use the usual notation f(x) for the value of f at x.

Substituting an expression

Subs
If a function has been assigned, the command Subs (x=value, function) can be used to find f at the
value of x.

Piecewise-Defined functions

Use the function piecewise() to enter a piecewise function.


Simplifying Expressions
 Factor = factorises the polynomial
 Normal = Tries simplifying expressions involving rational functions.

Limits
Can be used to find the limit as an expression approaches a finite value or infinity’ and left hand and
right-hand limits.

Limit(expression, variable = values)

Derivatives

First derivatives

Differentiating an expression

Diff(expression, variable)
Variable = variable that you are differentiating with respect to.

Subs(x=number, Diff(expression, variable))  gives you the derivative of the expression at number

Differentiating a function

D(function)  will give you the first derivative of the function.

D(function)(number)  will give you the value of the first derivative at number.

Higher order derivatives

Expressions

Diff(expression,x,x,x,x,x,x,x)  differentiates the expression 7 times

Diff(expression, x$7)  Differentiates the expression 7 times

Functions

D[1$6](f)  Differentiates f, 6 times and finds its value at 1.

Implicit Differentiation

Implicitdiff(equation, variable1, variable 2)


Will find the derivative of variable 1 with respect to variable2 given that equation holds true.

Use subs(variable1=number, variable2 = number, %)  finds the derivative at certain points.

Maxima and Minima

Use maximize(equation)  to give the global maximum


Use minimize(equation)  to give the global minimum

Minimize(equation,x=interval) gives the local minimum on the interval.

Maximize(equation,x=interval) gives the local maximum on the interval.

Integration

Indefinite Integration

Int(expression, variable)  expression is integrated with respect to variable.


Note that maple does not show +C in these integrals.

Definite Integrals

Int(expression, variable=a..b)
If Maple cannot find an indefinite integral symbolically, it will return it unevaluated.
But, evalf(%) can be used to find a numerical approximation to the definite integral.

Collections of Expressions

Maple Sequences

A list of things separated by commas.

Construct a sequence in Maple by:


 Typing the terms separated by commas
o S1:= 1,1,1,1;
 Using $
o S1:= 1$4;
 Using seq.
o Seq (1,k=1..6);

Sets vs Lists

Sets
 enclosed in a { } bracket.
 Maple doesn’t remember the order of the terms
 Repetitions are removed

Lists
 enclosed in a [ ] bracket
 Maple remembers the order of the terms
 Repetitions are not removed.

Sums and Products

Maple can add or multiply the terms in a Maple sequence, set or list using “add” and “mul”.

‘sum’ and ‘product’ can also be used, but they require the seq syntax to be used.
Manipulating structures

Nops(set) gives you the number of terms in the set/list/sequence

Op(set)  lets you recover the sequence of terms inside a list

Subs(variable=number, to apply over)  replaces a variable with an expression in a list.

Map(variable, what to apply over)  applies a function to each element in a list

Complex Numbers

Evalc(variable/equation)  force maple to give answers in Cartesian form

Re(equation)  gives you the real part of a complex number

Im(equation)  gives you the imaginary part of a complex number

argument(equation)  gives the principal argument of a complex number

abs(equation)  gives the modulus of a complex number

conjugate(equation)  gives the conjugate of a complex number

Common questions

Powered by AI

Maple handles indefinite integration using the Int command. While integrating an expression with respect to a variable, Maple does not display the constant of integration (+C), which is a standard aspect of indefinite integrals. Moreover, if Maple cannot find a symbolic indefinite integral, it returns the integral unevaluated. However, for definite integrals, users can obtain numerical approximations using evalf(%).

In Maple, sequences can be created and manipulated using several methods: by directly typing terms separated by commas (e.g., S1:= 1,1,1,1), using the $ operator to repeat values (e.g., S1:= 1$4), or using the seq function to specify a range (e.g., Seq(1,k=1..6)). Once created, sequences can be further manipulated using functions like 'add' and 'mul' to sum or multiply their terms .

The 'restart' command in Maple is significant because it allows users to unassign all variables at once, effectively resetting the Maple environment to its initial state. This command is useful in scenarios where numerous variables have been assigned and need to be cleared, typically before starting a new calculation sequence or to prevent variable conflicts .

To transform complex numbers to Cartesian form in Maple, the Evalc function is used. Evalc forces Maple to express complex numbers in their standard a + bi form, which is particularly useful when analyzing complex number properties or preparing them for further arithmetic operations. This transformation is essential in many domains of engineering and physics where complex representation aids in the interpretation of results .

The primary difference between sets and lists in Maple is in terms of ordering and repetition. Sets, denoted by { }, do not preserve the order of elements and automatically remove any duplicates, whereas lists, denoted by [ ], preserve the order of elements and allow duplicates to be included .

Implicit differentiation in Maple is used when dealing with equations where the dependent and independent variables are not explicitly separated. It is performed using the Implicitdiff command, which calculates the derivative of one variable with respect to another under the constraint of a given equation. This approach is selected when the function is given implicitly, making explicit differentiation difficult or impossible .

In Maple, the use of different brackets is crucial as they denote specific data structures: round brackets ( ) are for mathematical expressions, curly braces { } denote sets, square brackets [ ] are for lists, and angle brackets < > for vectors and matrices. Each structure behaves differently in terms of order, repetition, and application of functions, making bracket choice critical for correct expression evaluation and manipulation in computational tasks .

In Maple, you can maximize or minimize a function over a specified interval using the Maximize and Minimize commands. For instance, Minimize(equation, x=interval) gives the local minimum of a function over a predefined interval. This is practically applied in optimization problems where we need to find extremum values within specific bounds, which is crucial in fields like operations research and engineering .

In Maple, to differentiate a function multiple times and evaluate it at a specific point, you can use the D operator. For example, D[1$6](f) differentiates the function f six times and evaluates it at the point 1 by using the D operator followed by the specific derivatives count and point in brackets. This method simplifies repeated differentiation and evaluation .

The 'add' and 'mul' commands in Maple perform addition and multiplication, respectively, on the terms within a sequence, set, or list directly. In contrast, 'sum' and 'product' require the use of the seq syntax for specifying the terms to be operated on. This distinction is primarily a syntactical one, affecting how the operations are defined and computed .

You might also like