4.7 Interface to Maple

Module: sage.interfaces.maple

Author Log:

You must have the optional commercial Maple interpreter installed and available as the command maple in your PATH in order to use this interface. You do not have to install any optional SAGE packages.

Type maple.[tab] for a list of all the functions available from your Maple install. Type maple.[tab]? for Maple's help about a given function. Type maple(...) to create a new Maple object, and maple.eval(...) to run a string using Maple (and get the result back as a string).

sage: maple('3 * 5')                       
15
sage: maple.eval('ifactor(2005)')          
'``(5)*``(401)'
sage: maple.ifactor(2005)                  
``(5)*``(401)
sage: maple.fsolve('x^2=cos(x)+4', 'x=0..5')  
1.914020619
sage: maple.factor('x^5 - y^5')            
(x-y)*(x^4+x^3*y+x^2*y^2+x*y^3+y^4)

If the string "error" (case insensitive) occurs in the output of anything from Maple, a RuntimeError exception is raised.



Subsections
See About this document... for information on suggesting changes.