n = 15108099 k = n Mod 10000 T = n Mod 100 m = n Mod 35 a = n Mod 25 L = n Mod 10 nn = 2 * m + 2 pi = 4 * Atn(1) g = 10 x = 11 - 1 / T - 0.1 y = 2.5 - 1 / k - 0.1 t1 = (2 * y - x + Sqr((x - 2 * y) ^ 2 + 4 * x * (x + y))) / (2 * x) ' v_min = Sqr(g * x ^ 2 * (1 + t1 ^ 2) / (2 * (x * t1 - y))) ' angle for minimum velocity: MsgBox "angle for minimum velocity:" MsgBox Atn(t1) * 180 / (4 * Atn(1)) MsgBox "degrees" MsgBox "minimum velocity:" MsgBox v_min MsgBox "meters per second" MsgBox "If the initial velocity of release is" v = 30 MsgBox v MsgBox "meters per second" MsgBox "then" MsgBox "there are two possible angles of release for the shuttle to fly just above the net" a = g * x ^ 2 / 2 / v ^ 2 b = -x c = g * x ^ 2 / 2 / v ^ 2 + y c = a + y N1 = (-b - Sqr(b ^ 2 - 4 * a * c)) / (2 * a) 'N1 = Atn(N1) aN1 = Atn(N1) DaN1 = 180 * aN1 / pi MsgBox DaN1 MsgBox "degrees" MsgBox "and" N2 = (-b + Sqr(b ^ 2 - 4 * a * c)) / (2 * a) 'N2 = Atn(N2) ' aN is an angle in radians. aN2 = Atn(N2) ' DaN is angle in degrees. DaN2 = 180 * aN2 / pi MsgBox DaN2 MsgBox "degrees" ' MsgBox "there is the distance at which the ball hits the top corner" a = g * (1 + N1 ^ 2) / 2 / v ^ 2 b = -N1 c = y X1 = (-b + Sqr(b ^ 2 - 4 * a * c)) / (2 * a) ' minus before the square root has no physical meaning here MsgBox x MsgBox "meters" 'MsgBox "and" a = g * (1 + N2 ^ 2) / 2 / v ^ 2 b = -N2 c = y X2 = (-b + Sqr(b ^ 2 - 4 * a * c)) / (2 * a) ' minus before the square root has no physical meaning here 'MsgBox X2 'MsgBox "meters" MsgBox "there are 2 times: 1 for each path" 'N1 = Atn(N1) t1 = x / (v * Cos(aN1)) MsgBox t1 MsgBox "seconds" MsgBox "and" 'N2 = Atn(N2) t2 = x / (v * Cos(aN2)) MsgBox t2 MsgBox "seconds" MsgBox "there are 2 curves lengths: 1 for each path" ' Integrating using Simpson rule to calculate the curves lengths: a = 0 Dim f(99) b = x 'b = X2 'nn = 98 h = (b - a) / nn ' For kk = 0 To nn x = a + kk * (b - a) / nn f(kk) = Sqr(1 + (N1 - g * x * (1 + N1 ^ 2) / v ^ 2) ^ 2) 'f(kk) = Sqr(1 + (N2 - g * x * (1 + N2 ^ 2) / v ^ 2) ^ 2) Next kk ' i2j = 0 For j = 1 To nn / 2 - 1 i2j = i2j + f(2 * j) Next j ' i2jm1 = 0 For j = 1 To nn / 2 i2jm1 = i2jm1 + f(2 * j - 1) Next j ' L1 = (f(0) + 2 * i2j + 4 * i2jm1 + f(nn)) * h / 3 ' MsgBox L1 MsgBox "meters" MsgBox "and" 'b = X1 b = x 'n = 88 h = (b - a) / nn ' For kk = 0 To nn x = a + kk * (b - a) / nn 'f(kk) = Sqr(1 + (N1 - g * x * (1 + N1 ^ 2) / v ^ 2) ^ 2) f(kk) = Sqr(1 + (N2 - g * x * (1 + N2 ^ 2) / v ^ 2) ^ 2) Next kk ' i2j = 0 For j = 1 To nn / 2 - 1 i2j = i2j + f(2 * j) Next j ' i2jm1 = 0 For j = 1 To nn / 2 i2jm1 = i2jm1 + f(2 * j - 1) Next j ' L2 = (f(0) + 2 * i2j + 4 * i2jm1 + f(nn)) * h / 3 ' MsgBox L2 MsgBox "meters" MsgBox "there are 2 average velocities: 1 for each path" aV1 = L1 / t1 MsgBox aV1 MsgBox "meters per second" MsgBox "and" aV2 = L2 / t2 MsgBox aV2 MsgBox "meters per second"