Using MathEclipse

This guide is still under heavy development. Users of MathEclipse are welcome to help expand it.

The MathEclipse project is an effort to create an online based symbolic mathematics calculator and plugin for the Eclipse Framework. Eclipse and MathEclipse are written in Java, and will run on all graphical desktop environments which support Java. MathEclipse is Open Source software, freely available under the Common Public Licence.

MathEclipse has the following features:

  • rule based pattern-matching programming
  • big number support for Integer, Complex, and Rational objects
  • double precision calculation support for Real and ComplexReal objects
  • list manipulations algorithms based on internal Java generics library (see CVS module: org.matheclipse.generics)
  • independent math expression parser (see CVS module: org.matheclipse.parser)


AJAX Online calculator
You can find a first AJAX online demo calculator at this Special page:

Math expression parser API

Contents


Eclipse plugin

The Eclipse plugin is downloadable here:

Installation

  • MathEclipse works with Eclipse versions >= 3.2 and requires a Java version >= 5.0
  • unzip the org.matheclipse_X.X.X.zip into your Eclipse plugins directory.
  • restart Eclipse once with the -clean option.

Workbench Basics

Before you interact with the MathEclipse interpreter, you need to create a MathEclipse project.

MathEclipse Project creation

Select the Eclipse menu File->New->Project. It will bring up the New Project dialog box. Select the wizard MathEclipse Project under the category MathEclipse and click on the Next button.


It will bring up the Project Wizard for MathEclipse.

Type the project name in the Project names textbox and click on the Finish button.

On successful completion of above steps, you will see that a project has been created in your workspace. Also, you will notice that the perspective has changed from Java to MathEclipse.

MathEclipse Perspective

Before we describe the MathEclipse perspective, lets have a look at the project created in the last section. The navigator view on the left shows the project. It consists of a new folder Interpreter and a default interpreter default.mi created under folder Interpreter. If the navigator view's filter does not block resource files starting with a dot ("."), then you will also be able, to see the .project file created for the MathEclipse project.

The central area of the window shows the default.mi interpreter. This is where most of the user interaction happens. Here you will type in commands and look at the response:


Show the MathEclipse Control view

The area at the bottom of the MathEclipse perspective shows the standard Eclipse Console and the MathEclipse Control view.

Enter an expression like 2^32

into the upper text area and press one of the buttons

  • evaluate symbolic
  • evaluate numeric
  • create mathml

to get a result in the lower text area.

Syntax Overview

Type Description Input Examples
Integer integer numbers 42 (decimal), 0x2A (hex), 0o52 (octal), 0b101010(binary)
Rational rational numbers 13/17
Complex complex numbers 2+I*(1/3)
Real double values 0.5, 3.1415927e+29
Complex Real complex double values 0.5-I*0.25
Evaluation Precedence control precedence with (...) (a+b)*c
Lists comma separated list of elements which are sourrounded by { ... } {a, b, c, d}
Vectors vectors are like lists, but cannot contain sublists { ... } {1, 2, 3, 4}
Matrices a matrix contains the rows as sublists {{1, 2}, {3, 4}}
Predefined Functions predefined function names start with an upper case character Sin[0], Cos[Pi/2], PrimeQ[13]
Predefined Constants predefined constant names start with an upper case character Degree, E, Pi, False, True, ...
Userdefined variables identifiers which you would like to assign a value start with a '$' character $a=42
Userdefined rules identifiers which you would like assign a rule start with a '$' character $f{x_,y_]:={x,y}
Pattern Symbols patterns end with a preceding '_' and could have a constraint $f[x_IntegerQ]:={x}
Strings character strings are enclosed by double quote characters "Hello World"
Slots a '#' character followed by an optional number
  1. or #2
Pure Functions pure functions can be expressed with the & operator (#^3)&[x] gives x^3
Parts of an expression expression[[index]] {a, b, c, d}[[2]] gives b