A ball is launched in the air with initial velocity u, from an initial position of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A ball is launched in the air with initial velocity u, from an initial position of coordinates (xo, yo) as illustrated below: y Vo 0 X Figure 1: Ball launching at angle from the x-axis with inital velocity vo The ball is launched at an angle 0 (expressed in degrees) from the x-axis. The equations describing the motion (i.e. the position of the ball (x(t), y(t)) as a function of time t) of the ball are: x(t) = xo + vot cos(0) 1 y(t) = yo + vot sin(0) -- 81²2 stivatesindows where g is the gravitational acceleration (g = 9.81 m/s²}). Since is given in degrees, you will want to convert it first into radians before using the sine cosine functions. Go to Settings to activate Write a function named proj_time() that calculates the time at which the ball reaches the ground. Note that when the ball hits the ground, y = 0. So, to find the time at which the ball reaches the ground you have to solve the quadratic equation: • y0, which is the initial y position • v0, which is the initial velocity theta, which is the launching angle in degrees . You should have already defined a function that solves a quadratic equation (function solve_quadratic (), refer to Question 1). So, your new function proj_time() should have the following input arguments (use the same argument names): 81² + Uot sin(0) + yo = 0 Inside proj_time(), call the function solve_quadratic () with the correct inputs based on the quadratic equation above. Recall that solve_quadratic () returns two elements. The correct solution for the time at which the ball reaches the ground is the second element, elem_2, for which the root is computed by setting the to. Your function proj_time() should only return one solution, the correct one. #ANSWER CELL #run this cell to create a global variable g, but make sure you don't have any other global variables also named g g = 9.81 Try out your new proj_time() function in the cell below. Try using y0 = 0 meters, v0 = 15 m/s, and theta = 40 degrees. Feel free to try it for other input values. You do not need to store any outputs from the cell below. This is just to allow you to test your function. Activate Windows Go to Settings to activate Question 3.1: Write a function named proj_distance () that calculates the horizontal distance traveled by the ball from its initial horizontal position, xo, before it reaches the ground. Your function should take as input arguments y0, v0, and theta. You can first solve for the time when the ball hits the ground using the function above, proj_time(), and then use this time in the following equation to get the distance traveled: x(t) = xo + vot cos(0) # ANSWER CELL Try out your new proj_distance () function in the cell below. Try using y0 = 0 meters, v0 = 15 m/s, and theta = 40 degrees. Feel free to try it for other input values. You do not need to store any outputs from the cell below. This is just to allow you to test your function. grader.check ("q3.1") Question 3.2: Calculate the horizontal distance traveled by a ball starting at 5 m above the ground, with a velocity of 1 m/s at an angle of 30 degrees above horizontal. Store the value as q3_2. A ball is launched in the air with initial velocity u, from an initial position of coordinates (xo, yo) as illustrated below: y Vo 0 X Figure 1: Ball launching at angle from the x-axis with inital velocity vo The ball is launched at an angle 0 (expressed in degrees) from the x-axis. The equations describing the motion (i.e. the position of the ball (x(t), y(t)) as a function of time t) of the ball are: x(t) = xo + vot cos(0) 1 y(t) = yo + vot sin(0) -- 81²2 stivatesindows where g is the gravitational acceleration (g = 9.81 m/s²}). Since is given in degrees, you will want to convert it first into radians before using the sine cosine functions. Go to Settings to activate Write a function named proj_time() that calculates the time at which the ball reaches the ground. Note that when the ball hits the ground, y = 0. So, to find the time at which the ball reaches the ground you have to solve the quadratic equation: • y0, which is the initial y position • v0, which is the initial velocity theta, which is the launching angle in degrees . You should have already defined a function that solves a quadratic equation (function solve_quadratic (), refer to Question 1). So, your new function proj_time() should have the following input arguments (use the same argument names): 81² + Uot sin(0) + yo = 0 Inside proj_time(), call the function solve_quadratic () with the correct inputs based on the quadratic equation above. Recall that solve_quadratic () returns two elements. The correct solution for the time at which the ball reaches the ground is the second element, elem_2, for which the root is computed by setting the to. Your function proj_time() should only return one solution, the correct one. #ANSWER CELL #run this cell to create a global variable g, but make sure you don't have any other global variables also named g g = 9.81 Try out your new proj_time() function in the cell below. Try using y0 = 0 meters, v0 = 15 m/s, and theta = 40 degrees. Feel free to try it for other input values. You do not need to store any outputs from the cell below. This is just to allow you to test your function. Activate Windows Go to Settings to activate Question 3.1: Write a function named proj_distance () that calculates the horizontal distance traveled by the ball from its initial horizontal position, xo, before it reaches the ground. Your function should take as input arguments y0, v0, and theta. You can first solve for the time when the ball hits the ground using the function above, proj_time(), and then use this time in the following equation to get the distance traveled: x(t) = xo + vot cos(0) # ANSWER CELL Try out your new proj_distance () function in the cell below. Try using y0 = 0 meters, v0 = 15 m/s, and theta = 40 degrees. Feel free to try it for other input values. You do not need to store any outputs from the cell below. This is just to allow you to test your function. grader.check ("q3.1") Question 3.2: Calculate the horizontal distance traveled by a ball starting at 5 m above the ground, with a velocity of 1 m/s at an angle of 30 degrees above horizontal. Store the value as q3_2.
Expert Answer:
Answer rating: 100% (QA)
The function projtime to calculate the time at which the ball reaches the ground import math def sol... View the full answer
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Posted Date:
Students also viewed these programming questions
-
1. What are antibodies? A) Proteins that activate complement against microbes B) Proteins that prevent attachment of microbes to mucosal surfaces C) Proteins that increase the concentration of gamma...
-
:B.B. Games, Inc. is a small family-owned business that makes board games for children and adults. The company was founded in 1960 by the late Bradley Buttersworth of Peterborough, Ontario, and it is...
-
A one tossed vertically into the air with Initial velocity v cm/s reaches a maximum height of h = v2/ 1960 cm. (a) Estimate h if v = 700 cm/s and v = 1 cm/s. (b) Estimate h if v = 1000 cm/s and v = 1...
-
Ms. Robin Nestor is provided with an automobile that is owned by her employer. The employer purchased the car in 2018 for $54,000, plus $7,020 in HST. During 2019, she drives a car a total of 72,000...
-
Find an equation of the line passing through the pair of points. Sketch the line. 1. (2, 5), (1, 7) 2. (4, 7), (1, 4/3)
-
If Judge Hand had written his decision in December 1941, at the beginning of World War II, rather than in 1945, at its successful end, would he have handed down a judgment against the national...
-
Why is it important to use a structured project management approach ?
-
The State Auditor of Missouri is an elected ofcial. In auditing the nancial statements of the University of Missouri, what special problems relating to independence would he or she face that a...
-
Henna Company produces and sells two products, Carvings and Mementos. It manufactures these products in separate factories and markets them through different channels. They have no shared costs. This...
-
After a complaint was filed against him, Broker Ike was found guilty of a license law violation. He was fined and had to pay legal fees totaling $8,900. This was paid by the Recovery Fund. What else...
-
Zaki was offered an investment that will make three RM5,000 payments. The first payment will occur four years from today. The second will occur in five years and the third will follow in six years....
-
Explain how a web log file analyser works. What are its limitations?
-
How is branding used in marketing services? What is the distinction between a corporate brand such as Marriott, the names of its various inn and hotel chains, its packaged solutions for specific...
-
Why would growth in business services help individual firms and entire economies become more productive?
-
Spotify is a streaming music service originally developed in 2006 in Sweden and launching in 2008. Spotify Ltd now operates as the parent company in London while Spotify AB manages research and...
-
Explain the factors that influence the development of multichannel customer contact strategies.
-
A monochromatic beam of light travels through air of refractive index na and strikes a liquid of refractive index ny at an angle of incidence as shown in the figure below. At the bottom of the tank...
-
What are the key elements of a system investigation report?
-
Develop an M-file function to fit a power model. Have the function return the best-fit coefficient 2 and power 2 along with the r 2 for the untransformed model. In addition, use the subplot...
-
Determine the matrix inverse for the following system: 8x 1 + x 2 2x 3 = 20 2x 1 6x 2 x 3 = 38 3x 1 x 2 + 7x 3 = 34
-
Determine the total flops as a function of the number of equations n for the (a) Factorization, (b) Forward substitution, (c) Back substitution phases of the LU factorization version of Gauss...
-
A4-stroke, 4-cylinder, single acting spark ignition petrol engine develops \(20 \mathrm{~kW}\) brake power at \(3000 \mathrm{rpm}\). The following data are given : Bore \(=65 \mathrm{~mm}\), Stroke...
-
The following data is available for an engine working on ideal Otto cycle Temperature at the beginning of compression \(=50^{\circ} \mathrm{C}\). Temperature at the end of compressor \(=373^{\circ}...
-
A six cylinder four stroke I.C. Engine is to develop \(100 \mathrm{~kW}\) i.p. at 800 RPM. The stroke to bare ratio is 1.25. Assuming Mechanical efficiency of \(80 \%\) and break mean effective...
Study smarter with the SolutionInn App