Write a program that will approximate the area under the function f(x) = x - 2x+3...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that will approximate the area under the function f(x) = x - 2x+3 by using both a single rectangle and a single trapezoid, see the figure. The rectangle should use the left bound as the height. The program, when run, prompts the user for the left bound and then the right bound, printing the areas before terminating. Here is an example run: == This program approximates the area under f(x) ***2 - 2x + 3 given two bounds Input the left bound: -1 Input the right bound: 2 The approximate area under f (x) from -1.0 to 2.0 is: Rectangle: 18.0 Trapezoid: 13.5 Given both bounds and the corresponding heights, the area of a trapezoid is (h1 + h2) Area trap (bound R-boundL) x 2 Write a program that will approximate the area under the function f(x) = x - 2x+3 by using both a single rectangle and a single trapezoid, see the figure. The rectangle should use the left bound as the height. The program, when run, prompts the user for the left bound and then the right bound, printing the areas before terminating. Here is an example run: == This program approximates the area under f(x) ***2 - 2x + 3 given two bounds Input the left bound: -1 Input the right bound: 2 The approximate area under f (x) from -1.0 to 2.0 is: Rectangle: 18.0 Trapezoid: 13.5 Given both bounds and the corresponding heights, the area of a trapezoid is (h1 + h2) Area trap (bound R-boundL) x 2
Expert Answer:
Related Book For
Posted Date:
Students also viewed these operating system questions
-
Microkernel operating systems aim to address perceived modularity and reliability issues in traditional "monolithic" operating systems. (i) Describe the typical architecture of a microkernel...
-
Examine the following program: class Exercise1 { public static void main (String[] args ) { int[] val = {0, 1, 2, 3}; sum = System.out.println( "Sum of all numbers = " + sum ); } } Complete the...
-
Can someone please help me with sections d, e, and f? Black and Shannon trave decided to fom a partnership. They have agreed that Black is to invest \( \$ 243,000 \) and that 5 hannon is to invest...
-
a. Hoyle Corporation has issued 100,000 shares of $5 par value common stock. It was authorized 500,000 shares. The paid-in capital in excess of par value on the common stock is $263,000. The...
-
Knotsberry Manufacturing, Inc. manufactures cooling and heating coils for several different industries. It has two plants, Jewett City Plant (JCP) is an older, labor intensive machine shop where...
-
Zappos.com is a popular website known mainly for its discounted shoe sales. In 2012, a hacker hacked into the Zappos website in an effort to obtain the personal account information of Zappos...
-
The Raab Company is expanding its production facilities to include a new product line, a sporty automotive tire rim. Tire rims can now be produced with little labor cost using new computerized...
-
Complete a detailed Income Statement using the information from the Trial Balance. Make sure to list out all accounts you use to complete the Income Statement. TRIAL BALANCE AS OF DECEMBER 31, 20XX...
-
For the circuit of Figure P2.39, determine the transform of the output voltage V0(s). Assume that the circuit is in steady state when t Figure P2.39 Model of an electronic circuit. IF 2 H Ion 2 4
-
Use Chebyshev's inequality to find the number of times we need to flip an unbiased coin to be able to assert with a probability of at most 0.01 that the proportion of tails will be at most 0.04.
-
Cokie Robertson was arrested and charged with possession and trafficking of cocaine after a warrantless search of her house that was nevertheless supported by credible eye-witness evidence provided...
-
A project's initial investment is $220,000;variable cost per unit is $75; annual fixed cost is $32,000; price per unit is $95; 5 years of economic life; required return is 10%; straight line...
-
: What is the effect of the SEC's expansion of the definition of an "accredited investor"? 1. Busch v. Carpenter , 827 F.2d 653 (10th Cir. 1987) 2. SEC v. Ralston Purina Co . , 346 U.S. 119 (1953) 3....
-
In his article, Cliford F Lynch discussed several factors that influence the decision to outsource--they include personal productivity, flexibility, labor considerations, specialized services,...
-
1. What makes a contract "legally enforceable" is that the non-breaching party may use the court system to recover for damages received or to pursue another remedy. 2. Advertisements for the sale of...
-
Make a presentation on Ethics in which also discuss the ethical theories.
-
In the series connection below, what are the respective power consumptions of R, R2, and R3? R R www 4 V=6V P1-3 W; P2=3W; and P3= 3 W OP10.5 W; P2-1 W; and P3= 1.5 W P1=1.5 W; P2=1 W; and P3= 0.5 W...
-
The gas-phase isomerization A B is to be carried out in a flow reactor. Experiments were carried out at a volumetric flow rate of 0 = 2 dm 3 /min in a reactor that had the following RTD E(t) = 10 e...
-
The gas-phase reaction 12N2+32H2NH3 is to be carried out isothermally first in a flow reactor. The molar feed is 50% H 2 and 50% N 2 , at a pressure of 16.4 atm and at a temperature of 227C. a....
-
Make a list of at least four things you learned from this section. (a) Were any or all of the things discussed in the Safety Analysis of the Incident and BowTie Diagram in place when the reactor...
-
Case 1: Noncallable, Nonconvertible, Perpetual Preferred Shares The following facts concerning the Union Electric Company 4.75 percent perpetual preferred shares (CUSIP identifier: 906548821) are as...
-
1. An analyst is estimating the intrinsic value of a new company. The analyst has one year of financial statements for the company and has calculated the average values of a variety of price...
-
In asset-based valuation models, the intrinsic value of a common share of stock is based on the: A. Estimated market value of the companys assets. B. Estimated market value of the companys assets...
Study smarter with the SolutionInn App