- 68 Views
- Uploaded on
- Presentation posted in: General

CS 121 – Quiz 4

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

CS 121 – Quiz 4

Questions 5 and 6

- We are given Blammo’s initial angle of elevation, initial velocity, and the height of the center of the ring. With this, we can define our xpos and ypos functions:
- xpos := (t) -> v0 * cos(θ) * t
- ypos := (t) -> v0 * sin(θ) * t – (1 / 2) * g * (t ^ 2)

- Don’t forget that θ must be in radians. It is given to us in degrees so we need to convert:
- convert(51, units, degrees, radians)

- We want Blammo to fly through the ring halfway through his flight, so we need to find when that is by finding his total flight time and dividing it in half:
- peakTime := solve(ypos(t) = 0, t)[2] / 2

- Solve will return a list of two solutions because Blammo not only lands on the ground, but also starts on the ground at t = 0. We are interested in the second solution.
- Also, notice that because we did not define v0, the answer for peakTime is given in terms of v0. This is what we want.

- We can now find the y position in terms of v0, set it equal to the ring height, and solve for v0. We take the max because we want to ignore the negative root:
- v := max(solve(ypos(peakTime) = ringHeight, v0))

- We can then find the maximum distance by finding the final x position (at t = 2 * peakTime) in terms of v0, and plugging in the velocity we just calculated:
- maxDistance := eval(xpos(2 * peakTime), v0 = v)

- And the answer: evalf([v, maxDistance])

- We are given the inclination angle (in degrees, don’t forget to convert to radians), the initial velocity (0), and the mass of the object. With this, we can define our v and t functions:
- v := (t) -> v0 + 32 * sin(alpha) * t
- d := (t) -> v0 * t + 16 * sin(alpha) * (t ^ 2)

- We can find the time it takes to travel the distance D to the bottom of the incline for part a:
- maxTime := max(solve(d(t) = D, t))

- And plug this into v for part b:
- maxVel := v(maxTime)

- For part c, we need to define and use the function K:
- K := (m, v) -> m * (v ^ 2)
- maxKin := K(m, maxVel)

- And finally, we need to convert to joules:
- convert(maxKin, units, (pounds * feet ^ 2) / (seconds ^ 2), joules)

- For all of these parts, Maple TA expects an approximate answer, so don’t forget to use evalf.