Question: computer science Dev C + + f ( x ) = c o s ( x ) e x p x ( x 4 +

computer science
Dev C++
f(x)=cos(x)expx(x4+x2+1)32, and design programs for finding the derivative of f(x) and integral results of f(x) by using "Function". These functions are needed to use the iteration method. (a)(1.5) The derivative of f(x) is limh0f(x+h)-f(x-h)2h. The method of iteration is letting width h approach 0. The user could enter the x, initial width b, and iteration error to find the f(x).(b)(2.5) Using a trapezoidal method to calculate the integral result of f(x). The Integral results of f(x) is ??f(x)x, and x is sub-interval width. The method of iteration is letting the sub-interval width approach 0. The user could enter the start of interval x1, end of interval x2, and iteration error to find the integral results of f(x) between x1 and x2.
Integral of f(x)
x1x2f(x)dx~~(x2-x1i)[f(x2)+f(x1)2+k=1i-1f(x1+kx2-x1i)]=F
i is iteration number. Iteration error is difference between (i+1)th and ith of F
The output looks like
Enter the variable x
3
Enter initial width for derivative
2
Enter the iteration error for derivative
0.000001
The derivative of function at x=3 is 0.0168597
Enter the start of interval x1
2
Enter the end of interval 2
12
Enter the iteration error for integral
0.000001
The integral of function between 1 and 2 is -0.0454551
Enter the variable x
0.3
Enter initial width for derivative
3
Enter the iteration error for derivative
0.00001
The derivative of function at x=0.3 is -0.309528
Enter the start of interval 1
-5
Enter the end of interval 2
3
Enter the iteration error for integral
0.00001
The integral of function between 1 and 2 is 1.28768
 computer science Dev C++ f(x)=cos(x)expx(x4+x2+1)32, and design programs for finding the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!