Dennis J. Darland Practice in Programming ASUS Development Computer - Ubuntu 14.04 Starting Mon May 21 20:48:26 CDT 2018 Finished Mon May 21 20:48:37 CDT 2018 |\^/| Maple 2016 (X86 64 LINUX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2016 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > # define main function > main := proc() > > print("Maple output"); > print("Chapter 3"); > prob05(); > prob05B(); # general solution > end; main := proc() print("Maple output"); print("Chapter 3"); prob05(); prob05B() end proc > > prob05 := proc() > local a, t1,t2, v1,v2, eq1, eq2, eq3, eq4,eq5, eq6, eq7; > > print("Problem 5"); > > eq1 := 0.0 = 4.0 -16.0 * t1 * t1; > eq2 := v1 = -32.0 * t1; > eq3 := 3.0 = 0.0 + v2 * t2 - 16.0 * t2 * t2; > eq4 := 0.0 = v2 - 32.0 * t2; > eq5 := a = (v2 - v1) / 0.010; > eq6 := t1 > 0.0; > eq7 := t2 > 0.0; > > print(solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7] , [t1,t2,v1,v2,a])); > end; prob05 := proc() local a, t1, t2, v1, v2, eq1, eq2, eq3, eq4, eq5, eq6, eq7; print("Problem 5"); eq1 := 0. = 4.0 - 16.0*t1*t1; eq2 := v1 = -32.0*t1; eq3 := 3.0 = 0. + v2*t2 - 16.0*t2*t2; eq4 := 0. = v2 - 32.0*t2; eq5 := a = (v2 - v1)/0.010; eq6 := 0. < t1; eq7 := 0. < t2; print(solve([eq1, eq2, eq3, eq4, eq5, eq6, eq7], [t1, t2, v1, v2, a])) end proc > prob05B := proc() > local a, t1,t2, v1,v2, y0, y2, g, deltat, eq1, eq2, eq3, eq4,eq5, eq6, eq7; > > print("Problem 5B"); > > eq1 := 0.0 = y0 - 16.0 * t1 * t1; > eq2 := v1 = - 32.0 * t1; > eq3 := y2 = 0.0 + v2 * t2 - 16.0 * t2 * t2; > eq4 := 0.0 = v2 - 32.0 * t2; > eq5 := a = (v2 - v1) / 0.010; > eq6 := t1 > 0.0; > eq7 := t2 > 0.0; > > print(solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7] , [t1,t2,v1,v2,a])); > end; prob05B := proc() local a, t1, t2, v1, v2, y0, y2, g, deltat, eq1, eq2, eq3, eq4, eq5, eq6, eq7; print("Problem 5B"); eq1 := 0. = y0 - 16.0*t1*t1; eq2 := v1 = -32.0*t1; eq3 := y2 = 0. + v2*t2 - 16.0*t2*t2; eq4 := 0. = v2 - 32.0*t2; eq5 := a = (v2 - v1)/0.010; eq6 := 0. < t1; eq7 := 0. < t2; print(solve([eq1, eq2, eq3, eq4, eq5, eq6, eq7], [t1, t2, v1, v2, a])) end proc > # call main > main(); "Maple output" "Chapter 3" "Problem 5" memory used=3.9MB, alloc=40.3MB, time=0.19 [[t1 = 0.5000000000, t2 = 0.4330127019, v1 = -16., v2 = 13.85640646, a = 2985.640646]] "Problem 5B" 1/2 1/2 1/2 [[t1 = -0.2500000000 y0 , t2 = -0.2500000000 y2 , v1 = 8.000000000 y0 , 1/2 1/2 1/2 v2 = -8.000000000 y2 , a = -800.0000000 y2 - 800.0000000 y0 ], [ 1/2 1/2 1/2 t1 = 0.2500000000 y0 , t2 = -0.2500000000 y2 , v1 = -8.000000000 y0 , 1/2 1/2 1/2 v2 = -8.000000000 y2 , a = -800.0000000 y2 + 800.0000000 y0 ], [ 1/2 1/2 1/2 t1 = -0.2500000000 y0 , t2 = 0.2500000000 y2 , v1 = 8.000000000 y0 , 1/2 1/2 1/2 v2 = 8.000000000 y2 , a = 800.0000000 y2 - 800.0000000 y0 ], [ 1/2 1/2 1/2 t1 = 0.2500000000 y0 , t2 = 0.2500000000 y2 , v1 = -8.000000000 y0 , 1/2 1/2 1/2 v2 = 8.000000000 y2 , a = 800.0000000 y2 + 800.0000000 y0 ]] > quit memory used=17.8MB, alloc=42.3MB, time=0.60