Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ problem Program Specifications 1. Write three functions: a. a function fn to integrate over. Let's use fn-) -6x2 + 5x+3 fn takes a single
C++ problem
Program Specifications 1. Write three functions: a. a function fn to integrate over. Let's use fn-) -6x2 + 5x+3 fn takes a single double parameter, the value x fn returns a double, the result of the function evaluation i. ii. b. a function integral, the actual integral of fn which is integral> 2 integral takes a single double parameter, x integral returns a double, the result of the function i. ii. let's further fix the interval to calculate the integral over as 0 to 1 P(x) =-6x"2 + 5x + 3 c. a function trapezoid. The specification for trapezoid is: i. take in three parameters: 1. the two definite points of the integral a and b as doubles 2. the number n, the number of trapezoids, a long ii. calculates the area under the curve represented by the function fn given the provided number of trapezoids over the interval 0 to 1. iii. returns a double, the sum of the area of the trapezoidsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started