Compute for the area under the curve using integral calculus and trapezoid method. The area beneath the curve of the equation, f(x) = x+3x²,x=0 to 00 is shown below. 22332222° 2 60 50 40 30 10 To solve the area using integral, the equation is as follows: *x+3x² dx +³+d To solve the approximate area using trapezoid method, the equation is as follows: [+] Where, is the upper limit is the lower limit. is the number or trapezoids or parts (more trapezoids will increase the accuracy). The equation to compute for the average length of a trapezoid: [f(x) + f(x+1) The equation to compute for the width of the trapezoid: 19 Therefore, proving this equation was derived from the area of the trapezoid: A=a+bh

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Compute for the area under the curve using integral calculus and trapezoid method.

The area beneath the curve of the equation,  is shown below.

 

Write the C++ program that will compute for the area under the curve of the equation,

f(x)=3x+x^2

Write the C++ program that will compute for the area under the curve of the equation,
f(x) = 3x + x²
Input:
The lower limita.
The upper limit b.
The number of trapezoids.
Compute for the area using trapezoids:
Declare an array whose size will be equal to the number of trapezoids.
Use a looping structure.
Pass arguments to a module that will compute for the area of the trapezoid and return the area
back to the calling method.
Each element in the array will be assigned the returned area for every trapezoid.
Use an accumulator to compound the sum of each element in the array.
Compute for the area using integral:
Pass arguments to a module that will compute for the area under the curve and return the area
back to the calling method.
Assign the returned area to a variable.
Output:
The area of each trapezoid.
The area using the trapezoid method.
The area using integral calculus.
Percentage error (absolute).
%Error =
CINDOWS.
Enter the value for a
Use the screenshot below to guide you in completing the rest your logic.
number of trapezoids:
True value Experimental value
True value
units squared
sred
units sed
united.
units squared.
units sed
» using trapezoid a
using integral calculus
squared.
-x100
uits squared.
When you are ready to submit your work, use your own values for a, b, and the number of trapezoids.
Please use realistic numbers to get a realistic result.
Called a module and passed arguments to compute for the area of the trapezoid. The module
returned the area back to the calling method.
Called a module and passed arguments to compute for the area under the curve using integral. The
module returned the area back to the calling method.
Array size must be equal to the number of trapezoids.
Used an accumulator variable to compound the areas stored in each array element.
All answers are in 4 decimal places.
2
Transcribed Image Text:Write the C++ program that will compute for the area under the curve of the equation, f(x) = 3x + x² Input: The lower limita. The upper limit b. The number of trapezoids. Compute for the area using trapezoids: Declare an array whose size will be equal to the number of trapezoids. Use a looping structure. Pass arguments to a module that will compute for the area of the trapezoid and return the area back to the calling method. Each element in the array will be assigned the returned area for every trapezoid. Use an accumulator to compound the sum of each element in the array. Compute for the area using integral: Pass arguments to a module that will compute for the area under the curve and return the area back to the calling method. Assign the returned area to a variable. Output: The area of each trapezoid. The area using the trapezoid method. The area using integral calculus. Percentage error (absolute). %Error = CINDOWS. Enter the value for a Use the screenshot below to guide you in completing the rest your logic. number of trapezoids: True value Experimental value True value units squared sred units sed united. units squared. units sed » using trapezoid a using integral calculus squared. -x100 uits squared. When you are ready to submit your work, use your own values for a, b, and the number of trapezoids. Please use realistic numbers to get a realistic result. Called a module and passed arguments to compute for the area of the trapezoid. The module returned the area back to the calling method. Called a module and passed arguments to compute for the area under the curve using integral. The module returned the area back to the calling method. Array size must be equal to the number of trapezoids. Used an accumulator variable to compound the areas stored in each array element. All answers are in 4 decimal places. 2
Compute for the area under the curve using integral calculus and trapezoid method.
The area beneath the curve of the equation, f(x) = x+3x²,x=0 to 00 is shown below.
22283 2222° 9
90
80
70
60
50
40
30
20
10
-10 1
To solve the area using integral, the equation is as follows:
*x+3x² dx
00
+³5+q
To solve the approximate area using trapezoid method, the equation is as follows:
[+]
Where,
bis the upper limit.
a is the lower limit.
is the number or trapezoids or parts (more trapezoids will increase the accuracy).
The equation to compute for the average length of a trapezoid:
[f(x₁) + f(x+1)]
The equation to compute for the width of the trapezoid:
P
Therefore, proving this equation was derived from the area of the trapezoid:
a+b
=
·h
Transcribed Image Text:Compute for the area under the curve using integral calculus and trapezoid method. The area beneath the curve of the equation, f(x) = x+3x²,x=0 to 00 is shown below. 22283 2222° 9 90 80 70 60 50 40 30 20 10 -10 1 To solve the area using integral, the equation is as follows: *x+3x² dx 00 +³5+q To solve the approximate area using trapezoid method, the equation is as follows: [+] Where, bis the upper limit. a is the lower limit. is the number or trapezoids or parts (more trapezoids will increase the accuracy). The equation to compute for the average length of a trapezoid: [f(x₁) + f(x+1)] The equation to compute for the width of the trapezoid: P Therefore, proving this equation was derived from the area of the trapezoid: a+b = ·h
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education