Question: Please use the programming language of C, using the compiler of Dev C++ (Not necessary). In your Calculus course you will learn that the function

Please use the programming language of C, using the compiler of Dev C++ (Not necessary).

In your Calculus course you will learn that the function ln(1 + x) can be approximated by a polynomial of degree n as follows: ln(1 + x) x 1 2 x2 + 1 3 x3 1 4 x4 + 1 5 x5 + + (1)(n+1)xn/n This is called a power series approximation. Write a program, powerseries.c, to check the accuracy of this formula. Your program must prompt the user for the value of x (where |x| < 1) and the degree, n, of the polynomial to use. Your program should then write the values of x, n, the approximation, the actual value and the percent relative error to the output file powerseriesout.txt. For marking purposes use x = 0.9 and n = 40. Here is a sample input and output: x = 0.900000 n = 5 approximate value = 0.692073 actual value = 0.641854 relative error = 7.824064 percent

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!