Develop a C-Code that numerically integrates the following function using TRAPEZOIDAL RULE

e^7x*cos(0.3πx), ∈[-5,0]
f(x)=
x^(3)-0.23x+30.67, ∈[0,5]

^^^^^F(x) is composed of those two functions with the union.

Using N of different values, where N is the number of steps or intervals. Print out all xi fi =f(xi) and final result. C code must contain following features: use of arrays, use of pointers, use of structure, use of union, use of functions and function calls, formatted output on screen.

Can someone do this i have no idea where to start please and thanks
Last edited on
1
2
int main(int argc, char *argv[]) {
}


what are you confused on? we arent here to do your homework.
I dont know how to do it with pointers
I know nothing of your instructor, but it may be simply to use a pointer as argument to a function in order to access your array -- an array used to store each slice calculated by the trapezoidal rule.

It says "use of structure" and not "use of structures", I hope?
Topic archived. No new replies allowed.