Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

So this is what I have so far, Â and it all runs and compiles fine. The only th

ID: 3535692 • Letter: S

Question

So this is what I have so far, Â and it all runs and

compiles fine. The only thing I'm having trouble on is on the last

lines of how to calculate the integral of the rectangle and

trapezoid method. Code and how it works would be much

appreciated.


1 #include <iostream>

2 #include <cmath>

3

4 using namespace std;

5 using std::cin;

6 using std::cout;

7 using std::endl;

8

9 double func_1(double);

10 double func_2(double);

11 double func_3(double);

12 double func_4(double);

13 double func_5(double);

14 double rect_integral(double a, double b, int n, int choice);

15 double trap_integral(double a, double b, int n, int choice);

16

17 const char * funcname[6] = {

18 " ",

19 "2x^5 + x^3 - 10x +2",

20 "6x^2 - x +10",

21 "5x + 3",

22 "2x^3 + 120",

23 "2x^2" };

Explanation / Answer

#include #include using std::endl; using std::cout; using std::cin; double rect_integral(double a, double b, int n, int f) { } double trap_integral(double a, double b, int n, int f) { } int main(){ int n; int t; double a; double b; double z; z=((b-a)/n); int inc; int sum_type; int f; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote