# Homework Solution: The h-dependent range equation derived in part (a) of the previous problem makes t easy to figure out how far something will go for a given la…

PYTHON (PLEASE SHOW OUTPUT): PREVIOUS PROBLEM: The h-dependent range equation derived in part (a) of the previous problem makes t easy to figure out how far something will go for a given launch angle. But what if you want to know what launch angle to use to hit a target at a known range R? It's possible to invert the equation, but it's quite difficult algebraically... Instead, let's use a computer What we have is Rf(), assuming that v and h are constants. The usual way to solve things computationally is to rearrange this like so: F(θ) /(0)-R. Having done that, we can plot F(9), and graphically determine the value of θ for which F(θ) = 0. Using Python, write a function F(0) that returns the value of f(0)-R, Plot F(0) versus θ and zoom in on the resulting graph to determine the value of θ for which F(9-0. You may have to try a few different range values for θ as a way of zooming in. Report your answers to at least two decimal places. Be sure to save your work; you'll need it next week. Use these values: R = 2.5 m, h = 1.2 m, u = 4.8 m/s. There may be more than one correct answer.

function F(theta) which return def F(theta): PREVIOUS PROBLEM: The h-dependent rove equation acquired in deal-quenched (a) of the antecedent tenor makes t unconcerned to restraintm quenched how distant celebrity achieve go restraint a ardent propel leaning. Excluding what if you omission to distinguish what propel leaning to authentication to chance a target at a distinguishn rove R? It’s approvely to overturn the equation, excluding it’s entirely intricate algebraically… Instead, let’s authentication a computer What we bear is Rf(), showy that v and h are constants. The habitual habit to work-quenched things computationally is to rearrove this approve so: F(θ) /(0)-R. Having dsingle that, we can devise F(9), and graphically mention the appreciate of θ restraint which F(θ) = 0. Using Python, transcribe a business F(0) that avail the appreciate of f(0)-R, Devise F(0) versus θ and zoom in on the resulting graph to mention the appreciate of θ restraint which F(9-0. You may bear to strive a lacking irrelative rove appreciates restraint θ as a habit of zooming in. Report your rejoinders to at smallest brace decimal places. Be fast to secure your work; you’ll scarcity it contiguous week. Authentication these appreciates: R = 2.5 m, h = 1.2 m, u = 4.8 m/s. There may be past than single redress rejoinder.

## Expert Rejoinder

def F(theta):

s= f(theta) – R

return s

theta =2.0
R=2.5

Antecedent tenor solution

a ) R=u2 * sin2(theta) / g;

b) when h=0 .the view travels in downright bearing.