Mathomatic version 14.1.5 (www.mathomatic.org)
Copyright (C) 1987-2008 George Gesslein II.
100 equation spaces available, 960K per equation space.
HTML bold color mode enabled.
1—> ; Equations are entered by just typing them in:
1—> c^2=a^2+b^2 ; The Pythagorean theorem
#1: c^2 = (a^2) + (b^2)
1—> ; The entered equation becomes the current equation.
1—> ; The current equation is solved by typing in a variable name:
1—> c ; Solve for 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 b.
1
#1: b = (((c^2) − (a^2))^—)·sign0
2
1—> ; To generate C programming language code, use the code command:
1—> code C
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
1
#2: a = b + —
b
2—> solve verify b ; solve for "b", verifying the result
Equation is a degree 2 polynomial in b.
Equation was quadratic.
1
(a − ((((a^2) − 4)^—)·sign))
2
#2: b = ————————————————————————————
2
Solutions verified.
2—> 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 a calculator.
2—> ; Expressions without variables are instantly evaluated:
2—> 2+3
answer = 5
2—> 2^.5 ; the square root of 2, rounded to 14 digits:
answer = 1.4142135623731
2—> ; ********************************************************************
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—> 3*x^2+2*x-5 = 27
#4: (3·(x^2)) + (2·x) − 5 = 27
4—> solve verify x ; Solve for x, verifying the result.
Equation is a degree 2 polynomial in x.
Equation was quadratic.
1
-1·(1 + ((97^—)·sign))
2
#4: x = ——————————————————————
3
Solutions verified.
4—> calculate ; expand "sign" variables and approximate
There are 2 solutions.
Solution number 1 with sign = 1:
x = -3.616285933932
Solution number 2 with sign = -1:
x = 2.9496192672654
Finished reading file "examples.in".
4—>
End of input.
mathomatic.org