#1: " ----------[ D e r i v e ]---------- " User #2: " ---------- Initialization ---------- " User #3: " ---------- Numbers ---------- " User User #4: " Let's begin by playing with numbers: infinite precision integers " User #5: " => 30414 0932017133 7804361260 8166064768 8443776415 6896051200 0000000000 " #6: q_ := 50! User #7: q_ User Simp(#7) #8: 304140932017133780436126081660647688443776415689605120000000000~ 00 User #9: " => 2^47 3^22 5^12 7^8 11^4 13^3 17^2 19^2 23^2 29 31 37 41 43 47 " #10: FACTOR(q_) User Simp(#10) 47 22 12 8 4 3 2 2 2 #11: 2 *3 *5 *7 *11 *13 *17 *19 *23 *29*31*37*41*43*47 User #12: " Double factorial => 10!! = 10*8*6*4*2 = 3840, 9!! = 9*7*5*3*1 = 945 " #13: [10!!, 9!!] User #14: [3628800!, 362880!] Simp(#13) #15: " ABC base 16 => 2748 base 10 " User #16: InputBase := 16 User #17: 2748 User Input was 0abc #18: 2748 Simp(#17) #19: InputBase := Decimal User #20: " 123 base 10 => 234 base 7 " User #21: OutputBase := 7 User #22: 123 User Prints on screen as 234 #23: 123 Simp(#22) Prints on screen as 234 #24: " 677 base 8 => 1BF base 16 " User #25: OutputBase := 16 User #26: InputBase := 8 User #27: 447 User Prints on screen as 1BF #28: 447 Simp(#27) Prints on screen as 1BF #29: InputBase := Decimal User #30: OutputBase := Decimal User #31: " [log base 8](32768) => 5 " User #32: LOG(32768, 8) User #33: 5 Simp(#32) #34: " 5^(-1) mod 7 => 3; 5^(-1) mod 6 => 5 " User #35: INVERSE_MOD(5, 7) User #36: 3 Simp(#35) #37: INVERSE_MOD(5, 6) User #38: 5 Simp(#37) #39: " Greatest common divisor => 74 " User #40: GCD([1776, 1554, 5698]) User #41: 74 Simp(#40) #42: " Infinite precision rational numbers => 4861/2520 " User 1 1 1 1 1 1 1 1 1 #43: --- + --- + --- + --- + --- + --- + --- + --- + ---- User 2 3 4 5 6 7 8 9 10 4861 #44: ------ Simp(#43) 2520 User #45: " Complete decimal expansion of a rational number => 0.142857 ... " 1 #46: --- User 7 1 #47: --- Simp(#46) 7 User #48: " Multiply two complete decimal expansions and produce an exact result => 2 " 7 22 #49: ----*---- User 11 7 #50: 2 Simp(#49) #51: " This number should immediately simplify to 3^(1/3) " User 10 / 29 \1/3 #52: ----*|1 + ------| User 7 \ 1000 / 1/3 #53: 3 Simp(#52) User #54: " Simplify an expression with nested square roots => 1 + sqrt(3) " #55: SQRT(2*SQRT(3) + 4) User #56: SQRT(3) + 1 Simp(#55) User #57: " Try a more complicated example (from the Putnam exam) => 3 + sqrt(2) " User #58: SQRT(14 + 3*SQRT(3 + 2*SQRT(5 - 12*SQRT(3 - 2*SQRT(2))))) #59: SQRT(2) + 3 Simp(#58) User #60: " See D.J. Jeffrey and A.D. Rich, ``The nesting habits of radicals'', draft of " #61: " 1998 => sqrt(2) + sqrt(3) + sqrt(5) " User #62: SQRT(10 + 2*SQRT(6) + 2*SQRT(10) + 2*SQRT(15)) User #63: SQRT(5) + SQRT(3) + SQRT(2) Simp(#62) #64: " Rationalize the denominator => 5 + 2 sqrt(6) " User SQRT(3) + SQRT(2) #65: ------------------- User SQRT(3) - SQRT(2) #66: 2*SQRT(6) + 5 Simp(#65) User #67: " A factorization of 3 in the integers extended by sqrt(-5) " #68: SQRT(-2 + SQRT(-5))*SQRT(-2 - SQRT(-5)) User #69: 3 Simp(#68) #70: " => 3 + sqrt(7) [Jeffrey and Rich] " User 1/3 #71: (90 + 34*SQRT(7)) User #72: SQRT(7) + 3 Simp(#71) #73: " This is a nontrivial way of writing 12 ! " User 2/3 ((135 + 78*SQRT(3)) + 3)*SQRT(3) #74: ------------------------------------- User 1/3 (135 + 78*SQRT(3)) #75: 12 Simp(#74) User #76: " See David Jeffrey, ``Current Problems in Computer Algebra Systems'', talk " #77: " => 1 + sqrt(2) " User 1/5 #78: (49 + 21*SQRT(2)) User 1/5 #79: (21*SQRT(2) + 49) Simp(#78) User #80: " A nasty example generated by Axiom => [log(sqrt(2) + 1) + sqrt(2)]/3 " User (6 - 4*SQRT(2))*LOG(3 - 2*SQRT(2)) + (3 - 2*SQRT(2))*LOG(17 - ~ #81: ---------------------------------------------------------------~ 48*SQRT(2) - 72 ~ 12*SQRT(2)) + 32 - 24*SQRT(2) ------------------------------ SQRT(2) LN(SQRT(2) - 1) #82: --------- - ----------------- Simp(#81) 3 3 #83: " Cardinal numbers => infinity " User #84: 2*inf - 3 User #85: inf Simp(#84) #86: " 2^aleph_0 => aleph_1 " User inf #87: 2 User #88: inf Simp(#87) #89: " ---------- Quit ---------- " User