Question: 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 trapezoids
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
