python question.

Anonymous
timer Asked: Mar 7th, 2019
account_balance_wallet $25

Question Description

This problem has two parts: the first part (the most important part) is solving the final nonlinear equation in the problem statement for ๐œƒ.

Once ๐œƒ is known, you can this solve for the location of the football, i.e., solve for ๐‘ฅ and ๐‘ฆ using a series (or vector) of time values. I used numpy.linspace() function to create a time vector and then solved for ๐‘ฅ and ๐‘ฆ at each time point, i.e.,

time = numpy.linspace(0,4)

x = x0 + v0*math.cos(theta)*time

y = y0 + v0*math.sin(theta)*time - (g*time**2)/2.0

Then, you can generate an ๐‘ฅ vs. ๐‘ฆ plot showing the trajectory of the ball. If the ball doesnโ€™t reach the target or if the ball goes through the ground (i.e., negative values for ๐‘ฅ) then you know that you choose a range of time values that is too short or too long. If youโ€™ve watched much (American) football, then you know that the ball is typically in the air for a few (more than 1 and less than 5 seconds) even for long throws.


Please make sure to include the input code and output as well as the memo. Please do it in your own work and words. Thanks

python question.
1.jpeg
python question.
2.jpeg
python question.
3.jpeg

Unformatted Attachment Preview

Tutor Answer

MainakNag
School: UIUC

Please take the code from this word file. PDF is making all the indentation disappear.

Football Throw Problem
First Part โ€“ Determination of the throw angle
In the given final equation after equating the time taken to reach the final x and y
coordinates, the final equation becomes โ€“

๐’ˆ. (๐’™ โˆ’ ๐’™๐ŸŽ )๐Ÿ
๐’š๐ŸŽ + ๐ญ๐š๐ง ๐œฝ . (๐’™ โˆ’ ๐’™๐ŸŽ ) โˆ’
โˆ’๐’š=๐ŸŽ
๐Ÿ. ๐’—๐Ÿ๐ŸŽ . ๐’„๐’๐’”๐Ÿ ๐œฝ
Now, using the following relationships and changing the terms in the above equation will
give us โ€“
Relationships and terms used
1. The change in the x-coordinates are denoted as delta-x, denoted by ฮ”x.

โˆ†๐‘ฅ = ๐‘ฅ โˆ’ ๐‘ฅ0
2. The change in the y-coordinates are denoted as delta-x, denoted by ฮ”y.

โˆ†๐‘ฆ = ๐‘ฆ โˆ’ ๐‘ฆ0
3. The value of cos ฮธ can be re written as (1 / sec ฮธ) and using the relationship between
tan ฮธ and sec ฮธ, we get โ€“

1
= sec 2 ๐œƒ = tan2 ๐œƒ + 1
2
cos ๐œƒ
4. And considering the initial velocity and acceleration due to gravity to be constants,
we write a new constant K
๐พ=

๐‘”
2. ๐‘ฃ20

The Final equation becomes โ€“

K. (โˆ†x)2 (tan2 ๐œƒ + 1) โˆ’ โˆ†x. tan ๐œƒ + โˆ†y = 0
This is clearly a quadratic equation of the (tan ฮธ), which gives two values of ฮธ.

Conclusion: These two values point to two possible angles, and a flat throw and a
lobbed-up throw, with same initial velocity and same final distance.
Using the Python code (Appendix - A) using Broydenโ€™s (Broyden1) method and taking
two different initial guesses, we have found those two values of the ฮธ to be โ€“
Measurement

ฮธ1 (Flat Throw, ...

flag Report DMCA
Review

Anonymous
Top quality work from this guy! I'll be back!

Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors