Question: In Python. Below is the data (.txt file on notepad) Filename: VelvstNonUniform 0.40 0 1.31 4.16868 2.19 8.26164 3.50 12.25992 4.13 16.14498 5.08 19.89936 6.01
In Python.
Below is the data (.txt file on notepad)
Filename: VelvstNonUniform
0.40 0 1.31 4.16868 2.19 8.26164 3.50 12.25992 4.13 16.14498 5.08 19.89936 6.01 23.50626 7.47 26.95002 8.17 30.21588 9.28 33.2901 10.17 36.1602 11.33 38.81472 12.23 41.24352 13.24 43.43766 14.50 45.38946 15.12 47.09256 16.21 48.54192 17.12 49.73382 18.06 50.66568 19.36 51.33648 20.43 51.74634 21.10 51.8967 22.12 51.79032 23.20 51.43104 24.49 50.82402 25.37 49.97556 26.27 48.89292 27.33 47.58462 28.11 46.05996 29.36 44.32944 30.30 42.40416 31.41 40.29618 32.47 38.01828 33.37 35.5839 34.44 33.00708 35.32 30.30234 36.38 27.48462 37.10 24.56928 38.15 21.57198 39.14 18.50844 40.31 15.39456 41.01 12.24642 42.17 9.0798 43.45 5.91054 44.30 2.7543 45.29 0.37368 46.05 3.4584 47.33 6.48528 48.22 9.44028 49.41 12.30978 50.03 15.08082 51.22 17.7411 52.33 20.27904 53.19 22.68384 54.41 24.94542 55.16 27.05454 56.50 29.00292 57.30 30.78312 58.23 32.38854 59.16 33.81378 60.38 35.05404
Filename: VelvvstUniform
0 0 1 4.16868 2 8.26164 3 12.25992 4 16.14498 5 19.89936 6 23.50626 7 26.95002 8 30.21588 9 33.2901 10 36.1602 11 38.81472 12 41.24352 13 43.43766 14 45.38946 15 47.09256 16 48.54192 17 49.73382 18 50.66568 19 51.33648 20 51.74634 21 51.8967 22 51.79032 23 51.43104 24 50.82402 25 49.97556 26 48.89292 27 47.58462 28 46.05996 29 44.32944 30 42.40416 31 40.29618 32 38.01828 33 35.5839 34 33.00708 35 30.30234 36 27.48462 37 24.56928 38 21.57198 39 18.50844 40 15.39456 41 12.24642 42 9.0798 43 5.91054 44 2.7543 45 0.37368 46 3.4584 47 6.48528 48 9.44028 49 12.30978 50 15.08082 51 17.7411 52 20.27904 53 22.68384 54 24.94542 55 27.05454 56 29.00292 57 30.78312 58 32.38854 59 33.81378 60 35.05404
Exercise 6.2 (5 points) The files necessary for the completion of this problem can be found on the class Blackboard website. The file names are: VelvstUniform.txt and elvstNonUniform.txt. Another important application for numerical integration, is the calculation of integrals based on sampled points rather than an actual known symbolic expression for the function being integrated. For example, one can determine the velocity of a car at different times and use the data to estimate the distance traveled by the car by integrating over the data set. (a) The file VelvstUniform.ixt, contains two labeled columns, the first representing the time in minutes (measured every 1 minute from 0 to 60 minutes) and the second representing the velocity of the car in miles/hour. Use this data to estimate the total distance in miles traveled by the car in the one hour covered by the measurement. The integral should be calculated using the Simpson rule. (b) The file VelvstNonUniform.txt, contains two labeled columns, the first representing the time in minutes and the second listing the velocity of the car in miles/hour. In this case however the time intervals between the measurements are not uniform. Estimate the distance traveled in miles by the car, using the trapezoidal rule with non-uniform intervals as determined by the data set (c) For the data set used in part (b) write a program that plots the total distance traveled as a function of time from t 0 to t- 60 minutes. This type of calculation is referred to as the cumulative integral. Your calculation should still use the trapezoidal rule for the needed integral evaluations. Exercise 6.2 (5 points) The files necessary for the completion of this problem can be found on the class Blackboard website. The file names are: VelvstUniform.txt and elvstNonUniform.txt. Another important application for numerical integration, is the calculation of integrals based on sampled points rather than an actual known symbolic expression for the function being integrated. For example, one can determine the velocity of a car at different times and use the data to estimate the distance traveled by the car by integrating over the data set. (a) The file VelvstUniform.ixt, contains two labeled columns, the first representing the time in minutes (measured every 1 minute from 0 to 60 minutes) and the second representing the velocity of the car in miles/hour. Use this data to estimate the total distance in miles traveled by the car in the one hour covered by the measurement. The integral should be calculated using the Simpson rule. (b) The file VelvstNonUniform.txt, contains two labeled columns, the first representing the time in minutes and the second listing the velocity of the car in miles/hour. In this case however the time intervals between the measurements are not uniform. Estimate the distance traveled in miles by the car, using the trapezoidal rule with non-uniform intervals as determined by the data set (c) For the data set used in part (b) write a program that plots the total distance traveled as a function of time from t 0 to t- 60 minutes. This type of calculation is referred to as the cumulative integral. Your calculation should still use the trapezoidal rule for the needed integral evaluations
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
