Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 2: (Root finding) 6 marks Let us consider the following problem: how to hit a target in a given position with a problem has
Problem 2: (Root finding) 6 marks Let us consider the following problem: how to hit a target in a given position with a problem has a simple analytical solution, so it will be easy to check ourselves. Let the cannon bo placed in the origin, i.e. the initial coordinates of a missile are given by canon? This (xo,yo)=(x(t=0)'y(t=0))=(0,0) Here, x is the horizontal coordinate and y the vertical coordinate. A cannon can fire a missile with the initial velocity vo at the angle of a to the horizon. Its motion is determined by gravity. The Newton's second law m - F is the starting point. There is only an acceleration g-9.81 ms' due to the gravity directed downside: a, -g. And the horizontal motion is steady, i.e. a.-0. Thus, the force Fy -mg y, where ey is the unit vector in the vertical direction. By using at-a and dit = Vi one can easily integrate the following system of equations leading to y(t) = yo + Vyt--gt2 2 where velocities v,=vcos(a) and v, 'sin(a). Setting xo-yo-0, the equation y(x) for missile trajectory is given by y(x) = xtan(a) 2 COS2(a) a) Use the Newton-Raphson method to find the roots of y)-0. The root x>0 gives the distance how far the projectile will travel before touching the ground. Write a Python program that calculate the distance d X of yx)-0 for a projectile fired with initial velocity vo-10m/s under several angles of a 10,30,45,60 degree to the horizon. b) Write a Python program that shows the y(x) trajectory of a projectile fired with initial velocity v- 10m's under several angles of a-10,30,45,60 degree to the horizon. Insert x- label, y-label. Use for each curve a different color and introduce a legend, which associate the curve with the corresponding a value. (I mark)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started