Question
Need this code done in c language WITH THE FOLLOWING OUTPUT Enter the value of x:0.5 The number 0f terms:10 True value = - 0.693147
Need this code done in c language
WITH THE FOLLOWING OUTPUT
Enter the value of x:0.5
The number 0f terms:10
True value = - 0.693147
Taylor value = - 0.692967
Absolute error=0.000180
Relative error = - 0.025966
Enter the value of x:1.5
The number 0f terms:10
True value = 0.405465
Taylor value = 0.405532
Absolute error =0.000067
Relative error =0.016573
Enter the value of x:2.0
The number 0f terms:10
True value = 0.693147
Taylor value = 0.745635
Absolute error =0.052488
Relative error =7.572380
Enter the value of x:3.3
The number 0f terms:10
True value = 1.193922
Taylor value = 135.794385
Absolute error =134.600462
Relative error =11273.802614
The Taylor series expansion of f(x) = ln x around C is given as: Inx = (-1)-3 (* * " In x = n=1 Part A: Write a C\C++ program which takes x as input and computes the series for up to 10 terms. Your program should print the final value of f(x) = In x obtained along with the absolute and relative errors. Your program needs to get the true value of f(x) = ln x using the built-in function in C. Part B: Run your program for x = 0.5, 1.5, 2.0, and 3.3. Report the results you get for each one. How accurate are your results? Part C: Run your program for the same value of x as in part B but change the number of terms to be 100. Report the results you get for each one. How accurate are your resultsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started