Mathomatic version 14.4.5 (www.mathomatic.org)
Copyright (C) 1987-2009 George Gesslein II.
100 equation spaces available, 1920 Kbytes per equation space.
HTML bold color mode enabled.
1—> ; This is a line comment.  Equations are entered by just typing them in:
1—> c^2=a^2+b^2 ; The Pythagorean theorem, "c" squared equals "a" squared plus "b" squared.

#1: c^2 = (a^2) + (b^2)

1—> ; The entered equation becomes the current equation.
1—> display ; The display command by itself displays the current equation.

#1: c^2 = (a^2) + (b^2)

1—> ; The current equation can be solved by simply typing in a variable name:
1—> c ; which is shorthand for the solve command.  Solve for variable "c":

                         1
#1: c = (((a^2) + (b^2))^)·sign
                         2

1—> ; "sign" variables are special two-valued variables that may only be +1 or -1.
1—> b ; Solve for variable "b".

                         1
#1: b = (((c^2)(a^2))^)·sign0
                         2

1—> ; To output programming language code, use the code command:
1—> code ; C language code is the default.
b = (pow(((c*c) - (a*a)), (1.0/2.0))*sign0);
1—> 
1—> code java ; Mathomatic can also generate Java
b = (Math.pow(((c*c) - (a*a)), (1.0/2.0))*sign0);
1—> 
1—> code python ; and Python code.
b = ((((c*c) - (a*a))**(1.0/2.0))*sign0)
1—> 
1—> ; ********************************************************************
1—> a=b+1/b ; Enter another equation; this is actually a quadratic equation.

            1
#2: a = b + 
            b

2—> solve b ; Solve for variable "b", using the solve command.
Equation is a degree 2 polynomial in (b).
Equation was quadratic.

                           1
        (a − ((((a^2) − 4)^)·sign))
                           2
#2: b = ————————————————————————————
                     2

2—> solve a ; Solve back for "a" and we should get the original equation.
Equation is a degree 0.5 polynomial in (a).
Raising both equation sides to the power of 2 and unfactoring...

        ((b^2) + 1)
#2: a = ———————————
             b

2—> simplify ; The simplify command makes expressions simpler and prettier.

            1
#2: a = b + 
            b

2—> ; ********************************************************************
2—> ; Mathomatic is also handy as an advanced calculator.
2—> ; Expressions without variables entered at the main prompt are instantly evaluated:
2—> 2+3

 answer = 5

2—> 2^.5 ; The square root of 2, rounded to the default 14 digits:

 answer = 1.4142135623731

2—> e^(pi*i)+1 ; Euler's identity is made of the most important universal constants.
Warning: Complex number roots approximated.

 answer = 0

2—> ; ********************************************************************
2—> ; Symbolic logarithms like log(x) are currently not implemented in Mathomatic.
2—> 27^y=9 ; An example that uses numerical logarithms.

#3: 27^y = 9

3—> solve verify y ; Solve for y, verifying the result.

        2
#3: y = —
        3

Solution verified.
3—> ; ********************************************************************
3—> 0=2x^2-3x-20 ; A simple quadratic equation, to show how the calculate command works.

#4: 0 = (2·(x^2))(3·x) − 20

4—> solve verify x ; Solve for x, plugging the result into the original equation to verify.
Equation is a degree 2 polynomial in (x).
Equation was quadratic.

        3   13·sign
#4: x = ———————
        4      4

Solutions verified.
4—> calculate ; Expand "sign" variables and approximate the solutions for x.
There are 2 solutions.

Solution number 1 with sign = 1:
 x = -2.5 = -5/2

Solution number 2 with sign = -1:
 x = 4

4—> display; Show that nothing is modified by the calculate command.

        3   13·sign
#4: x = ———————
        4      4

Finished reading file "examples.in".
4—> 
End of input.

Thank you for using Mathomatic!
mathomatic.org