1-> read how_limit_works 1-> clear all 1-> ; Read this file into Mathomatic to learn how the limit command does limits. 1-> ; The formula for the derivative of a function of "x" (f(x)) is: 1-> 1-> ; f(x+h) - f(x) 1-> ; limit ------------- As "h" goes to 0. 1-> ; h 1-> 1-> ; Here we will compute the derivative of "x^.5" using limits: 1-> 1-> y=((x+h)^.5-x^.5)/h 1 1 (((x + h)^-) - (x^-)) 2 2 #1: y = --------------------- h 1-> limit h 0 ; Take the limit of the current equation as "h" goes to 0. Solving... Equation is a degree 0.5 polynomial in (h). Raising both equation sides to the power of 2 and unfactoring... Equation is a degree 2 polynomial in (h). Equation was quadratic. 1 #2: y = --------- 1 (2*(x^-)) 2 1-> ; The result should be "y = 1/(2*x^0.5)". 1-> pause 1-> ; To show how the limit command works, we will do what it does, step by step. 1-> 1-> 1 ; Select the original equation (equation number 1). 1 1 (((x + h)^-) - (x^-)) 2 2 #1: y = --------------------- h 1-> ; We want "h" to go to 0 to give us the derivative. 1-> ; Just entering 0 for "h" will give a divide by zero error. 1-> ; So we will first have to solve for "h": 1-> 1-> h Equation is a degree 0.5 polynomial in (h). Raising both equation sides to the power of 2 and unfactoring... Equation is a degree 2 polynomial in (h). Equation was quadratic. 1 1 (1 - ((((1 - (2*y*(x^-)))^2)^-)*sign)) 2 2 1 (-------------------------------------- - (y*(x^-))) 2 2 #1: h = ---------------------------------------------------- (y^2) 1-> pause 1-> ; Simplify and replace "h" with 0: 1-> 1-> simplify symbolic 1 (x^-) 1 2 #1: h = (1 - sign)*(--------- - -----) (2*(y^2)) y 1-> replace h with 0 1 (x^-) 1 2 #1: 0 = (1 - sign)*(--------- - -----) (2*(y^2)) y 1-> pause 1-> ; Last step, solve the equation back for "y": 1-> 1-> y 1 #1: y = --------- 1 (2*(x^-)) 2 1-> compare 1 with 2 ; Compare with the result of the limit command. Comparing #1 with #2... Equations are identical. 1-> 1-> ; Obviously this method only works if the equation is solvable. 1-> pause 1-> ; INFINITY LIMITS 1-> ; --------------- 1-> ; To take the limit as some variable "h" goes to infinity, 1-> ; remember that 1/infinity is essentially 0, and the limit 1-> ; of "1/h" as "h" goes to 0 is +/-infinity, so replace "h" 1-> ; with "1/h" and take the limit as "h" now goes to 0. 1-> ; Note that this method doesn't always work and sometimes gives wrong answers. 1-> 1-> ; Let's try a simple example: 1-> y=(5x+100-a)/(x-b) ((5*x) + 100 - a) #3: y = ----------------- (x - b) 3-> limit x inf ; Take the limit as "x" goes to infinity. Solving... #4: y = 5 3-> ; The limit command should say the result is 5. 3-> pause 3-> ; To show how the limit command works, we will do what it does, step by step. 3-> 3-> 3 ; Select the original equation (equation number 3). ((5*x) + 100 - a) #3: y = ----------------- (x - b) 3-> ; To take the limit as "x" approaches infinity, 3-> ; first replace "x" with "1/x": 3-> 3-> replace x with 1/x 5 (- + 100 - a) x #3: y = ------------- 1 (- - b) x 3-> pause 3-> 3-> ; Simplify and replace "x" with 0: 3-> simplify (5 + (x*(100 - a))) #3: y = ------------------- (1 - (b*x)) 3-> replace x with 0 #3: y = 5 3-> ; The result should be 5. Finished reading file "how_limit_works.in". 3-> clear all 1-> read finance 1-> ; Here are 3 related financial formulas that can be "read" into Mathomatic: 1-> 1-> ; Compound Interest Future Value Formula: 1-> fv1 = pv*(1+interest_rate)^n #1: fv1 = pv*((1 + interest_rate)^n) 1-> 1-> ; Annuity Formula: 1-> fv2 = payment*(((1+interest_rate)^n-1)/interest_rate) payment*(((1 + interest_rate)^n) - 1) #2: fv2 = ------------------------------------- interest_rate 2-> ; Next we will combine these to produce that Amortized Loan Formula. 2-> pause 2-> ; Amortized Loan Formula (Mortgage Formula): 2-> fv1 = fv2 #3: fv1 = fv2 3-> eliminate all Solving equation #2 for (fv2) and substituting into the current equation... Solving equation #1 for (fv1) and substituting into the current equation... payment*(((1 + interest_rate)^n) - 1) #3: pv*((1 + interest_rate)^n) = ------------------------------------- interest_rate 3-> solve verify payment ; solve for payment per period pv*((1 + interest_rate)^n)*interest_rate #3: payment = ---------------------------------------- (((1 + interest_rate)^n) - 1) Solution verified. 3-> ; pv = present value 3-> ; fv = future value (maturity value) 3-> ; interest_rate = interest rate per period (1 = 100%) 3-> ; n = number of periods Finished reading file "finance.in". 3-> simplify pv*((1 + interest_rate)^n)*interest_rate #3: payment = ---------------------------------------- (((1 + interest_rate)^n) - 1) 3-> solve verify pv payment*(((1 + interest_rate)^n) - 1) #3: pv = --------------------------------------- (((1 + interest_rate)^n)*interest_rate) Solution verified. 3-> simplify 1 payment*(1 - -----------------------) ((1 + interest_rate)^n) #3: pv = ------------------------------------- interest_rate 3-> clear all 1-> read fibonacci 1-> ; This is the formula to calculate the nth Fibonacci number. 1-> phi = (1 + (5^(1/2)))/2 ; the golden ratio 1 (1 + (5^-)) 2 #1: phi = ----------- 2 1-> ((phi^n) - ((1 - phi)^n))/(5^(1/2)) ((phi^n) - ((1 - phi)^n)) #2: ------------------------- 1 (5^-) 2 2-> eliminate phi Solving equation #1 for (phi) and substituting into the current equation... 1 1 (1 + (5^-)) (1 + (5^-)) 2 2 ((-----------^n) - ((1 - -----------)^n)) 2 2 #2: ----------------------------------------- 1 (5^-) 2 2-> simplify ; Note that Mathomatic rationalizes the denominator here. 1 1 1 (5^-)*(((1 + (5^-))^n) - ((1 - (5^-))^n)) 2 2 2 #2: ----------------------------------------- (5*(2^n)) Finished reading file "fibonacci.in". 2-> read test.in 2-> clear all 1-> read fix1 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 #1: y = (((-------^-) + (-------^-) + (----------^-))*(i#^-))^- (b - c) 4 (a + b) 4 (b - c) 2 2 n 1-> y = (a^a)*(1+(((a^(a^2))*(b^a))^(1/(1-a)))) 1 #2: y = (a^a)*(1 + (((a^(a^2))*(b^a))^-------)) (1 - a) 2-> y = (a^2)*(1+(((a^(2*((1.5*a)-1)))*(b^a))^(1/(1-a)))) 3*a 1 #3: y = (a^2)*(1 + (((a^(2*(--- - 1)))*(b^a))^-------)) 2 (1 - a) 3-> y = (15*(d^2)/((1+(d^2))^(7/2)))-(12/((1+(d^2))^(5/2)))-6 15*(d^2) 12 #4: y = --------------- - --------------- - 6 7 5 ((1 + (d^2))^-) ((1 + (d^2))^-) 2 2 4-> y = ((9 + (32^.5))^.5) ; should simplify to (1 + 2*(2^.5)) someday 1 1 #5: y = (9 + (32^-))^- 2 2 5-> simplify symbolic all (b + a) 1 (a - b) 1 (c - b) 1 1 #1: y = ((-------^-) + (-------^-) + (-------^-))^- (c - b) 4 (c - b) 2 (a + b) 4 n a #2: y = (a^a) + ((a*b)^-------) (1 - a) a #3: y = (a^2) + ((a*b)^-------) (1 - a) ((d^2) - 4) #4: y = 3*(--------------- - 2) 7 ((1 + (d^2))^-) 2 1 1 #5: y = (9 + (4*(2^-)))^- 2 2 5-> simplify all (b + a) 1 (a - b) 1 (c - b) 1 1 #1: y = ((-------^-) + (-------^-) + (-------^-))^- (c - b) 4 (c - b) 2 (a + b) 4 n a #2: y = (a^a) + ((a*b)^-------) (1 - a) a #3: y = (a^2) + ((a*b)^-------) (1 - a) ((d^2) - 4) #4: y = 3*(--------------- - 2) 7 ((1 + (d^2))^-) 2 1 1 #5: y = (9 + (4*(2^-)))^- 2 2 5-> x^(1/99)=x 1 #6: x^-- = x 99 6-> solve verify x Equation is a degree 0.01010101010101 polynomial in (x). Raising both equation sides to the power of 99 and unfactoring... Equation is a degree 99 polynomial in (x). Removing possible solution: "x = 0". #6: x = sign Solutions verified. 6-> calc There are 2 solutions. Solution number 1 with sign = 1: x = 1 Solution number 2 with sign = -1: x = -1 6-> (2i)^.5+e^(pi*i) Warning: Complex number root approximated. answer = i# 6-> (1-2i)/(3+4i) answer = (-0.4*i#) - 0.2 6-> y=x^3 #7: y = x^3 7-> extrema x #8: x = 0 8-> y=(x+1)^4 #9: y = (x + 1)^4 9-> extrema x #10: x = -1 10-> 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 10-> factor number -75 10000000000000 121468070 -75 = 3 * 5^2 * -1 10000000000000 = 2^13 * 5^13 121468070 = 2 * 5 * 12146807 Finished reading file "fix1.in". 10-> 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-> y = (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: y = ----------------------------------------- (x + 1) 3-> y = 3 / (x^3+3x^2-x-3) - 2 / (x^3-x^2-3x+3) + 4 / (x^3+x^2-3x-3) 3 2 4 #4: y = --------------------------- - --------------------------- + --------------------------- ((x^3) + (3*(x^2)) - x - 3) ((x^3) - (x^2) - (3*x) + 3) ((x^3) + (x^2) - (3*x) - 3) 4-> simp all 1 #1: b = ((-1^n)*a)^------- (1 - n) (2 - n) (y^-------) (n - 1) #2: x = --------------------------- n 1 ((n^-------) - (n^-------)) (n - 1) (n - 1) (b + a)*(x + 1) ((x^2) + ---------------) ((x^n)*(c + d)) #3: y = (x^(m - 1)) + ------------------------- ((x^2) + x) (27 - (5*(x^2))) #4: y = ------------------------------------------------------ ((4*(x^3)) - (x^5) - (3*((x^4) + x)) + (12*(x^2)) - 9) 4-> 1 1 #1: b = ((-1^n)*a)^------- (1 - n) 1-> solve verify a (b^(1 - n)) #1: a = ----------- (-1^n) Solution verified. 1-> simp (b^(1 - n)) #1: a = ----------- (-1^n) 1-> 2 (2 - n) (y^-------) (n - 1) #2: x = --------------------------- n 1 ((n^-------) - (n^-------)) (n - 1) (n - 1) 2-> solve verify y x*(n - 1) 1 #2: y = ((---------^(n - 1))*(n^n))^------- n (2 - n) Solution verified. 2-> simp ((x*(n - 1))^n)*n 1 #2: y = -----------------^------- (x*(n - 1)) (2 - n) 2-> 1/(x+y) 1 #5: ------- (x + y) 5-> taylor x 5 0 5 derivatives applied. 1 x (x^2) (x^3) (x^4) (x^5) #6: - - ----- + ----- - ----- + ----- - ----- y (y^2) (y^3) (y^4) (y^5) (y^6) 6-> fraction ((y^5) + (x*((x*((y^3) + (x*((x*(y - x)) - (y^2))))) - (y^4)))) #6: --------------------------------------------------------------- (y^6) 6-> simplify fraction ((y^5) - ((y^4)*x) + ((y^3)*(x^2)) - ((y^2)*(x^3)) + (y*(x^4)) - (x^5)) #6: ----------------------------------------------------------------------- (y^6) 6-> simplify 1 x (x^2) (x^3) (x^4) (x^5) #6: - - ----- + ----- - ----- + ----- - ----- y (y^2) (y^3) (y^4) (y^5) (y^6) Finished reading file "fix2.in". 6-> clear all 1-> read fix5 1-> a = (x+1/2^.5)^5 1 #1: a = (x + -----)^5 1 (2^-) 2 1-> a = (b+((c+1)^0.5))^3 1 #2: a = (b + ((c + 1)^-))^3 2 2-> a = b*c*x*((((x^2)*c)+(b^4))^3)*(x+c) #3: a = b*c*x*((((x^2)*c) + (b^4))^3)*(x + c) 3-> a = (((b^2)+x)^3)*((1/x)+x)*b 1 #4: a = (((b^2) + x)^3)*(- + x)*b x 4-> a = b*(((1/b)+(1/c))^3) 1 1 #5: a = b*((- + -)^3) b c 5-> a = (b^2)*(((1/b)+(1/c))^3) 1 1 #6: a = (b^2)*((- + -)^3) b c 6-> a = (b^2)*((b-c)^3) #7: a = (b^2)*((b - c)^3) 7-> simplify all 1 (2^-) 2 #1: a = (x + -----)^5 2 1 #2: a = (b + ((c + 1)^-))^3 2 #3: a = (((b^4) + (c*(x^2)))^3)*b*((c*(x^2)) + ((c^2)*x)) 1 #4: a = (((b^2) + x)^3)*b*(x + -) x 1 1 #5: a = ((- + -)^3)*b c b b ((1 + -)^3) c #6: a = ----------- b #7: a = (b^2)*((b - c)^3) Finished reading file "fix5.in". 7-> 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^2) #5: --------------- + ----------- x ((x^2) + x) 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-> y = (((b+1)^0.5)*((b^2.5)+c))+((((b^2)+b)^0.5)*a) 1 5 1 #2: y = (((b + 1)^-)*((b^-) + c)) + ((((b^2) + b)^-)*a) 2 2 2 2-> a = (b^(1-n))/(1+(b^(m-n))) (b^(1 - n)) #3: a = ----------------- (1 + (b^(m - n))) 3-> 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 #4: a = ---------------------------------^- ((b^n)*(1 + (b^(m - n)))) 2 4-> simp all 1 ((- + 1)^2) b #1: a = ----------- b 1 5 1 #2: y = ((b + 1)^-)*((b^-) + ((b^-)*a) + c) 2 2 2 b #3: a = --------------- ((b^n) + (b^m)) 1 ((b^2) + (b*(c^(1 - n))) + (b^-)) 2 1 #4: a = ---------------------------------^- ((b^n) + (b^m)) 2 Finished reading file "fix8.in". 4-> clear all 1-> read fix9 1-> ((1/b) + (1/c) + (1/d))^3 1 1 1 #1: (- + - + -)^3 b c d 1-> ((+/-1000*(b!^4)+/-x)^2)*((1/x)+x)*b 1 #2: (((1000*sign*((b!)^4)) + (sign0*x))^2)*(- + x)*b x 2-> ((b+(2*i))^5) #3: (b + (2*i#))^5 3-> (((1/(b^2))+c)^2)*((1/b)+(c*b)) 1 1 #4: ((----- + c)^2)*(- + (c*b)) (b^2) b 4-> (6*(b^0.5)-3)^3 1 #5: ((6*(b^-)) - 3)^3 2 5-> (2-(4/(c-b)))^3 4 #6: (2 - -------)^3 (c - b) 6-> (((e*((2*(x^3)) + 24 + (x!) - zy)) - pi)/e)^2 ((e#*((2*(x^3)) + 24 + (x!) - zy)) - pi#) #7: -----------------------------------------^2 e# 7-> simplify all 1 1 1 #1: (- + - + -)^3 b d c 1 #2: ((x + (1000*sign*sign0*((b!)^4)))^2)*b*(- + x) x #3: (b + (2*i#))^5 1 1 #4: ((----- + c)^2)*(- + (c*b)) (b^2) b 1 #5: -27*((1 - (2*(b^-)))^3) 2 2 #6: 8*((1 - -------)^3) (c - b) pi# #7: (zy - 24 + --- - (x!) - (2*(x^3)))^2 e# 7-> display factor all 1 1 1 #1: (- + - + -)^3 b d c 1 #2: ((x + (((2^3)*(5^3))*sign*sign0*((b!)^(2^2))))^2)*b*(- + x) x #3: (b + (2*i#))^5 1 1 #4: ((----- + c)^2)*(- + (c*b)) (b^2) b 1 #5: ((3^3)*-1)*((1 - (2*(b^-)))^3) 2 2 #6: (2^3)*((1 - -------)^3) (c - b) pi# #7: (zy - ((2^3)*3) + --- - (x!) - (2*(x^3)))^2 e# Finished reading file "fix9.in". Finished reading file "test.in". 7-> clear all 1-> read fraction.in 1-> ; This Mathomatic input shows how "simplify fraction" and "unfactor fully" work. 1-> 1/x+1/y+1/z 1 1 1 #1: - + - + - x y z 1-> fraction ; Convert expressions with algebraic fractions into a single fraction. (((y + x)*z) + (x*y)) #1: --------------------- (x*y*z) 1-> simplify 1 1 1 #1: - + - + - x y z 1-> simplify fraction ; does the same as the above fraction command in this case. ((z*y) + (x*(z + y))) #1: --------------------- (x*y*z) 1-> unfactor ; Expand the products of sums. ((z*y) + (x*z) + (x*y)) #1: ----------------------- (x*y*z) 1-> unfactor fully ; Fully expand algebraic fractions. 1 1 1 #1: - + - + - x y z Finished reading file "fraction.in". 1-> clear all 1-> read pie.in 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 = 0 to 10 in steps of 1. #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 = 0 to 20 in steps of 1. #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 of y iterative approximation formula 1 derivative applied. #2: 0 = (x_old^n) - y + (n*(x_old^(n - 1))*x_new) - (n*(x_old^n)) 2-> solve verify x_new ; solve for the wanted variable, verifying the result (y - (x_old^n)) #2: x_new = (--------------- + 1)*x_old ((x_old^n)*n) Solution verified. 2-> simplify ; convergent nth root approximation formula: 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 the formula was 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-> solve verify x ; solve for x, verifying the result Equation is a degree 0.66666666666667 polynomial in (x). Equation was solved with the quadratic formula. 1 -1*(1 + (((1 + (4*y))^-)*sign)) 2 #3: x = -------------------------------^3 2 Solutions verified. 3-> expand 1 3 -3*((1 + (4*y))^-)*sign ((1 + (4*y))^-)*sign 2 1 3*y 2 #3: x = ----------------------- - - - --- - -------------------- 8 2 2 8 3-> simplify 1 -1*((sign*((1 + (4*y))^-)*(1 + y)) + 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+delta_x)^.5-1/x^.5)/delta_x 1 1 (----------------- - -----) 1 1 ((x + delta_x)^-) (x^-) 2 2 #1: --------------------------- delta_x 1-> limit delta_x 0 ; take the limit as delta_x (change in x) goes to 0 Solving... Equation is a degree 0.5 polynomial in (delta_x). Raising both equation sides to the power of 2 and unfactoring... Equation is a degree 3 polynomial in (delta_x). Removing possible solution: "delta_x = 0". Equation is a degree 2 polynomial in (delta_x). Equation was quadratic. Equation is a degree 0.5 polynomial in (answer). Raising both equation sides to the power of 2 and unfactoring... -1 #2: answer = --------- 3 (2*(x^-)) 2 1-> 2 -1 #2: answer = --------- 3 (2*(x^-)) 2 2-> integrate x ; take the antiderivative to see if it's right 1 #3: answer = ----- 1 (x^-) 2 3-> 3-> ; test infinity limits: 3-> 2x/(x+1) 2*x #4: ------- (x + 1) 4-> limit x inf ; answer should be 2 Solving... #5: answer = 2 4-> 4-> (3x+100-a)/(x-b) ((3*x) + 100 - a) #6: ----------------- (x - b) 6-> limit x inf ; answer should be 3 Solving... #7: answer = 3 6-> 6-> (((x^2) - (5*x) + 6)^(1/2)) - x 1 #8: (((x^2) - (5*x) + 6)^-) - x 2 8-> limit x inf ; answer should be -5/2 Solving... Equation is a degree 0.5 polynomial in (x). Raising both equation sides to the power of 2 and unfactoring... Equation is a degree 2 polynomial in (x). Equation was quadratic. -5 #9: answer = -- 2 8-> 8-> x*((x^2+1)^.5-x) 1 #10: x*((((x^2) + 1)^-) - x) 2 10-> limit x inf ; answer should be 1/2 Solving... Equation is a degree 1.5 polynomial in (x). Raising both equation sides to the power of 2 and unfactoring... Equation is a degree 4 polynomial in (x). Equation was biquadratic. 1 #11: answer = - 2 10-> 10-> 1/x^2+1/x 1 1 #12: ----- + - (x^2) x 12-> limit x inf ; result should be 0 Solving... Equation is a degree 2 polynomial in (x). Equation was quadratic. #13: answer = 0 12-> 12-> ; The following currently give wrong answers: 12-> x^2+x #14: (x^2) + x 14-> limit x inf ; result should be inf Solving... Equation is a degree 2 polynomial in (x). Equation was quadratic. #15: answer = 0 Finished reading file "limits.in". 14-> read poly.in 14-> ; Combine 3 quadratic polynomial equations with 3 unknown coefficients (a, b, c). 14-> ; Solve for variables (a), (b), and (c). 14-> 14-> clear all ; restart Mathomatic 1-> ; enter all 3 equations: 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 as the current equation #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 ; find (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-> simplify (y1 - y2) (y3 - y2) (--------- + ---------) (x2 - x1) (x3 - x2) #3: c = ----------------------- (x3 - x1) 3-> 2 ; select equation number 2 again (y1 - y2 + (c*((x2^2) - (x1^2)))) #2: b = --------------------------------- (x1 - x2) 2-> eliminate c using 3 ; find (b) Solving equation #3 for (c) and substituting into the current equation... (((y1 - y2)*(x3 - x2)) + ((y3 - y2)*(x2 - x1)))*((x2^2) - (x1^2)) (y1 - y2 + -----------------------------------------------------------------) ((x2 - x1)*(x3 - x2)*(x3 - x1)) #2: b = ----------------------------------------------------------------------------- (x1 - x2) 2-> simplify (((x1^2)*(y3 - y2)) + ((x2^2)*(y1 - y3)) + ((x3^2)*(y2 - y1))) #2: b = -------------------------------------------------------------- ((x2 - x1)*(x3 - x1)*(x3 - x2)) 2-> 1 ; select equation number 1 #1: a = -1*((x1*(b + (c*x1))) - y1) 1-> eliminate b c ; find (a) Solving equation #2 for (b) and substituting into the current equation... Solving equation #3 for (c) and substituting into the current equation... (((x1^2)*(y3 - y2)) + ((x2^2)*(y1 - y3)) + ((x3^2)*(y2 - y1))) (((y1 - y2)*(x3 - x2)) + ((y3 - y2)*(x2 - x1)))*x1 #1: a = -1*((x1*(-------------------------------------------------------------- + --------------------------------------------------)) - y1) ((x2 - x1)*(x3 - x1)*(x3 - x2)) ((x2 - x1)*(x3 - x2)*(x3 - x1)) 1-> simplify ((x3*(((x1^2)*y2) - (y1*(x2^2)))) + ((x3^2)*((y1*x2) - (x1*y2)))) ((x1*x2*y3) + -----------------------------------------------------------------) (x2 - x1) #1: a = -------------------------------------------------------------------------------- ((x1 - x3)*(x2 - x3)) 1-> fraction all ; list all solutions, converting to simple fractions ((x1*x2*y3*(x2 - x1)) + (x3*(((x1^2)*y2) - (y1*(x2^2)) + (x3*((y1*x2) - (x1*y2)))))) #1: a = ------------------------------------------------------------------------------------ ((x2 - x1)*(x1 - x3)*(x2 - x3)) (((x1^2)*(y3 - y2)) + ((x2^2)*(y1 - y3)) + ((x3^2)*(y2 - y1))) #2: b = -------------------------------------------------------------- ((x2 - x1)*(x3 - x1)*(x3 - x2)) (((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, solve, and simplify commands. 1-> 1-> clear all ; restart Mathomatic 1-> ; enter all 3 equations: 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 as the current equation #2: d2 = (a2*x) + (b2*y) + (c2*z) 2-> eliminate x ; eliminate variable x from the current equation 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 ; eliminate variables x and 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 ; find 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 ; find y 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-> simplify ((a1*((d3*c2) - (d2*c3))) + (d1*((a2*c3) - (c2*a3))) + (c1*((d2*a3) - (d3*a2)))) #2: y = -------------------------------------------------------------------------------- ((a1*((b3*c2) - (c3*b2))) + (c1*((a3*b2) - (b3*a2))) + (b1*((c3*a2) - (a3*c2)))) 2-> 1 ; select equation number 1 -1*((b1*y) + (c1*z) - d1) #1: x = ------------------------- a1 1-> eliminate y z ; find x Solving equation #2 for (y) and substituting into the current equation... Solving equation #3 for (z) and substituting into the current equation... b1*((a1*((d3*c2) - (d2*c3))) + (d1*((a2*c3) - (c2*a3))) + (c1*((d2*a3) - (d3*a2)))) c1*((d3*((a2*b1) - (a1*b2))) + (b3*((d2*a1) - (a2*d1))) + (a3*((b2*d1) - (b1*d2)))) -1*(----------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------- - d1) ((a1*((b3*c2) - (c3*b2))) + (c1*((a3*b2) - (b3*a2))) + (b1*((c3*a2) - (a3*c2)))) ((b3*((c2*a1) - (a2*c1))) + (a3*((b2*c1) - (b1*c2))) + (c3*((a2*b1) - (a1*b2)))) #1: x = ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- a1 1-> simplify ((c1*((b2*d3) - (b3*d2))) + (b1*((c3*d2) - (c2*d3))) + (d1*((b3*c2) - (c3*b2)))) #1: x = -------------------------------------------------------------------------------- ((a1*((b3*c2) - (c3*b2))) + (c1*((a3*b2) - (b3*a2))) + (b1*((c3*a2) - (a3*c2)))) 1-> display all ; list all solutions ((c1*((b2*d3) - (b3*d2))) + (b1*((c3*d2) - (c2*d3))) + (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) - (d2*c3))) + (d1*((a2*c3) - (c2*a3))) + (c1*((d2*a3) - (d3*a2)))) #2: y = -------------------------------------------------------------------------------- ((a1*((b3*c2) - (c3*b2))) + (c1*((a3*b2) - (b3*a2))) + (b1*((c3*a2) - (a3*c2)))) ((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)))) Finished reading file "linear.in". 1-> clear all 1-> read examples.in 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-> 0=x^2+x ; A simple quadratic, to show how the calculate command works. #4: 0 = (x^2) + x 4-> solve verify x ; Solve for x, verifying the result. Equation is a degree 2 polynomial in (x). Equation was quadratic. (sign - 1) #4: x = ---------- 2 Solutions verified. 4-> calculate ; expand "sign" variables and approximate There are 2 solutions. Solution number 1 with sign = 1: x = 0 Solution number 2 with sign = -1: x = -1 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-> r 15*(0.6666 - y)*d g*m*epsilon*((-----------------^2) + (d^2)) 4 1 #1: r = -------------------------------------------^- (10*(pi#^2)) 3 1-> simp d 45*(y^2) 1 #1: r = ((---^2)*g*m*epsilon*(0.72487500625 - (1.8748125*y) + --------))^- pi# 32 3 1-> simp d 45*(y^2) 1 #1: r = ((---^2)*g*m*epsilon*(0.72487500625 + -------- - (1.8748125*y)))^- pi# 32 3 1-> y Equation is a degree 2 polynomial in (y). Equation was quadratic. 1 ((0.6666*(d^2)*g*m*epsilon) - (0.25773333555556*((((2.5863941835972*(d^2)*g*m*epsilon)^2) + ((d^2)*g*m*epsilon*((10.705236737008*(r^3)*(pi#^2)) - (7.7599585466463*(d^2)*g*m*epsilon))))^-)*sign)) 2 #1: y = -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ((d^2)*g*m*epsilon) 1-> simp pi# 10*(---^2)*(r^3) d 1 #1: y = 0.6666 - (0.25773333555556*((1.0705236737008*(---------------- - 1))^-)*sign) (g*m*epsilon) 2 1-> simp pi# 10*(---^2)*(r^3) d 1 4*((---------------- - 1)^-)*sign (g*m*epsilon) 2 #1: y = 0.6666 - --------------------------------- 15 1-> simp symbolic 10*(pi#^2)*(r^3) 1 4*((---------------- - (d^2))^-)*sign (g*m*epsilon) 2 #1: y = 0.6666 - ------------------------------------- (15*d) 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 is a degree 2 polynomial in (f). Equation was quadratic. 1 ((((4*b*a*((16*b*((2*(z + o)) - b)) + (a^2)))^2) + (b*((b*((b*((b*((b*((o*((28672*(a^2)) + (65536*b*(z - b + o)))) + (16384*z*(a^2)))) - ((a^2)*((z*((40960*o) + (16384*z))) + (24576*(o^2)))))) - ((a^4)*((1792*o) + (1024*z))))) + (256*o*(a^4)*(z + o)))) + (16*(a^6)*o))))^-)*sign 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 (b^-)*(a^2) 1 5 2 ((sign*(((b*((a^2) + (16*((o^2) + (o*z))))) + (o*((a^2) - (16*(b^2)))))^-)*((8*(b^-)) - -----------)) - (8*(b^2)*a*(z + o))) a 2 2 2 #5: f = - + ---------------------------------------------------------------------------------------------------------------------------- 2 ((16*((b^3) - ((b^2)*(z + o)))) - (b*(a^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 the RHS with respect to (z) and simplifying... 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 is a degree 2 polynomial in (f). Equation was quadratic. 1 ((((128*(b^2)*a*(1 + o))^2) + (256*(b^2)*((o*(((b^2)*((256*(b^2)*(1 + o)) - ((a^2)*(160 + (96*o))))) + ((a^4)*(1 + o)))) - (64*((b*a)^2)))))^-)*sign0 2 -1*(----------------------------------------------------------------------------------------------------------------------------------------------------- - (64*(b^2)*a*(1 + o))) 2 #7: f = --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- (64*(b^2)*(1 + o)) 7-> simp symb o 1 (a^2) #7: f = a + (sign0*(-------^-)*(----- - (2*b))) (1 + o) 2 (8*b) 7-> simp symb o 1 (a^2) #7: f = a + (sign0*(-------^-)*(----- - (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-> clear all 1-> read simplify.in 1-> ; Some complete simplifications Mathomatic has always been able to do. 1-> 1-> 2*(x^2-y^2)^16-(x^2-y^2)^15*(2x^2-3) #1: (2*(((x^2) - (y^2))^16)) - ((((x^2) - (y^2))^15)*((2*(x^2)) - 3)) 1-> simplify ; Simplify the previously entered expression above. #1: (((x^2) - (y^2))^15)*(3 - (2*(y^2))) 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 #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 (x + 1) #3: --------------- ((x^2) - (a^2)) 3-> (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) #4: ----------------------------------- x*(y + 1) x*(----------- - x) (y - x + 1) (((y + 1)^2) - -------------------) x (1 + -----------) (y - x + 1) 4-> simplify fraction ; Any complex fraction can be reduced to a simple fraction. 1 #4: ----------------------------------------- (1 + (y^2) + (2*y) + (x*(y + 1)) + (x^2)) 4-> ((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 #5: ------------------------------------------------------- 1 ((2*x*((x^2) - 1)) + ((((x^2) - 1)^-)*((2*(x^2)) - 1))) 2 5-> simplify ; A complete simplification resulting from trying to rationalize the denominator. 1 #5: --------------- 1 (((x^2) - 1)^-) 2 Finished reading file "simplify.in". 5-> read heron.in 5-> clear all 1-> ; This is Heron's formula for the area 1-> ; of any triangle, given side lengths a, b, and c. 1-> 1-> 2s = a+b+c #1: 2*s = a + b + c 1-> area = (s*(s-a)*(s-b)*(s-c))^.5 1 #2: area = (s*(s - a)*(s - b)*(s - c))^- 2 2-> eliminate s 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: area = -----------------------------------------------------------------^- 2 2 2-> pause 2-> ; This is how we arrive at Heron's formula for the area 2-> ; of any triangle, given side lengths a, b, and c, using the formula 2-> ; for the area of a trapezoid with side lengths a, b, c, and d, 2-> ; where a and c are the parallel sides (a is the longer parallel side). 2-> 2-> ; A trapezoid is a quadrilateral with 2-> ; two sides that are parallel to each other. 2-> 2-> ; Formula for the area of a trapezoid that is not a parallelogram: 2-> trapezoid_area=(a+c)/(4*(a-c))*((a+b-c+d)*(a-b-c+d)*(a+b-c-d)*(-a+b+c+d))^.5 1 (a + c)*(((a + b - c + d)*(a - b - c + d)*(a + b - c - d)*(b - a + c + d))^-) 2 #3: trapezoid_area = ----------------------------------------------------------------------------- (4*(a - c)) 3-> copy 1 (a + c)*(((a + b - c + d)*(a - b - c + d)*(a + b - c - d)*(b - a + c + d))^-) 2 #4: trapezoid_area = ----------------------------------------------------------------------------- (4*(a - c)) 3-> replace c with 0 ; make the shorter parallel side length = 0 1 (((a + b + d)*(a - b + d)*(a + b - d)*(b - a + d))^-) 2 #3: trapezoid_area = ----------------------------------------------------- 4 3-> replace d with c ; Heron's formula: 1 (((a + b + c)*(a - b + c)*(a + b - c)*(b - a + c))^-) 2 #3: trapezoid_area = ----------------------------------------------------- 4 3-> pause 3-> compare 2 ; simplify and compare with Heron's formula Comparing #2 with #3... Simplifying both equations... 1 (((2*(((a^2)*((b^2) + (c^2))) + ((b*c)^2))) - (a^4) - (b^4) - (c^4))^-) 2 #2: area = ----------------------------------------------------------------------- 4 1 (((2*(((a^2)*((b^2) + (c^2))) + ((c*b)^2))) - (a^4) - (b^4) - (c^4))^-) 2 #3: trapezoid_area = ----------------------------------------------------------------------- 4 Variable (area) in the first equation is equal to (trapezoid_area) in the second equation. 3-> 3-> ; This is how we arrive at Heron's formula for the area 3-> ; of any triangle, given side lengths a, b, and c, using 3-> ; Brahmagupta's formula for the area of a cyclic quadrilateral, 3-> ; making one side length equal zero, to make a cyclic triangle. 3-> ; Since all triangles are cyclic (can be circumscribed by a circle), 3-> ; this gives the area for any triangle. 3-> 3-> 2s=a+b+c+d ; cyclic quadrilateral side lengths are a, b, c, and d #5: 2*s = a + b + c + d 5-> cyclic_area = ((s-a)*(s-b)*(s-c)*(s-d))^.5 1 #6: cyclic_area = ((s - a)*(s - b)*(s - c)*(s - d))^- 2 6-> eliminate s ; Brahmagupta's formula: Solving equation #5 for (s) and substituting into the current equation... (a + b + c + d) (a + b + c + d) (a + b + c + d) (a + b + c + d) 1 #6: cyclic_area = ((--------------- - a)*(--------------- - b)*(--------------- - c)*(--------------- - d))^- 2 2 2 2 2 6-> copy (a + b + c + d) (a + b + c + d) (a + b + c + d) (a + b + c + d) 1 #7: cyclic_area = ((--------------- - a)*(--------------- - b)*(--------------- - c)*(--------------- - d))^- 2 2 2 2 2 6-> replace d with 0 ; Heron's formula: (a + b + c) (a + b + c) (a + b + c) (----------- - a)*(----------- - b)*(----------- - c)*(a + b + c) 2 2 2 1 #6: cyclic_area = -----------------------------------------------------------------^- 2 2 6-> pause 6-> compare 2 ; simplify and compare with Heron's formula Comparing #2 with #6... Simplifying both equations... 1 (((2*(((a^2)*((b^2) + (c^2))) + ((b*c)^2))) - (a^4) - (b^4) - (c^4))^-) 2 #2: area = ----------------------------------------------------------------------- 4 1 (((2*(((a^2)*((b^2) + (c^2))) + ((c*b)^2))) - (a^4) - (b^4) - (c^4))^-) 2 #6: cyclic_area = ----------------------------------------------------------------------- 4 Variable (area) in the first equation is equal to (cyclic_area) in the second equation. Finished reading file "heron.in". 6-> clear all 1-> read radius.in 1-> ; Some more fun formulas. These are very similar to Heron's formula 1-> ; for the area of a triangle (see "heron.in"). a, b, and c are the 1-> ; lengths of the sides of the triangle. 1-> 1-> s=(a+b+c)/2 ; semiperimeter (a + b + c) #1: s = ----------- 2 1-> ; radius of a circle inscribed in a triangle, called an incircle: 1-> inradius=(s*(s-a)*(s-b)*(s-c))^.5/s 1 ((s*(s - a)*(s - b)*(s - c))^-) 2 #2: inradius = ------------------------------- s 2-> eliminate s 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: inradius = ----------------------------------------------------------------------- (a + b + c) 2-> unfactor (a^2)*(c^2) (a^4) (a^2)*(b^2) (b^4) (b^2)*(c^2) (c^4) 1 2*((----------- - ----- + ----------- - ----- + ----------- - -----)^-) 8 16 8 16 8 16 2 #2: inradius = ----------------------------------------------------------------------- (a + b + c) 2-> simplify 1 (((2*(((a^2)*((c^2) + (b^2))) + ((b*c)^2))) - (a^4) - (b^4) - (c^4))^-) 2 #2: inradius = ----------------------------------------------------------------------- (2*(a + b + c)) 2-> ; The following is the equation for the radius of a circle circumscribing 2-> ; a triangle, called a circumcircle, which is a circle that passes through 2-> ; all the vertices of a polygon. 2-> radius=a*b*c/(4*(s*(s-a)*(s-b)*(s-c))^.5) a*b*c #3: radius = ----------------------------------- 1 (4*((s*(s - a)*(s - b)*(s - c))^-)) 2 3-> eliminate s Solving equation #1 for (s) and substituting into the current equation... a*b*c #3: radius = ------------------------------------------------------------------------- (a + b + c) (a + b + c) (a + b + c) (a + b + c)*(----------- - a)*(----------- - b)*(----------- - c) 2 2 2 1 (4*(-----------------------------------------------------------------^-)) 2 2 3-> simplify a*b*c #3: radius = ----------------------------------------------------------------------- 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#^(i#*x))^2) + 1) 2 #4: cot = i#*(1 + ---------------------) (((e#^(i#*x))^2) - 1) 2*(e#^(i#*x)) #5: sec = --------------------- (((e#^(i#*x))^2) + 1) 2*i#*(e#^(i#*x)) #6: csc = --------------------- (((e#^(i#*x))^2) - 1) 6-> clear all 1-> read pyth3d.in 1-> ; This arrives at the distance between two points in 3D space from the 1-> ; Pythagorean theorem (distance between two points on a 2D plane). 1-> ; The coordinate of point 1, 2D: (x1, y1), 3D: (x1, y1, z1). 1-> ; The coordinate of point 2, 2D: (x2, y2), 3D: (x2, y2, z2). 1-> 1-> L^2=(x1-x2)^2+(y1-y2)^2 ; Distance formula for a 2D Cartesian plane. #1: L^2 = ((x1 - x2)^2) + ((y1 - y2)^2) 1-> distance^2=L^2+(z1-z2)^2 ; Add another leg. #2: distance^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: distance^2 = ((x1 - x2)^2) + ((y1 - y2)^2) + ((z1 - z2)^2) 2-> distance ; Solve to get the distance in 3D Cartesian space. 1 #2: distance = ((((x1 - x2)^2) + ((y1 - y2)^2) + ((z1 - z2)^2))^-)*sign0 2 Finished reading file "pyth3d.in". 2-> clear all 1-> read distance.in 1-> # This input arrives at the shortest distance between a point and a line 1-> # in 2 dimensions. The point is at (x0, y0) in cartesian coordinates. 1-> 1-> a*x+b*y+c=0 ; equation of the line #1: (a*x) + (b*y) + c = 0 1-> y ; solve for y -1*((a*x) + c) #1: y = -------------- b 1-> unfactor fully ; equation of the line in slope-intercept form: -1*a*x c #1: y = ------ - - b b 1-> distance=|a*(x-x0)+b*(y-y0)|/(a^2+b^2)^.5 1 ((((a*(x - x0)) + (b*(y - y0)))^2)^-) 2 #2: distance = ------------------------------------- 1 (((a^2) + (b^2))^-) 2 2-> eliminate y Solving equation #1 for (y) and substituting into the current equation... -1*((a*x) + c) 1 ((((a*(x - x0)) + (b*(-------------- - y0)))^2)^-) b 2 #2: distance = -------------------------------------------------- 1 (((a^2) + (b^2))^-) 2 2-> simplify ; the beautiful answer is: (((a*x0) + c + (b*y0))^2) 1 #2: distance = -------------------------^- ((a^2) + (b^2)) 2 Finished reading file "distance.in". 2-> clear all 1-> read ellipse.in 1-> ; This is an equation for an ellipse that was created using the rule 1-> ; that the sum of the distances 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-> ; A simplified equation for a right ellipse centered at the origin (0, 0) 1-> ; 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) 2-> ; The x-intercepts are radius1 and -radius1 because y=0 there. 2-> ; The y-intercepts are radius2 and -radius2 because x=0 there. Finished reading file "ellipse.in". 2-> y x 1 #2: y = ((-1*((-------^2) - 1))^-)*sign*radius2 radius1 2 2-> simplify x 1 #2: y = ((1 - (-------^2))^-)*sign*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 Equation is a degree 0.5 polynomial in (y). Raising both equation sides to the power of 2 and unfactoring... Equation is a degree 0.5 polynomial in (y). Raising both equation sides to the power of 2 and unfactoring... Equation is a degree 2 polynomial in (y). Equation was quadratic. 1 ((((4*((2*x*(y1 - y2)*(x1 - x2)) + (y2*((y2*(y1 - y2)) - (x2^2) + (x1^2) + (y1^2) + (k^2))) + (y1*((x2^2) - (x1^2) - (y1^2) + (k^2)))))^2) + (64*((y1*((y1*((x2*((x2*((x*(x2 - x1 - x)) - (y1*y2))) - (x*((x1^2) + (y1^2))))) + (x*((x1*((x1*(x1 - x)) + (y1^2))) + (x*(k^2)))) + ((x1^2)*((k^2) + (y1*y2))) - (y1*y2*((y2^2) + (k^2))))) + (y2*(((x2^2)*((y2^2) - (x1^2) - (k^2))) - ((y2^2)*((k^2) + (x1^2))) - ((x1*k)^2))))) + ((k^2)*((x2*((x2*((x*(x + x1 - x2)) + (y2^2))) + (x*((k^2) + (x1^2))))) + (x*((x1*((x1*(x - x1)) + (k^2))) + (x*((y2^2) - (k^2))))))) + ((y2^2)*x*((x2*((x2*(x2 - x1 - x)) + (y2^2) - (x1^2))) + (x1*((x1*(x1 - x)) - (y2^2))))))) + (32*((y1*((y1*(((x2^2)*((x1^2) + (y1^2))) + ((y1^2)*((y1*y2) - (x1^2))) + ((y2*k)^2))) + (y2*((x2^4) + (y2^4) + (x1^4) + (k^4))))) - ((k^2)*(((x2^2)*((x1^2) + (k^2))) + ((k*x1)^2))) + ((y2^2)*(((x2^2)*((x1^2) - (y2^2))) + ((y2*x1)^2))))) + (16*((y1*((y1*((x2*((8*x*((x*x1) + (y1*y2))) - (x2^3))) - (x1*((8*x*((k^2) + (y1*y2))) + (x1^3))) + ((y2^2)*((y2^2) + (y1^2))) + ((y1^2)*((3*(k^2)) - (y1^2))) - (3*(k^4)))) + (8*y2*x*((x2*((x2*(x + x1 - x2)) + (k^2) + (x1*(x1 - (2*x))) - (y2^2))) + (x1*((y2^2) + (x1*(x - x1)) + (k^2))) - (x*(k^2)))))) + ((k^2)*((x2*((x2^3) - (8*x*((x*x1) + (y2^2))))) + (3*(y2^2)*((y2^2) - (k^2))) + (x1^4) + (k^4))) + ((y2^2)*((x2*((8*(x^2)*x1) - (x2^3))) - (y2^4) - (x1^4))))))^-)*sign0 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 1 (((((k^2)*((x1^2) + (4*((x^2) - (x*x2))) + (y1^2) + (x2^2) + (y2^2) + (2*((x1*(x2 - (2*x))) - (y2*y1))))) - (k^4))*((y1^2) - (2*((y1*y2) + (x2*x1))) + (y2^2) + (x2^2) + (x1^2) - (k^2)))^-)*sign0 2 (x1 + x2) (-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + ((y1 - y2)*(x - ---------)*(x2 - x1))) (y1 + y2) 2 2 #1: y = --------- + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 ((y1^2) - (2*y1*y2) - (k^2) + (y2^2)) Finished reading file "all.in". 1-> End of input.