Can a computer science tutor that is familiar with PYTHON PROGRAMMING help me with number 2 AND
Fantastic news! We've Found the answer you've been seeking!
Question:
Can a computer science tutor that is familiar with PYTHON PROGRAMMING help me with number 2 AND 3 from the problem statement.
Transcribed Image Text:
Determining the area under a curve: There are several methods to determine the area under a curve numerically. Two of the most popular methods is the Trapezoidal Rule and the 3/8 Simpsons Rule. Below is the Pseudo code as well as the Python program to determine the area under a curve using these two methods. You need to understand how these two methods work. For the assignment, you are required to do the following: 1) Discuss the mathematics underpinning these two methods. 2) Using the PYTHON program given, draw up the flow diagram. 3) Do not copy the pseudocode given but redo the pseudocode in your own words. 4) Write down the PYTHON program given. Trapezoidal Rule: Trapezoidal Method Algorithm | 1. Start 2. Define function f(x) 3. Read lower limit of integration, upper limit of integration and number of sub interval 4. Calcultae: step size = (upper limit - lower limit) /number of sub interval 5. Set: integration value = f (lower limit) + f (upper limit) 6. Set: i = 1 7. If i > number of sub interval then goto 8. Calculate: k = lower limit + i * h 9. Calculate: Integration value = Integration Value + 2* f(k) 10. Increment i by 1 i.e. i = i+l and go to step 7 11. Calculate: Integration value = Integration value step size/2 12. Display Integration value as required answer 13. Stop Determining the area under a curve: There are several methods to determine the area under a curve numerically. Two of the most popular methods is the Trapezoidal Rule and the 3/8 Simpsons Rule. Below is the Pseudo code as well as the Python program to determine the area under a curve using these two methods. You need to understand how these two methods work. For the assignment, you are required to do the following: 1) Discuss the mathematics underpinning these two methods. 2) Using the PYTHON program given, draw up the flow diagram. 3) Do not copy the pseudocode given but redo the pseudocode in your own words. 4) Write down the PYTHON program given. Trapezoidal Rule: Trapezoidal Method Algorithm | 1. Start 2. Define function f(x) 3. Read lower limit of integration, upper limit of integration and number of sub interval 4. Calcultae: step size = (upper limit - lower limit) /number of sub interval 5. Set: integration value = f (lower limit) + f (upper limit) 6. Set: i = 1 7. If i > number of sub interval then goto 8. Calculate: k = lower limit + i * h 9. Calculate: Integration value = Integration Value + 2* f(k) 10. Increment i by 1 i.e. i = i+l and go to step 7 11. Calculate: Integration value = Integration value step size/2 12. Display Integration value as required answer 13. Stop
Expert Answer:
Answer rating: 100% (QA)
Star Trapezoidal method Define the function fx Read lowe... View the full answer
Posted Date:
Students also viewed these programming questions
-
Evaluate and write general information about the assigned clinical facility to include: VI.D.5 (6) a. Name of the facility b. Location c. Size d. Mission/Philosophy and Goals e. Services provided f....
-
1. Use questions 2 and 3 from the second case study (not the group marketing plans) to begin the analysis. If you got them wrong from the first module or assessed out of module I, then segment the...
-
A computer science professor has seven different programming books on a bookshelf. Three of the books deal with C++, the other four with Java. In how many ways can the professor arrange these books...
-
The management of a New York area investment firm wants to find out about the investment needs of its existing customers, for which it has an extensively detailed list, as a function of their...
-
a. For the normal distribution shown below, find the z -score. b. Find the value of z (rounding to two decimal places) for right-tail probabilities of (i) 0.05 and (ii) 0.005. .20
-
The NetRoad Trucking Company participates in an Internet transportation exchange where customers advertise their shipments including load weight and volume, and trip origin and destination. NetRoad...
-
As the owner of a landmark Chicago skyscraper, you decide to purchase insurance that will pay $1 billion in the event the building is destroyed by terrorists. Suppose the likelihood of such a loss is...
-
Several independent audit situations are presented here. Assume that everything other than what is described would have resulted in an unqualified opinion. Required Indicate the type of opinion you...
-
Write the function sum2.m that accepts a matrix m and returns the summation of the positive numbers and the summation of the negative numbers in m. The outputs are sum_p, and sum_n. Use the function...
-
A load of lumber er weighing W = 25 kN is being raised as shown by a mobile crane. Knowing that the tension is 25kN in all portions of cable AEF and that the weight of boom ABC is 3kN, determine (a)...
-
You are given the following information for a company from last year: Sales 3,872,297 Cost of Goods Sold 2,416,016 Operating Expenses 851,073 Depreciation 115,227 In addition, the firm received...
-
What is the theme of The Body Snatcher?
-
What is the theme of Edward Scissorhands?
-
What is the theme of The Green Mile?
-
You have a lever and you want the force applied to be enough for the lever to rotate clockwise. In terms of theory, the Force is intended to create a clockwise moment M about point O. Determine the...
-
3. You believe arbitrage price theory is a model for equity market returns. Your friend tells you she has found an investment manager who has consistently produced Jensen's alpha over the past ten...
-
Assume that a search engine returns a ranked list of 10 total documents for a given query. According to the ground truth labeling, there are 66 relevant documents for this query ((assuming binary...
-
Distinguish among total-moisture content, free-moisture content, equilibrium-moisture content, unbound moisture, and bound moisture.
-
A 3.0-cm-tall object is \(15 \mathrm{~cm}\) in front of a concave mirror that has a \(25 \mathrm{~cm}\) focal length. Calculate the image position and height.
-
A \(3.0-\mathrm{cm}\)-tall object is \(45 \mathrm{~cm}\) in front of a convex mirror that has a \(-25 \mathrm{~cm}\) focal length. Calculate the image position and height.
-
A laser beam is incident on a mirror at an angle of \(30^{\circ}\), as shown in Figure P18.44. It reflects off the mirror and strikes a wall \(2.0 \mathrm{~m}\) away at point \(\mathrm{P}\). By what...
Study smarter with the SolutionInn App