Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement the function cart_speed_needed(), which returns the minimum initial speed, v0, that will allow a cart with mass m=1 kg to reach the end position

Implement the function cart_speed_needed(), which returns the minimum initial speed, v0, that will allow a cart with mass m=1 kg to reach the end position send. If the cart would make it to the end starting from rest, the function should return 0.

image text in transcribed

Part B (6 points) For any situation where the cart doesn't have enough total energy to reach the right end of the track starting from rest, we could just give the cart some initial speed vo to increase E until it will make it. How much initial speed do we need? If we compute the quantity T(x) = E-V(x) and find it to be negative somewhere, then the most negative value of T(x) is exactly how much we need to boost the inital kinetic energy To by in order to make T(x) >0 everywhere. Implement the function cart_speed_needed(), which returns the minimum initial speed vo that will allow a cart with mass m=1 kg to reach the end position xend. If the cart would make it to the end starting from rest, your function should return 0. (Hint: now you need to find the lowest value of T(x) to know how much initial kinetic energy needs to be added. The np.min() function will help you find the lowest value in an entire array.) def cart_speed_needed(x0, xend, V, num_points=1000, mass=1): Given the 1-d potential V(x), determines the minimum speed vo a cart starting at position x=x0 will need to make it to the right end of the track. Arguments: XO: X-position where cart begins. xend: x-position where the track ends. V: potential energy function V(x) to test. num_points: number of x-points to test in the range (x0, xend) [default: 1000.] mass: mass of the cart in kg (default: 1.] Returns: v: initial speed (in m/s) above which the cart will make it all the way from xo to xend. ## YOUR CODE HERE Part B (6 points) For any situation where the cart doesn't have enough total energy to reach the right end of the track starting from rest, we could just give the cart some initial speed vo to increase E until it will make it. How much initial speed do we need? If we compute the quantity T(x) = E-V(x) and find it to be negative somewhere, then the most negative value of T(x) is exactly how much we need to boost the inital kinetic energy To by in order to make T(x) >0 everywhere. Implement the function cart_speed_needed(), which returns the minimum initial speed vo that will allow a cart with mass m=1 kg to reach the end position xend. If the cart would make it to the end starting from rest, your function should return 0. (Hint: now you need to find the lowest value of T(x) to know how much initial kinetic energy needs to be added. The np.min() function will help you find the lowest value in an entire array.) def cart_speed_needed(x0, xend, V, num_points=1000, mass=1): Given the 1-d potential V(x), determines the minimum speed vo a cart starting at position x=x0 will need to make it to the right end of the track. Arguments: XO: X-position where cart begins. xend: x-position where the track ends. V: potential energy function V(x) to test. num_points: number of x-points to test in the range (x0, xend) [default: 1000.] mass: mass of the cart in kg (default: 1.] Returns: v: initial speed (in m/s) above which the cart will make it all the way from xo to xend. ## YOUR CODE HERE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

please try to give correct answer 1 1 3 . .

Answered: 1 week ago