Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

20 R [3] A closed cylindrical barrel of radius R and length L, is half full with oil of weight density w and lies

image text in transcribed

20 R [3] A closed cylindrical barrel of radius R and length L, is half full with oil of weight density w and lies on F the ground on the edge AB as shown in Fig. 3. The force F exerted by the oil on the circular side is given by R F = 2wxRxdr. Use the trapezoid rule with five 0 intervals and the term R2.2) of the Romberg algorithm to calculate the force F for R=2 ft and w = 90 lb/ft. A dx 6'- BI 20 [4] Fig. 3. Fluid barrel VRx Write a C++ program that estimates the force exerted by the oil from problem [4]. The main program should request from the user the values of a, b and n (let the user know the units), should call a function named Trapezoid whose pseudocode is presented below, and should print the value of the force and its units. The function f(x) should be defined using a "define" statement or as a separate function. function Trapezoid (integer n, real a, b) integer i real h, sum, x h (b-a)/n pay for i to n - 1 do xatioh sumsum + f(x) end for sumsum h return sum end function Trapezoid

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

Modern Quantum Mechanics

Authors: J.J Sakurai

Revised Edition

9781108499996, 201539292, 978-0201539295

More Books

Students also viewed these Mechanical Engineering questions