1-> read test.in 1-> clear all 1-> read fix1 1-> y = (x + (1/x))^3 1 #1: y = (x + -)^3 x 1-> y = (((((a+b)/(b-c))^0.25)+(((b-c)/(a+b))^0.25)+(((a-b)*i/(b-c))^0.5))*(i^0.5))^(1/n) (a + b) 1 (b - c) 1 (a - b)*i# 1 1 1 #2: y = (((-------^-) + (-------^-) + (----------^-))*(i#^-))^- (b - c) 4 (a + b) 4 (b - c) 2 2 n 2-> y = (a^a)*(1+(((a^(a^2))*(b^a))^(1/(1-a)))) 1 #3: y = (a^a)*(1 + (((a^(a^2))*(b^a))^-------)) (1 - a) 3-> y = (a^2)*(1+(((a^(2*((1.5*a)-1)))*(b^a))^(1/(1-a)))) 3*a 1 #4: y = (a^2)*(1 + (((a^(2*(--- - 1)))*(b^a))^-------)) 2 (1 - a) 4-> y = (15*(d^2)/((1+(d^2))^(7/2)))-(12/((1+(d^2))^(5/2)))-6 15*(d^2) 12 #5: y = --------------- - --------------- - 6 7 5 ((1 + (d^2))^-) ((1 + (d^2))^-) 2 2 5-> y = ((9 + (32^.5))^.5) ; should simplify to (1 + 2*(2^.5)) someday 1 1 #6: y = (9 + (32^-))^- 2 2 6-> simp all 1 #1: y = (x + -)^3 x (b + a) 1 (a - b) 1 (c - b) 1 1 #2: y = ((-------^-) + (-------^-) + (-------^-))^- (c - b) 4 (c - b) 2 (a + b) 4 n a #3: y = (a^a) + ((a*b)^-------) (1 - a) a #4: y = (a^2) + ((a*b)^-------) (1 - a) ((d^2) - 4) #5: y = 3*(--------------- - 2) 7 ((1 + (d^2))^-) 2 1 1 #6: y = (9 + (4*(2^-)))^- 2 2 6-> x^(1/99)=x 1 #7: x^-- = x 99 7-> x Raising both sides to the power of 99 and unfactoring... Removing possible solution: "x = 0". #7: x = sign1 7-> calc Solution #1 with sign1 = 1: x = 1 Solution #2 with sign1 = -1: x = -1 7-> (2i)^.5+e^(pi*i) Warning: complex number root approximated, result may be inaccurate. answer = i# 7-> (1-2i)/(3+4i) answer = (-0.4*i#) - 0.2 7-> y=x^3 #8: y = x^3 8-> extrema x #9: x = 0 9-> y=(x+1)^4 #10: y = (x + 1)^4 10-> extrema x #11: x = -1 11-> roots 4 1 0 ; The 4 roots of unity. The polar coordinates are: 1 amplitude and 0 radians (0 degrees). The 4 roots of 1^(1/4) are: 1 Inverse Check: 1 0 +1*i Inverse Check: 1 -1 Inverse Check: 1 0 -1*i Inverse Check: 1 11-> factor number -75 10000000000000 121468070 -75 = 3 * 5^2 * -1 10000000000000 = 2^13 * 5^13 121468070 = 2 * 5 * 12146807 Finished reading file "fix1.in". 11-> clear all 1-> read fix2 1-> b = (-1^(1/((-1*n)+1)*(2+n)))*(a^(1/((-1*n)+1))) (2 + n) 1 #1: b = (-1^-------)*(a^-------) (1 - n) (1 - n) 1-> x = 1/(y^(1/(n-1)*(-2+n)))/((n^(n/(n-1)))-(n^(1/(n-1)))) 1 #2: x = ----------------------------------------- (n - 2) n 1 ((y^-------)*((n^-------) - (n^-------))) (n - 1) (n - 1) (n - 1) 2-> (x+(((1/x)+1)*((x^m)+((a+b)/(x^n)/(c+d)))))/(x+1) 1 (a + b) (x + ((- + 1)*((x^m) + ---------------))) x ((x^n)*(c + d)) #3: ----------------------------------------- (x + 1) 3-> simp all 1 #1: b = ((-1^n)*a)^------- (1 - n) 1 (((y^(n - 2))*n)^-------) (1 - n) #2: x = ------------------------- (n - 1) (b + a)*(x + 1) ((x^2) + ---------------) ((x^n)*(c + d)) #3: (x^(m - 1)) + ------------------------- ((x^2) + x) 3-> 1 1 #1: b = ((-1^n)*a)^------- (1 - n) 1-> a (b^(1 - n)) #1: a = ----------- (-1^n) 1-> simp (b^(1 - n)) #1: a = ----------- (-1^n) 1-> 2 1 (((y^(n - 2))*n)^-------) (1 - n) #2: x = ------------------------- (n - 1) 2-> y ((x*(n - 1))^(1 - n)) 1 #2: y = ---------------------^------- n (n - 2) 2-> simp ((x*(n - 1))^(1 - n)) 1 #2: y = ---------------------^------- n (n - 2) 2-> deri x Differentiating with respect to (x) and simplifying the RHS... (x^(3 - (2*n))) 1 (---------------^-------) ((n^2) - n) (n - 2) #4: y = ------------------------- (2 - n) Finished reading file "fix2.in". 4-> clear all 1-> read fix5 1-> a = (b+((c+1)^0.5))^3 1 #1: a = (b + ((c + 1)^-))^3 2 1-> a = b*c*x*((((x^2)*c)+(b^4))^3)*(x+c) #2: a = b*c*x*((((x^2)*c) + (b^4))^3)*(x + c) 2-> a = (((b^2)+x)^3)*((1/x)+x)*b 1 #3: a = (((b^2) + x)^3)*(- + x)*b x 3-> a = b*(((1/b)+(1/c))^3) 1 1 #4: a = b*((- + -)^3) b c 4-> a = (b^2)*(((1/b)+(1/c))^3) 1 1 #5: a = (b^2)*((- + -)^3) b c 5-> a = (b^2)*((b-c)^3) #6: a = (b^2)*((b - c)^3) 6-> simp all 1 #1: a = (b + ((c + 1)^-))^3 2 #2: a = b*(((b^4) + (c*(x^2)))^3)*(((c^2)*x) + (c*(x^2))) 1 #3: a = b*(((b^2) + x)^3)*(x + -) x b ((1 + -)^3) c #4: a = ----------- (b^2) b ((1 + -)^3) c #5: a = ----------- b #6: a = (b^2)*((b - c)^3) Finished reading file "fix5.in". 6-> clear all 1-> read fix7 1-> (c+a-b)/(b-a) (c + a - b) #1: ----------- (b - a) 1-> ((d*(b+c))+(a*(e1+f)))/(e1+f)/(b+c) ((d*(b + c)) + (a*(e1 + f))) #2: ---------------------------- ((e1 + f)*(b + c)) 2-> ((((e1^2)+d)*b*((b^2)+2))-e1-f)/b/((b^2)+2)/(e1+f) ((((e1^2) + d)*b*((b^2) + 2)) - e1 - f) #3: --------------------------------------- (b*((b^2) + 2)*(e1 + f)) 3-> ((b*((((e1^2)+d)*((b^2)+2))+(b*(e1+f))))+e1+f)/(e1+f)/b/((b^2)+2) ((b*((((e1^2) + d)*((b^2) + 2)) + (b*(e1 + f)))) + e1 + f) #4: ---------------------------------------------------------- ((e1 + f)*b*((b^2) + 2)) 4-> ((1/(x^(1+n)))+(1/(x^n))+(x^(m-1))+(x^m)+x)/(x+1) 1 1 (----------- + ----- + (x^(m - 1)) + (x^m) + x) (x^(1 + n)) (x^n) #5: ----------------------------------------------- (x + 1) 5-> (1/(a + b)) + (1/(b + c)) 1 1 #6: ------- + ------- (a + b) (b + c) 6-> simp all c #1: ------- - 1 (b - a) d a #2: -------- + ------- (e1 + f) (b + c) (d + (e1^2)) 1 #3: ------------ - --------------- (e1 + f) ((b^3) + (2*b)) (d + (e1^2)) (1 + (b^2)) #4: ------------ + --------------- (e1 + f) ((b^3) + (2*b)) 1 (----- + (x^m)) (x^n) x #5: --------------- + ------- x (x + 1) 1 1 #6: ------- + ------- (b + c) (b + a) Finished reading file "fix7.in". 6-> clear all 1-> read fix8 1-> a = (((b^2)*(x^2))+(4*(b^2)*x)+(b^2)+(2*(b^3)*x)+(2*(b^3))+(b^4)+(2*b*(x^2))+(2*b*x)+(x^2))/(((b^3)*(x^2))+(2*(b^4)*x)+(b^5)) (((b^2)*(x^2)) + (4*(b^2)*x) + (b^2) + (2*(b^3)*x) + (2*(b^3)) + (b^4) + (2*b*(x^2)) + (2*b*x) + (x^2)) #1: a = ------------------------------------------------------------------------------------------------------- (((b^3)*(x^2)) + (2*(b^4)*x) + (b^5)) 1-> a = ((x^(2*n))-(z^(2*n)))/((x^n)-(z^n)) ((x^(2*n)) - (z^(2*n))) #2: a = ----------------------- ((x^n) - (z^n)) 2-> y = (((b+1)^0.5)*((b^2.5)+c))+((((b^2)+b)^0.5)*a) 1 5 1 #3: y = (((b + 1)^-)*((b^-) + c)) + ((((b^2) + b)^-)*a) 2 2 2 3-> a = (b^(1-n))/(1+(b^(m-n))) (b^(1 - n)) #4: a = ----------------- (1 + (b^(m - n))) 4-> a = (((b^2)+(b*(c^(1-n)))+(b^0.5))/(b^n)/(1+(b^(m-n))))^0.5 1 ((b^2) + (b*(c^(1 - n))) + (b^-)) 2 1 #5: a = ---------------------------------^- ((b^n)*(1 + (b^(m - n)))) 2 5-> simp all ((1 + b)^2) #1: a = ----------- (b^3) Division simplified with polynomial GCD. #2: a = (x^n) + (z^n) 1 5 1 #3: y = ((b + 1)^-)*((b^-) + ((b^-)*a) + c) 2 2 2 b #4: a = --------------- ((b^n) + (b^m)) 1 ((b^2) + (b*(c^(1 - n))) + (b^-)) 2 1 #5: a = ---------------------------------^- ((b^n) + (b^m)) 2 Finished reading file "fix8.in". 5-> clear all 1-> read fix9 1-> a = ((+/-1000*(b!^4)+/-x)^2)*((1/x)+x)*b 1 #1: a = (((1000*sign1*((b!)^4)) + (sign2*x))^2)*(- + x)*b x 1-> a = ((b+(2*i))^5) #2: a = (b + (2*i#))^5 2-> a = (((1/(b^2))+c)^2)*((1/b)+(c*b)) 1 1 #3: a = ((----- + c)^2)*(- + (c*b)) (b^2) b 3-> a = (6*(b^0.5)-3)^3 1 #4: a = ((6*(b^-)) - 3)^3 2 4-> a = (2-(4/(c-b)))^3 4 #5: a = (2 - -------)^3 (c - b) 5-> a = ((x^n)-(y^n))^3 #6: a = ((x^n) - (y^n))^3 6-> val = (((e*((2*(x^3)) + 24 + (x!) - zy)) - pi)/e)^2 ((e#*((2*(x^3)) + 24 + (x!) - zy)) - pi#) #7: val = -----------------------------------------^2 e# 7-> simplify all 1 #1: a = ((x + (1000*sign1*sign2*((b!)^4)))^2)*b*(x + -) x #2: a = (b + (2*i#))^5 ((1 + (c*(b^2)))^3) #3: a = ------------------- (b^5) 1 #4: a = -27*((1 - (2*(b^-)))^3) 2 2 #5: a = 8*((1 - -------)^3) (c - b) #6: a = ((x^n) - (y^n))^3 pi# #7: val = (zy - 24 - (x!) - (2*(x^3)) + ---)^2 e# 7-> display factor all 1 #1: a = ((x + (((2^3)*(5^3))*sign1*sign2*((b!)^(2^2))))^2)*b*(x + -) x #2: a = (b + (2*i#))^5 ((1 + (c*(b^2)))^3) #3: a = ------------------- (b^5) 1 #4: a = ((3^3)*-1)*((1 - (2*(b^-)))^3) 2 2 #5: a = (2^3)*((1 - -------)^3) (c - b) #6: a = ((x^n) - (y^n))^3 pi# #7: val = (zy - ((2^3)*3) - (x!) - (2*(x^3)) + ---)^2 e# 7-> 2 #2: a = (b + (2*i#))^5 2-> real #8: a = (b^5) - (40*(b^3)) + (80*b) 8-> 2 #2: a = (b^5) + (10*i#*(b^4)) - (80*i#*(b^2)) + (32*i#) - (40*(b^3)) + (80*b) 2-> imaginary #9: a = (10*i#*(b^4)) - (80*i#*(b^2)) + (32*i#) 9-> replace i with 1 #9: a = (10*(b^4)) - (80*(b^2)) + 32 Finished reading file "fix9.in". Finished reading file "test.in". 9-> read pie.in 9-> clear all 1-> 1-> ; This is the famous Bailey-Borwein-Plouffe (BBP) algorithm. 1-> ; Sum this n = 0 to infinity to compute pi. 1-> ; This is especially useful for calculating pi in hexadecimal. 1-> ; One hexadecimal digit of pi is generated with each iteration. 1-> 1-> ((4/((8*n) + 1)) - (2/((8*n) + 4)) - (1/((8*n) + 5)) - (1/((8*n) + 6)))/(16^n) 4 2 1 1 (----------- - ----------- - ----------- - -----------) ((8*n) + 1) ((8*n) + 4) ((8*n) + 5) ((8*n) + 6) #1: ------------------------------------------------------- (16^n) 1-> simplify ((120*(n^2)) + (151*n) + 47) #1: ------------------------------------------------------------------ ((16^n)*((512*(n^4)) + (1024*(n^3)) + (712*(n^2)) + (194*n) + 15)) 1-> sum n 0 10 ; Sum as n goes from 0 to 10. #2: 3.1415926535898 1-> pi ; Verify that the digits are the same. answer = 3.1415926535898 1-> x^n/n! ; Sum this n = 0 to infinity to compute (e^x). (x^n) #3: ----- (n!) 3-> replace x with 1 ; Sum this n = 0 to infinity to compute e: 1 #3: ---- (n!) 3-> sum n 0 20 ; Sum as n goes from 0 to 20. #4: 2.718281828459 3-> e ; Verify that the digits are the same. answer = 2.718281828459 Finished reading file "pie.in". 3-> read demo.in 3-> ; A small Mathomatic demonstration. 3-> 3-> clear all 1-> y=x_new^n #1: y = x_new^n 1-> 0 ; solve for zero #1: 0 = (x_new^n) - y 1-> taylor x_new 1 x_old ; build the nth root approximation equation 1 derivative applied. #2: 0 = (x_old^n) - y + (n*(x_old^(n - 1))*(x_new - x_old)) 2-> x_new ; solve for the wanted variable (y - (x_old^n)) #2: x_new = x_old*(--------------- + 1) ((x_old^n)*n) 2-> simplify ; convergent nth root approximation equation: y (--------- - 1) (x_old^n) #2: x_new = x_old*(1 + ---------------) n 2-> replace x_old x_new with x ; make old and new the same y (----- - 1) (x^n) #2: x = x*(1 + -----------) n 2-> x ; make sure it is correct by solving for x Removing possible solution: "x = 0". 1 #2: x = y^- n 2-> 2-> y=x^(1/3)+x^(2/3) ; a quadratic, cubed root equation 1 2 #3: y = (x^-) + (x^-) 3 3 3-> x ; solve for x Equation was a degree 0.66666666666667 quadratic. 1 -1*(1 + (((1 + (4*y))^-)*sign1)) 2 #3: x = --------------------------------^3 2 3-> expand 1 3 -3*((1 + (4*y))^-)*sign1 ((1 + (4*y))^-)*sign1 2 1 3*y 2 #3: x = ------------------------ - - - --- - --------------------- 8 2 2 8 3-> simplify 1 -1*((sign1*((1 + (4*y))^-)*(y + 1)) + 1 + (3*y)) 2 #3: x = ------------------------------------------------ 2 3-> 3-> e^x ; exponential function #4: e#^x 4-> taylor x 10 0 ; generate a 10th order taylor series of the exponential function 10 derivatives applied. (x^2) (x^3) (x^4) (x^5) (x^6) (x^7) (x^8) (x^9) (x^10) #5: 1 + x + ----- + ----- + ----- + ----- + ----- + ----- + ----- + ------ + ------- 2 6 24 120 720 5040 40320 362880 3628800 5-> laplace x ; do a Laplace transform on it 1 1 1 1 1 1 1 1 1 1 1 #6: - + ----- + ----- + ----- + ----- + ----- + ----- + ----- + ----- + ------ + ------ x (x^2) (x^3) (x^4) (x^5) (x^6) (x^7) (x^8) (x^9) (x^10) (x^11) 6-> laplace inverse x ; undo the transform (x^2) (x^3) (x^4) (x^5) (x^6) (x^7) (x^8) (x^9) (x^10) #7: 1 + x + ----- + ----- + ----- + ----- + ----- + ----- + ----- + ------ + ------- 2 6 24 120 720 5040 40320 362880 3628800 Finished reading file "demo.in". 7-> read limits.in 7-> ; Tests for the experimental limit command. 7-> 7-> clear all 1-> ; find the derivative of 1/(x^.5) using the difference quotient: 1-> (1/(x+h)^.5-1/x^.5)/h 1 1 (----------- - -----) 1 1 ((x + h)^-) (x^-) 2 2 #1: --------------------- h 1-> limit h 0 ; take the limit as h goes to 0 Raising both sides to the power of 2 and unfactoring... Removing possible solution: "h = 0". Equation was quadratic. Raising both sides to the power of 2 and unfactoring... -1 #2: answer = --------- 3 (2*(x^-)) 2 2-> integrate x ; take the anti-derivative to see if it's right 1 #3: answer = ----- 1 (x^-) 2 3-> 3-> ; test infinity limits: 3-> (3x+100-a)/(x-b) ((3*x) + 100 - a) #4: ----------------- (x - b) 4-> limit x inf ; answer should be 3 #5: answer = 3 5-> 5-> (((x^2) - (5*x) + 6)^(1/2)) - x 1 #6: (((x^2) - (5*x) + 6)^-) - x 2 6-> limit x inf ; answer should be -5/2 Raising both sides to the power of 2 and unfactoring... Equation was quadratic. -5 #7: answer = -- 2 7-> 7-> x*((x^2+1)^.5-x) 1 #8: x*((((x^2) + 1)^-) - x) 2 8-> limit x inf ; answer should be 1/2 Raising both sides to the power of 2 and unfactoring... Equation was biquadratic. 1 #9: answer = - 2 Finished reading file "limits.in". 9-> read poly.in 9-> ; Combine 3 quadratic polynomials with 3 unknown coefficients (a, b, c). 9-> ; Solve for a, b, and c. 9-> 9-> clear all 1-> y1=a+b*x1+c*x1^2 #1: y1 = a + (b*x1) + (c*(x1^2)) 1-> y2=a+b*x2+c*x2^2 #2: y2 = a + (b*x2) + (c*(x2^2)) 2-> y3=a+b*x3+c*x3^2 #3: y3 = a + (b*x3) + (c*(x3^2)) 3-> 2 ; select equation number 2 #2: y2 = a + (b*x2) + (c*(x2^2)) 2-> eliminate a ; eliminate variable (a) from the current equation Solving equation #1 for (a) and substituting into the current equation... #2: y2 = (b*x2) - (x1*(b + (c*x1))) + y1 + (c*(x2^2)) 2-> 3 ; select equation number 3 #3: y3 = a + (b*x3) + (c*(x3^2)) 3-> eliminate a b ; eliminate variables (a) and (b) Solving equation #1 for (a) and substituting into the current equation... Solving equation #2 for (b) and substituting into the current equation... (y1 - y2 + (c*((x2^2) - (x1^2))))*x3 (y1 - y2 + (c*((x2^2) - (x1^2)))) #3: y3 = ------------------------------------ - (x1*(--------------------------------- + (c*x1))) + y1 + (c*(x3^2)) (x1 - x2) (x1 - x2) 3-> c ; solve for c ((y2*(x1 - x3)) + (y1*(x3 - x2)) - (y3*(x1 - x2))) #3: c = ----------------------------------------------------------------- ((x1*((x2^2) + (x1*(x3 - x2)))) - (x3*((x2^2) + (x3*(x1 - x2))))) 3-> 2 ; select equation number 2 again (y1 - y2 + (c*((x2^2) - (x1^2)))) #2: b = --------------------------------- (x1 - x2) 2-> eliminate c using 3 ; eliminate (c) using equation number 3 Solving equation #3 for (c) and substituting into the current equation... ((y2*(x1 - x3)) + (y1*(x3 - x2)) - (y3*(x1 - x2)))*((x2^2) - (x1^2)) (y1 - y2 + --------------------------------------------------------------------) ((x1*((x2^2) + (x1*(x3 - x2)))) - (x3*((x2^2) + (x3*(x1 - x2))))) #2: b = -------------------------------------------------------------------------------- (x1 - x2) 2-> 1 ; select equation number 1 #1: a = -1*((x1*(b + (c*x1))) - y1) 1-> eliminate b c ; the final elimination Solving equation #2 for (b) and substituting into the current equation... Solving equation #3 for (c) and substituting into the current equation... ((((x1*((x2^2) + (x1*(x3 - x2)))) - (x3*((x2^2) + (x3*(x1 - x2)))))*(y1 - y2)) + (((y2*(x1 - x3)) + (y1*(x3 - x2)) - (y3*(x1 - x2)))*((x2^2) - (x1^2)))) ((y2*(x1 - x3)) + (y1*(x3 - x2)) - (y3*(x1 - x2)))*x1 #1: a = -1*((x1*(-------------------------------------------------------------------------------------------------------------------------------------------------------- + -----------------------------------------------------------------)) - y1) (((x1*((x2^2) + (x1*(x3 - x2)))) - (x3*((x2^2) + (x3*(x1 - x2)))))*(x1 - x2)) ((x1*((x2^2) + (x1*(x3 - x2)))) - (x3*((x2^2) + (x3*(x1 - x2))))) 1-> simplify all ; list all solutions Division simplified with polynomial GCD. y1*((x2*(x3^2)) - ((x2^2)*x3)) ((x2*x1*y3) + ------------------------------) (x2 - x1) x3*x1*y2 (--------------------------------------------- - ---------) (x3 - x1) (x2 - x1) #1: a = ----------------------------------------------------------- (x3 - x2) (((x1^2)*(y2 - y3)) + ((x3^2)*(y1 - y2)) + ((x2^2)*(y3 - y1))) #2: b = -------------------------------------------------------------- ((x2 - x1)*(x3 - x1)*(x2 - x3)) (y1 - y2) (y3 - y2) (--------- + ---------) (x2 - x1) (x3 - x2) #3: c = ----------------------- (x3 - x1) 1-> fraction all ; convert to simple fractions ((x1*((x2*y3*(x2 - x1)) - (x3*y2*(x3 - x1)))) + (y1*((x2*(x3^2)) - ((x2^2)*x3)))) #1: a = --------------------------------------------------------------------------------- ((x3 - x1)*(x2 - x1)*(x3 - x2)) (((x1^2)*(y2 - y3)) + ((x3^2)*(y1 - y2)) + ((x2^2)*(y3 - y1))) #2: b = -------------------------------------------------------------- ((x2 - x1)*(x3 - x1)*(x2 - x3)) (((y1 - y2)*(x3 - x2)) + ((y3 - y2)*(x2 - x1))) #3: c = ----------------------------------------------- ((x2 - x1)*(x3 - x2)*(x3 - x1)) Finished reading file "poly.in". 1-> read linear.in 1-> ; Combine 3 simultaneous linear equations with 3 unknowns (x, y, z). 1-> ; Solve for all 3 unknowns using the "eliminate" command. 1-> 1-> clear all 1-> d1=a1*x+b1*y+c1*z #1: d1 = (a1*x) + (b1*y) + (c1*z) 1-> d2=a2*x+b2*y+c2*z #2: d2 = (a2*x) + (b2*y) + (c2*z) 2-> d3=a3*x+b3*y+c3*z #3: d3 = (a3*x) + (b3*y) + (c3*z) 3-> 2 ; select equation number 2 #2: d2 = (a2*x) + (b2*y) + (c2*z) 2-> eliminate x Solving equation #1 for (x) and substituting into the current equation... a2*((b1*y) + (c1*z) - d1) #2: d2 = (b2*y) - ------------------------- + (c2*z) a1 2-> 3 ; select equation number 3 #3: d3 = (a3*x) + (b3*y) + (c3*z) 3-> eliminate x y Solving equation #1 for (x) and substituting into the current equation... Solving equation #2 for (y) and substituting into the current equation... b1*((z*((c2*a1) - (a2*c1))) + (a2*d1) - (d2*a1)) a3*(------------------------------------------------ + (c1*z) - d1) b3*((z*((c2*a1) - (a2*c1))) + (a2*d1) - (d2*a1)) ((a2*b1) - (b2*a1)) #3: d3 = ------------------------------------------------ - ------------------------------------------------------------------- + (c3*z) ((a2*b1) - (b2*a1)) a1 3-> z ; solve for z ((d3*((a2*b1) - (a1*b2))) + (b3*((d2*a1) - (a2*d1))) + (a3*((b2*d1) - (b1*d2)))) #3: z = -------------------------------------------------------------------------------- ((b3*((c2*a1) - (a2*c1))) + (a3*((b2*c1) - (b1*c2))) + (c3*((a2*b1) - (a1*b2)))) 3-> 2 ; select equation number 2 ((z*((c2*a1) - (a2*c1))) + (a2*d1) - (d2*a1)) #2: y = --------------------------------------------- ((a2*b1) - (b2*a1)) 2-> eliminate z using 3 Solving equation #3 for (z) and substituting into the current equation... ((d3*((a2*b1) - (a1*b2))) + (b3*((d2*a1) - (a2*d1))) + (a3*((b2*d1) - (b1*d2))))*((c2*a1) - (a2*c1)) (---------------------------------------------------------------------------------------------------- + (a2*d1) - (d2*a1)) ((b3*((c2*a1) - (a2*c1))) + (a3*((b2*c1) - (b1*c2))) + (c3*((a2*b1) - (a1*b2)))) #2: y = -------------------------------------------------------------------------------------------------------------------------- ((a2*b1) - (b2*a1)) 2-> 1 ; select equation number 1 -1*((b1*y) + (c1*z) - d1) #1: x = ------------------------- a1 1-> eliminate y z Solving equation #2 for (y) and substituting into the current equation... Solving equation #3 for (z) and substituting into the current equation... b1*((((d3*((a2*b1) - (a1*b2))) + (b3*((d2*a1) - (a2*d1))) + (a3*((b2*d1) - (b1*d2))))*((c2*a1) - (a2*c1))) + (((b3*((c2*a1) - (a2*c1))) + (a3*((b2*c1) - (b1*c2))) + (c3*((a2*b1) - (a1*b2))))*((a2*d1) - (d2*a1)))) c1*((d3*((a2*b1) - (a1*b2))) + (b3*((d2*a1) - (a2*d1))) + (a3*((b2*d1) - (b1*d2)))) -1*(-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------- - d1) (((b3*((c2*a1) - (a2*c1))) + (a3*((b2*c1) - (b1*c2))) + (c3*((a2*b1) - (a1*b2))))*((a2*b1) - (b2*a1))) ((b3*((c2*a1) - (a2*c1))) + (a3*((b2*c1) - (b1*c2))) + (c3*((a2*b1) - (a1*b2)))) #1: x = -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- a1 1-> simplify all ; list all solutions ((b1*((c3*d2) - (c2*d3))) + (c1*((d3*b2) - (b3*d2))) + (d1*((b3*c2) - (c3*b2)))) #1: x = -------------------------------------------------------------------------------- ((a1*((b3*c2) - (c3*b2))) + (c1*((a3*b2) - (b3*a2))) + (b1*((c3*a2) - (a3*c2)))) ((a1*((d3*c2) - (c3*d2))) + (c1*((a3*d2) - (d3*a2))) + (d1*((c3*a2) - (a3*c2)))) #2: y = -------------------------------------------------------------------------------- ((a1*((b3*c2) - (c3*b2))) + (c1*((a3*b2) - (b3*a2))) + (b1*((c3*a2) - (a3*c2)))) ((b1*((d3*a2) - (a3*d2))) + (a1*((b3*d2) - (d3*b2))) + (d1*((a3*b2) - (b3*a2)))) #3: z = -------------------------------------------------------------------------------- ((a1*((b3*c2) - (c3*b2))) + (c1*((a3*b2) - (b3*a2))) + (b1*((c3*a2) - (a3*c2)))) Finished reading file "linear.in". 1-> read examples.in 1-> clear all 1-> ; A semicolon is the line comment character. 1-> 1-> c^2=a^2+b^2 ; The Pythagorean Theorem. Equations are entered by just typing them in. #1: c^2 = (a^2) + (b^2) 1-> c ; Solve for c. Equations are solved by typing in the variable. 1 #1: c = (((a^2) + (b^2))^-)*sign1 2 1-> ; "sign" variables are special variables and may only be +1 or -1. 1-> 1-> code c ; Generate C code. c = (pow(((a * a) + (b * b)), (1.0 / 2.0)) * sign1); 1-> 1-> code python; Generate Python code. c = ((((a * a) + (b * b)) ** (1.0 / 2.0)) * sign1) 1-> 1-> b ; Solve for b. 1 #1: b = (((c^2) - (a^2))^-)*sign2 2 1-> y=x+1/x ; A simple quadratic. 1 #2: y = x + - x 2-> x ; Solve for x. Equation was quadratic. 1 (y - ((((y^2) - 4)^-)*sign1)) 2 #2: x = ----------------------------- 2 2-> y ; Solve for y to check the answer. Raising both sides to the power of 2 and unfactoring... ((x^2) + 1) #2: y = ----------- x 2-> simplify 1 #2: y = x + - x 2-> extrema x ; Determine the location of the maximums and minimums of this equation. #3: x = sign1 3-> calculate ; Approximate numerical expressions and expand sign variables. Solution #1 with sign1 = 1: x = 1 Solution #2 with sign1 = -1: x = -1 3-> ; Mathomatic is also handy as an advanced calculator: 3-> 1+2 answer = 3 3-> 2^.5 ; the square root of 2, rounded to 14 digits answer = 1.4142135623731 3-> 27^y=9 #4: 27^y = 9 4-> y ; Solve for y. 2 #4: y = - 3 Finished reading file "examples.in". 4-> read test1.in 4-> clear all 1-> y = .6666 - (4*(((10*(pi^2)*(r^3)/((d^2)*g*m*epsilon)) - 1)^(1/2))/15) 10*(pi#^2)*(r^3) 1 4*((------------------- - 1)^-) ((d^2)*g*m*epsilon) 2 #1: y = 0.6666 - ------------------------------- 15 1-> simp pi# 10*(---^2)*(r^3) d 1 4*((---------------- - 1)^-) (g*m*epsilon) 2 #1: y = 0.6666 - ---------------------------- 15 1-> simp symbolic 10*(pi#^2)*(r^3) 1 4*((---------------- - (d^2))^-) (g*m*epsilon) 2 #1: y = 0.6666 - -------------------------------- (15*d) 1-> Finished reading file "test1.in". 1-> read test2.in 1-> clear all 1-> y=(a/2)^2/b/4 a (-^2) 2 #1: y = ----- (4*b) 1-> l=f*(b-y)+z*(a-f) #2: l = (f*(b - y)) + (z*(a - f)) 2-> m=2*(b-y)-a+f #3: m = (2*(b - y)) - a + f 3-> n=2*(b-y)+a-f #4: n = (2*(b - y)) + a - f 4-> o=l*(1/m-1/n)/2 1 1 l*(- - -) m n #5: o = --------- 2 5-> elim l m n y Solving equation #2 for (l) and substituting into the current equation... Solving equation #3 for (m) and substituting into the current equation... Solving equation #4 for (n) and substituting into the current equation... Solving equation #1 for (y) and substituting into the current equation... (a^2) 1 1 ((f*(b - ------)) + (z*(a - f)))*(-------------------------- - --------------------------) (16*b) (a^2) (a^2) ((2*(b - ------)) - a + f) ((2*(b - ------)) + a - f) (16*b) (16*b) #5: o = ------------------------------------------------------------------------------------------ 2 5-> simp 4*((f*((16*(b^3)) - (b*(a^2)))) + (16*(b^2)*z*(a - f)))*(a - f) #5: o = --------------------------------------------------------------------- ((256*(b^4)) + ((b^2)*((128*a*f) - (96*(a^2)) - (64*(f^2)))) + (a^4)) 5-> copy 4*((f*((16*(b^3)) - (b*(a^2)))) + (16*(b^2)*z*(a - f)))*(a - f) #6: o = --------------------------------------------------------------------- ((256*(b^4)) + ((b^2)*((128*a*f) - (96*(a^2)) - (64*(f^2)))) + (a^4)) 5-> f Equation was quadratic. 1 ((16*b*((b*((b*((32*b*(((a^2)*((8*b*(b + (3*o))) - (16*o*(z + o)) - (a^2))) + (128*(b^2)*o*(z - b + o)))) - (48*(a^4)*o))) + ((a^4)*((a^2) + (16*o*(z + o)))))) + ((a^6)*o)))^-)*sign1 2 (-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + (2*b*a*((16*b*(b - (2*(z + o)))) - (a^2)))) 2 #5: f = ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- (4*b*((16*b*(b - z - o)) - (a^2))) 5-> simp symb 1 ((sign1*((((b^2)*((a^2) + (16*((o^2) + (o*z))))) + (o*(((a^2)*b) - (16*(b^3)))))^-)*((16*(b^2)) - (a^2))) - (16*(b^2)*a*(z + o))) 2 (a + ---------------------------------------------------------------------------------------------------------------------------------) ((16*((b^3) - ((b^2)*(z + o)))) - (b*(a^2))) #5: f = --------------------------------------------------------------------------------------------------------------------------------------- 2 5-> 6 4*((f*((16*(b^3)) - (b*(a^2)))) + (16*(b^2)*z*(a - f)))*(a - f) #6: o = --------------------------------------------------------------------- ((256*(b^4)) + ((b^2)*((128*a*f) - (96*(a^2)) - (64*(f^2)))) + (a^4)) 6-> deri z Differentiating with respect to (z) and simplifying the RHS... 64*((b*(a - f))^2) #7: o = --------------------------------------------------------------------- ((256*(b^4)) + ((b^2)*((128*a*f) - (96*(a^2)) - (64*(f^2)))) + (a^4)) 7-> f Equation was quadratic. 1 ((256*(b^2)*o*(1 + o)*((32*(b^2)*((8*(b^2)) - (a^2))) + (a^4)))^-)*sign2 2 -1*(------------------------------------------------------------------------ - (64*(b^2)*a*(1 + o))) 2 #7: f = ---------------------------------------------------------------------------------------------------- (64*(b^2)*(1 + o)) 7-> simp symb 1 (a^2) sign2*((o + (o^2))^-)*((16*b) - -----) 2 b #7: f = a + -------------------------------------- (8*(1 + o)) 7-> simp symb o 1 (a^2) #7: f = a + (sign2*(-------^-)*((2*b) - -----)) (1 + o) 2 (8*b) Finished reading file "test2.in". 7-> read test3.in 7-> ; Combine 3 linear equations in 3 unknowns (x, y, z) 7-> ; and solve for every variable to test Mathomatic. 7-> 7-> clear all 1-> b1=a0*x+a1*y+a2*z #1: b1 = (a0*x) + (a1*y) + (a2*z) 1-> b2=a3*x+a4*y+a5*z #2: b2 = (a3*x) + (a4*y) + (a5*z) 2-> b3=a6*x+a7*y+a8*z #3: b3 = (a6*x) + (a7*y) + (a8*z) 3-> 2 #2: b2 = (a3*x) + (a4*y) + (a5*z) 2-> eliminate x using 1 Solving equation #1 for (x) and substituting into the current equation... a3*((a1*y) + (a2*z) - b1) #2: b2 = (a4*y) - ------------------------- + (a5*z) a0 2-> 3 #3: b3 = (a6*x) + (a7*y) + (a8*z) 3-> eliminate x y Solving equation #1 for (x) and substituting into the current equation... Solving equation #2 for (y) and substituting into the current equation... a1*((z*((a5*a0) - (a3*a2))) + (a3*b1) - (b2*a0)) a6*(------------------------------------------------ + (a2*z) - b1) a7*((z*((a5*a0) - (a3*a2))) + (a3*b1) - (b2*a0)) ((a3*a1) - (a4*a0)) #3: b3 = ------------------------------------------------ - ------------------------------------------------------------------- + (a8*z) ((a3*a1) - (a4*a0)) a0 3-> z ((b3*((a3*a1) - (a0*a4))) + (a7*((b2*a0) - (a3*b1))) + (a6*((a4*b1) - (a1*b2)))) #3: z = -------------------------------------------------------------------------------- ((a7*((a5*a0) - (a3*a2))) + (a6*((a4*a2) - (a1*a5))) + (a8*((a3*a1) - (a0*a4)))) 3-> z = ((((a0*a4)-(a1*a3))*b3)+(a6*((-1.0*a4*b1)+(a1*b2)))+(a7*((a3*b1)-(a0*b2))))/((a6*((-1.0*a4*a2)+(a1*a5)))+(a8*((a0*a4)-(a1*a3)))+(a7*((a3*a2)-(a0*a5)))) ((((a0*a4) - (a1*a3))*b3) + (a6*((a1*b2) - (a4*b1))) + (a7*((a3*b1) - (a0*b2)))) #4: z = -------------------------------------------------------------------------------- ((a6*((a1*a5) - (a4*a2))) + (a8*((a0*a4) - (a1*a3))) + (a7*((a3*a2) - (a0*a5)))) 4-> compare 3 with 4 Comparing #3 with #4... Equations are identical. 4-> 3 ((b3*((a3*a1) - (a0*a4))) + (a7*((b2*a0) - (a3*b1))) + (a6*((a4*b1) - (a1*b2)))) #3: z = -------------------------------------------------------------------------------- ((a7*((a5*a0) - (a3*a2))) + (a6*((a4*a2) - (a1*a5))) + (a8*((a3*a1) - (a0*a4)))) 3-> b1 ((z*((a7*((a5*a0) - (a3*a2))) + (a6*((a4*a2) - (a1*a5))) + (a8*((a3*a1) - (a0*a4))))) - (b3*((a3*a1) - (a0*a4))) + (b2*((a6*a1) - (a7*a0)))) #3: b1 = -------------------------------------------------------------------------------------------------------------------------------------------- ((a6*a4) - (a7*a3)) 3-> b2 ((b1*((a6*a4) - (a7*a3))) - (z*((a7*((a5*a0) - (a3*a2))) + (a6*((a4*a2) - (a1*a5))) + (a8*((a3*a1) - (a0*a4))))) + (b3*((a3*a1) - (a0*a4)))) #3: b2 = -------------------------------------------------------------------------------------------------------------------------------------------- ((a6*a1) - (a7*a0)) 3-> b3 ((b2*((a6*a1) - (a7*a0))) - (b1*((a6*a4) - (a7*a3))) + (z*((a7*((a5*a0) - (a3*a2))) + (a6*((a4*a2) - (a1*a5))) + (a8*((a3*a1) - (a0*a4)))))) #3: b3 = -------------------------------------------------------------------------------------------------------------------------------------------- ((a3*a1) - (a0*a4)) 3-> a0 ((a3*((a1*(b3 - (z*a8))) - (a7*(b1 - (z*a2))))) - (a6*((a1*(b2 - (z*a5))) + (a4*((z*a2) - b1))))) #3: a0 = ------------------------------------------------------------------------------------------------- ((a7*((z*a5) - b2)) + (a4*(b3 - (z*a8)))) 3-> a1 ((a0*((a7*((z*a5) - b2)) + (a4*(b3 - (z*a8))))) + ((b1 - (z*a2))*((a3*a7) - (a6*a4)))) #3: a1 = -------------------------------------------------------------------------------------- ((a3*(b3 - (z*a8))) + (a6*((z*a5) - b2))) 3-> a2 -1*((a1*((a3*(b3 - (z*a8))) + (a6*((z*a5) - b2)))) - (a0*((a7*((z*a5) - b2)) + (a4*(b3 - (z*a8))))) - (b1*((a3*a7) - (a6*a4)))) #3: a2 = ------------------------------------------------------------------------------------------------------------------------------- (((a3*a7) - (a6*a4))*z) 3-> a3 ((a6*((a4*((a2*z) - b1)) - (a1*((z*a5) - b2)))) - (a0*((a7*(b2 - (z*a5))) + (a4*((z*a8) - b3))))) #3: a3 = ------------------------------------------------------------------------------------------------- ((a1*(b3 - (z*a8))) + (a7*((a2*z) - b1))) 3-> a4 ((a3*((a1*(b3 - (z*a8))) + (a7*((a2*z) - b1)))) + (((z*a5) - b2)*((a6*a1) - (a0*a7)))) #3: a4 = -------------------------------------------------------------------------------------- ((a6*((a2*z) - b1)) + (a0*(b3 - (z*a8)))) 3-> a5 ((a4*((a6*((a2*z) - b1)) + (a0*(b3 - (z*a8))))) - (a3*((a1*(b3 - (z*a8))) + (a7*((a2*z) - b1)))) + (b2*((a6*a1) - (a0*a7)))) #3: a5 = ---------------------------------------------------------------------------------------------------------------------------- (((a6*a1) - (a0*a7))*z) 3-> a6 -1*((a0*((a7*((a5*z) - b2)) + (a4*(b3 - (z*a8))))) + (a3*((a1*((z*a8) - b3)) + (a7*(b1 - (a2*z)))))) #3: a6 = ---------------------------------------------------------------------------------------------------- ((a4*((a2*z) - b1)) + (a1*(b2 - (a5*z)))) 3-> a7 ((((z*a8) - b3)*((a0*a4) - (a3*a1))) - (a6*((a4*((a2*z) - b1)) + (a1*(b2 - (a5*z)))))) #3: a7 = -------------------------------------------------------------------------------------- ((a0*((a5*z) - b2)) + (a3*(b1 - (a2*z)))) 3-> a8 ((a7*((a0*((a5*z) - b2)) + (a3*(b1 - (a2*z))))) + (a6*((a4*((a2*z) - b1)) + (a1*(b2 - (a5*z))))) + (b3*((a0*a4) - (a3*a1)))) #3: a8 = ---------------------------------------------------------------------------------------------------------------------------- (((a0*a4) - (a3*a1))*z) 3-> z ((a7*((a3*b1) - (a0*b2))) + (a6*((a1*b2) - (a4*b1))) + (b3*((a0*a4) - (a3*a1)))) #3: z = -------------------------------------------------------------------------------- ((a8*((a0*a4) - (a3*a1))) + (a7*((a3*a2) - (a0*a5))) + (a6*((a1*a5) - (a4*a2)))) 3-> compare 3 with 4 Comparing #3 with #4... Equations are identical. Finished reading file "test3.in". 3-> read simplify.in 3-> ; Some simplification tests Mathomatic has always been able to do. 3-> 3-> clear all 1-> 2*(x^2 - y^2)^6 - (x^2 - y^2)^5*(2 x^2 - 3) #1: (2*(((x^2) - (y^2))^6)) - ((((x^2) - (y^2))^5)*((2*(x^2)) - 3)) 1-> simplify #1: (((y^2) - (x^2))^5)*((2*(y^2)) - 3) 1-> a^3/((a-b)*(a-c)) + b^3/((b-c)*(b-a)) + c^3/((c-a)*(c-b)) (a^3) (b^3) (c^3) #2: ----------------- + ----------------- + ----------------- ((a - b)*(a - c)) ((b - c)*(b - a)) ((c - a)*(c - b)) 2-> simplify Division simplified with polynomial GCD. Division simplified with polynomial GCD. Division simplified with polynomial GCD. #2: b + a + c 2-> (x^6+a^6)*(x+1)/((x^6+a^6)*(x^2-a^2)+a^2*x^2*(x^4-a^4))+a^2*x^2*(x+1)/(x^6-a^6-a^2*x^2*(x^2-a^2)) ((x^6) + (a^6))*(x + 1) (a^2)*(x^2)*(x + 1) #3: ------------------------------------------------------------------- + ----------------------------------------------- ((((x^6) + (a^6))*((x^2) - (a^2))) + ((a^2)*(x^2)*((x^4) - (a^4)))) ((x^6) - (a^6) - ((a^2)*(x^2)*((x^2) - (a^2)))) 3-> simplify Division simplified with polynomial GCD. (x + 1) #3: --------------- ((x^2) - (a^2)) 3-> ((a*n + b*m)^2 + (a*m - b*n)^2) / ((a*p + b*q)^2 + (a*q - b*p)^2) ((((a*n) + (b*m))^2) + (((a*m) - (b*n))^2)) #4: ------------------------------------------- ((((a*p) + (b*q))^2) + (((a*q) - (b*p))^2)) 4-> simplify ((n^2) + (m^2)) #4: --------------- ((p^2) + (q^2)) 4-> ((p*x^2+(k-s)*x+r)^2-(p*x^2+(k+s)*x+r)^2)/((p*x^2+(k+t)*x+r)^2-(p*x^2+(k-t)*x+r)^2) ((((p*(x^2)) + ((k - s)*x) + r)^2) - (((p*(x^2)) + ((k + s)*x) + r)^2)) #5: ----------------------------------------------------------------------- ((((p*(x^2)) + ((k + t)*x) + r)^2) - (((p*(x^2)) + ((k - t)*x) + r)^2)) 5-> simplify Division simplified with polynomial GCD. -1*s #5: ---- t 5-> (1 - (1-(y+1)/(x+y+1)) / (1-x/(x+y+1))) / ((y+1)^2 - x / (1+x/(y-x+1))*(x*(y+1)/(y-x+1) - x)) (y + 1) (1 - -----------) (x + y + 1) (1 - -----------------) x (1 - -----------) (x + y + 1) #6: ----------------------------------- x*(y + 1) x*(----------- - x) (y - x + 1) (((y + 1)^2) - -------------------) x (1 + -----------) (y - x + 1) 6-> simplify ; Any complex fraction can be reduced to a simple fraction. Division simplified with polynomial GCD. 1 #6: ----------------------------------------- (1 + (y^2) + (2*y) + (x*(y + 1)) + (x^2)) 6-> ((2*((x*(x + (((x^2) - 1)^(1/2)))) - 1)) + 1)/((2*x*((x^2) - 1)) + ((((x^2) - 1)^(1/2))*((2*(x^2)) - 1))) 1 ((2*((x*(x + (((x^2) - 1)^-))) - 1)) + 1) 2 #7: ------------------------------------------------------- 1 ((2*x*((x^2) - 1)) + ((((x^2) - 1)^-)*((2*(x^2)) - 1))) 2 7-> simplify ; A good simplification resulting from trying to rationalize the denominator. 1 #7: --------------- 1 (((x^2) - 1)^-) 2 Finished reading file "simplify.in". 7-> read radius.in 7-> clear all 1-> ; Some more fun formulas. These are very similar to Heron's formula 1-> ; for the area of a triangle (see "heron.in"). 1-> 1-> s=.5*(a+b+c) (a + b + c) #1: s = ----------- 2 1-> ; radius of a circle inscribed in a triangle with sides of length (a, b, c): 1-> r=(s*(s-a)*(s-b)*(s-c))^.5/s 1 ((s*(s - a)*(s - b)*(s - c))^-) 2 #2: r = ------------------------------- s 2-> elim s using 1 Solving equation #1 for (s) and substituting into the current equation... (a + b + c) (a + b + c) (a + b + c) (a + b + c)*(----------- - a)*(----------- - b)*(----------- - c) 2 2 2 1 2*(-----------------------------------------------------------------^-) 2 2 #2: r = ----------------------------------------------------------------------- (a + b + c) 2-> unfactor (a^2)*(b^2) (a^4) (a^2)*(c^2) (b^4) (b^2)*(c^2) (c^4) 1 2*((----------- - ----- + ----------- - ----- + ----------- - -----)^-) 8 16 8 16 8 16 2 #2: r = ----------------------------------------------------------------------- (a + b + c) 2-> simp 1 (((2*(((a^2)*((b^2) + (c^2))) + ((b*c)^2))) - (a^4) - (b^4) - (c^4))^-) 2 #2: r = ----------------------------------------------------------------------- (2*(a + b + c)) 2-> ; radius of a circle circumscribing a triangle with sides of length (a, b, c): 2-> r=a*b*c/(4*(s*(s-a)*(s-b)*(s-c))^.5) a*b*c #3: r = ----------------------------------- 1 (4*((s*(s - a)*(s - b)*(s - c))^-)) 2 3-> elim s using 1 Solving equation #1 for (s) and substituting into the current equation... a*b*c #3: r = ------------------------------------------------------------------------- (a + b + c) (a + b + c) (a + b + c) (a + b + c)*(----------- - a)*(----------- - b)*(----------- - c) 2 2 2 1 (4*(-----------------------------------------------------------------^-)) 2 2 3-> simp a*b*c #3: r = ----------------------------------------------------------------------- 1 (((2*(((a^2)*((b^2) + (c^2))) + ((b*c)^2))) - (a^4) - (b^4) - (c^4))^-) 2 Finished reading file "radius.in". 3-> clear all 1-> read trig.in 1-> ; Trigonometric functions as complex exponentials. 1-> ; Based on Euler's identity: e^(i*x) = cos(x) + i*sin(x) 1-> ; "x" is an angle in radians. 1-> 1-> ; Unity relationship: sin(x)^2 + cos(x)^2 = 1 1-> 1-> ; sin(x) (sine of x) = cos(pi/2 - x) 1-> sin=(e^(i*x)-e^(-i*x))/(2i) ((e#^(i#*x)) - (e#^(-1*i#*x))) #1: sin = ------------------------------ (2*i#) 1-> 1-> ; cos(x) (cosine of x) = sin(pi/2 - x) 1-> cos=(e^(i*x)+e^(-i*x))/2 ((e#^(i#*x)) + (e#^(-1*i#*x))) #2: cos = ------------------------------ 2 2-> 2-> ; tan(x) (tangent of x) = sin(x)/cos(x) = cot(pi/2 - x) 2-> tan=(e^(i*x)-e^(-i*x))/(i*(e^(i*x)+e^(-i*x))) ((e#^(i#*x)) - (e#^(-1*i#*x))) #3: tan = ----------------------------------- (i#*((e#^(i#*x)) + (e#^(-1*i#*x)))) 3-> 3-> ; cot(x) (cotangent of x) = cos(x)/sin(x) = tan(pi/2 - x) 3-> cot=i*(e^(i*x)+e^(-i*x))/(e^(i*x)-e^(-i*x)) i#*((e#^(i#*x)) + (e#^(-1*i#*x))) #4: cot = --------------------------------- ((e#^(i#*x)) - (e#^(-1*i#*x))) 4-> 4-> ; sec(x) (secant of x) = 1/cos(x) = csc(pi/2 - x) 4-> sec=2/(e^(i*x)+e^(-i*x)) 2 #5: sec = ------------------------------ ((e#^(i#*x)) + (e#^(-1*i#*x))) 5-> 5-> ; csc(x) (cosecant of x) = 1/sin(x) = sec(pi/2 - x) 5-> csc=2i/(e^(i*x)-e^(-i*x)) 2*i# #6: csc = ------------------------------ ((e#^(i#*x)) - (e#^(-1*i#*x))) Finished reading file "trig.in". 6-> simplify all 1 i#*(----------- - (e#^(i#*x))) (e#^(i#*x)) #1: sin = ------------------------------ 2 1 ((e#^(i#*x)) + -----------) (e#^(i#*x)) #2: cos = --------------------------- 2 2 #3: tan = i#*(------------------- - 1) ((e#^(2*i#*x)) + 1) 2 #4: cot = i#*(1 + -------------------) ((e#^(2*i#*x)) - 1) 2*(e#^(i#*x)) #5: sec = ------------------- ((e#^(2*i#*x)) + 1) 2*i#*(e#^(i#*x)) #6: csc = ------------------- ((e#^(2*i#*x)) - 1) 6-> clear all 1-> read pyth3d.in 1-> ; This input to Mathomatic arrives at the distance between two points 1-> ; in 3D space from the Pythagorean theorem (distance between two points 1-> ; in 2D space). 1-> 1-> l^2=(x1-x2)^2+(y1-y2)^2 ; Distance formula for 2D space. #1: l^2 = ((x1 - x2)^2) + ((y1 - y2)^2) 1-> d^2=l^2+(z1-z2)^2 ; Add another leg. #2: d^2 = (l^2) + ((z1 - z2)^2) 2-> eliminate l ; Combine the two equations. Solving equation #1 for (l) and substituting into the current equation... #2: d^2 = ((x1 - x2)^2) + ((y1 - y2)^2) + ((z1 - z2)^2) 2-> d ; Solve to get the distance formula for 3D space. 1 #2: d = ((((x1 - x2)^2) + ((y1 - y2)^2) + ((z1 - z2)^2))^-)*sign2 2 2-> ; The coordinate of point 1 is (x1, y1, z1) and point 2 is (x2, y2, z2). Finished reading file "pyth3d.in". 2-> clear all 1-> read ellipse.in 1-> ; This is a general equation for an ellipse that was created using the rule 1-> ; that the sum of the distances (k) from any point on the perimeter (x, y) 1-> ; to the two foci: (x1, y1) and (x2, y2), is a constant (k). This can 1-> ; represent any ellipse of any orientation on the Cartesian plane. 1-> 1-> k = ((((x1-x)^2)+((y1-y)^2))^0.5)+((((x2-x)^2)+((y2-y)^2))^0.5) 1 1 #1: k = ((((x1 - x)^2) + ((y1 - y)^2))^-) + ((((x2 - x)^2) + ((y2 - y)^2))^-) 2 2 1-> 1-> ; The equation for an ellipse centered at the origin of the Cartesian plane: 1-> 1-> 1=x^2/radius1^2+y^2/radius2^2 (x^2) (y^2) #2: 1 = ----------- + ----------- (radius1^2) (radius2^2) Finished reading file "ellipse.in". 2-> y x 1 #2: y = ((-1*((-------^2) - 1))^-)*sign1*radius2 radius1 2 2-> simplify x 1 #2: y = ((1 - (-------^2))^-)*sign1*radius2 radius1 2 2-> 1 1 1 #1: k = ((((x1 - x)^2) + ((y1 - y)^2))^-) + ((((x2 - x)^2) + ((y2 - y)^2))^-) 2 2 1-> y Raising both sides to the power of 2 and unfactoring... Raising both sides to the power of 2 and unfactoring... Equation was quadratic. 1 ((16*(k^2)*((y2*((y2*((y2*(y2 - (4*y1))) + (4*x*(x - x2 - x1)) + (6*(y1^2)) + (2*((x2^2) + (x1^2) - (k^2))))) + (4*y1*((k^2) + (2*x*(x1 - x + x2)) - (x2^2) - (x1^2) - (y1^2))))) + (4*x*(((y1^2)*(x - x1 - x2)) - ((k^2)*x) + (x1*((x1*(x - x1)) + (k^2))) + (x2*((x2*(x - x2 + x1)) + (x1^2) + (k^2))))) + (2*(((y1^2)*((x1^2) + (x2^2) - (k^2))) - ((x2^2)*((x1^2) + (k^2))) - ((k*x1)^2))) + (y1^4) + (x2*((x2^3) - (8*(x^2)*x1))) + (x1^4) + (k^4)))^-)*sign2 2 (------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + (4*x*(y2 - y1)*(x1 - x2)) + (2*((y2*((y2*(y2 - y1)) + (x2^2) - (x1^2) - (y1^2) - (k^2))) + (y1*((x1^2) - (x2^2) + (y1^2) - (k^2)))))) 2 #1: y = ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- (4*((y1*(y1 - (2*y2))) - (k^2) + (y2^2))) 1-> simplify symbolic 1 ((k*((((y1^2) + (2*((x1*(x2 - (2*x))) - (y1*y2))) - (k^2) + (x1^2) + (4*((x^2) - (x*x2))) + (x2^2) + (y2^2))*((y1^2) - (2*((y1*y2) + (x1*x2))) + (y2^2) + (x1^2) + (x2^2) - (k^2)))^-)*sign2) + ((y2 - y1)*((2*x) - x1 - x2)*(x1 - x2))) 2 (y1 + y2 + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------) ((y1^2) - (k^2) + (y2^2) - (2*y1*y2)) #1: y = ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 1-> quit