Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use Python 50 (1) (a) [8] Solve the non-linear equation: Acosh = X+10 for . The origin X of the problem is explained in the

use Python

image text in transcribedimage text in transcribedimage text in transcribed

50 (1) (a) [8] Solve the non-linear equation: Acosh = X+10 for . The origin X of the problem is explained in the notes. Note: coshx exp.0 + exp- 2 Choose any method introduced in lecture on root-finding. Specify the number of iterations required to converge. Specify your answer to 4 dec- imal places. (b) [7] Find the point of intersection of the curves: y = x3 - 2x + 1 and y=r?. Specify your answer to 4 decimal places. (2) [15] Consider a game where the contestant is presented with three doors. Behind one of the doors is a car (the "prize), behind the other two are goats. The contestant chooses a door, but the host (who knows where the prize is) opens one of the other two doors (never revealing the prize). The contestant is now given the choice of switching to the other door. Create a simulation that plays the game N times input by the user ), using each of the two strategies (switch door selected or not switch door selected). Estimate the chance of winning for each of the two strategies as a ratio of wins to the total number of attempts N. Run the simulation and report your results for N = 10000 and N = 100000 games. (3) [20] In labs 3 and 7 you computed and plotted the trajectory of a projectile, neglecting air-resistance (drag) on the projectile. In this problem you will incorporate air resistance. The drag force f, for a projectile (like a football or a tennis ball) is proportional to the square of the projectile's speed: f = Du? and the direction of f is opposite to the direction of the projectile's velocity. 7 = - Dv + fr=-Dv V; & fy=-DU - Vy Where fa, fy are the components of the drag force and the proportionality constant D is given by: D ppA 2 where A is the cross-sectional area of the projectile (a ball of mass m), CD is the drag coefficient (dependent on the shape of the projectile) and p is the density of air. From Newton's second law, the acceleration of the "ball is proportional to the external unbalanced force: The rv and y component of the net force on the ball are: F = -Dv. Vj = ma, F, = -9 - Du vy = ma, The particle moves in the +r and +y direction. The negative signs on the r and y components of the acceleration indicate that these are opposite to the direction of motion. Knowing the mass of the projectile (ball), the accelera- tion can be computed. (i) Use numpy and Matplolib to compute and plot the trajectory of a base- ball, projected at a speed and angle input by the user. The program should print the maximum height and the range that the ball reaches. The steps to compute the positions and velocities are given below. (ii) Plot the trajectory of the baseball with and without air resistance on the same plot. For a regulation baseball, assume m = 0.145Kg, the radiu sr = 0.0366m, Cp = 0.5 and the density of air (at standard temperature and pressure) is p=1.2kg/m3 (a) Choose a time interval At and define the initial values of x, y, Vz, Vy, t. (choose At to be a suitable value in the range 0.05 to 0.1). (b) Choose N - the maximum number of intervals (this gives the max. time: tmar = N * At for the numerical solution). So at the kth timestep: th= k* At. Experiment with various values for N and At, to find a suitable plot for the trajectory. (C) Iterate (loop) the next 4 steps repeating the steps while n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions