Mathomatic version 14.0.4 (www.mathomatic.org)
Copyright (C) 1987-2008 George Gesslein II.
This program is distributed in the hope that it will be useful.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
100 equation spaces available, 960 kilobytes per equation space.
HTML color mode enabled.
1—> clear all
1—> ; A semicolon is the line comment character.
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))^—)·sign1
2
1—> ; "sign" variables are two-valued variables and may only be +1 or -1.
1—> b ; Solve for b.
1
#1: b = (((c^2) − (a^2))^—)·sign2
2
1—> ; To generate C language code, use the code command:
1—> code C
b = (pow(((c*c) - (a*a)), (1.0/2.0))*sign2);
1—>
1—> code java ; Mathomatic can also generate Java
b = (Math.pow(((c*c) - (a*a)), (1.0/2.0))*sign2);
1—>
1—> code python ; and Python code.
b = ((((c*c) - (a*a))**(1.0/2.0))*sign2)
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)^—)·sign1))
2
#2: b = —————————————————————————————
2
Solutions verified.
2—> a ; solve back for a
Equation is a degree 0.5 polynomial in a.
Raising both sides to the power of 2 and unfactoring...
((b^2) + 1)
#2: a = ———————————
b
2—> simplify
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·(2 + ((388^—)·sign1))
2
#4: x = ————————————————————————
6
Solutions verified.
4—> simplify
1
-1·(1 + ((97^—)·sign1))
2
#4: x = ———————————————————————
3
4—> calculate ; expand "sign" variables and approximate, prompting for any variables in the RHS
Solution number 1 with sign1 = 1:
x = -3.616285933932
Solution number 2 with sign1 = -1:
x = 2.9496192672654
Finished reading file "examples.in".
4—>
End of input.
Mathomatic Home Page