> f := x -> x^3 - 4*x^2 + cos(x) ;
defines f as a function of x (rather than as an expression)
> fp1 := unapply( diff( f(x), x ), x ) ;
gives f '(x) and stores it as a function named fp1.
> fp2 := unapply( diff( f(x), x$2 ), x ) ;
gives f ''(x) and stores it as a function named fp2.
> fp5 := unapply( diff( f(x), x$5 ), x ) ;
gives f (5)(x) and stores it as a function named fp5.
> g := unapply( 4*f(x) + fp1(x)^2, x ) ;
combines functions f and fp1 and stores it as a function named g.
> int( f(x), x ) ;
gives the integral of f with respect to x
> int( f(x), x = -1 .. 3 ) ;
gives the definite integral of f(x)
from x = 1 to 3
> f := (x,z) -> x^3*sin(z) - 4*x*z^2 + exp(4*z)*cos(x) ;
defines f as a function of x and z (rather than as an expression)
> diff( f(x,z), x ) ; differentiates f with respect to variable x only
> diff( f(x,z), z ) ; differentiates f with respect to variable z only
> int( f(x,z), z ) ; integrates f with respect to variable z only
> int( f(x,z), x = -1 .. 3 ) ; integrates f(x) from x = 1.0 to 3.0
> f := x -> 1/x^3 ; defines f as a function of x (rather than as an expression)
> int( f(x), x ) ;
> int( f(x), x = 1 .. infinity ) ; result: 1/2
NOTE: In maple, the number infinity is represented by infinity.
> f := exp(-x^2); defines f as an expression (rather than as a function)
> int( f, x = -infinity .. infinity ) ; result: Pi1/2
Written and maintained by
Last modified: 03/28/2020
Copyright © 19972022 Kevin G. TeBeest. All rights reserved.
Prof. Kevin G. TeBeest
Maple® is a registered trademark of Waterloo Maple Software.
Applied Mathematics
Kettering University