Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the definition of a limit, the program to be written will determine the derivative of a quadratic function (form shown below) at any given

Using the definition of a limit, the program to be written will determine the derivative of a quadratic function (form shown below) at any given value of x with an accuracy of 3 decimal places using an iterative process for increasingly smaller values of delta x until the value determined for the derivative does not vary in the first 3 decimal places. The program will output to the user the equation describing the function, the value of x at which the derivative is found, the numerical value of the derivative, and the number of iterations that were required to get the necessary accuracy in decimal places.

The quadratic function the program is to deal with is: f(x) = c1x2 + c2x + c3 The user must be able to enter whatever values desired for the coefficients {c1, c2, c3} and the value for x at which the derivative is to be determined. The steps to take to find the derivative are: 

1) Store values from user for c1, c2, c3, and x. 

2) Calculate f(x) using the values from the user and retain that value in a variable (name of your choosing).

3) Start with delta x = 0.1 and a variable called test Tolerance = 0.001. 

4) Calculate f(x + delta x) using the value of x given by the user and the current value of delta x. 

5) Calculate f'(x) = (f(x + delta x) – f(x))/ delta x using the value calculated in step 2 and step 4 above and the current value of delta x. 

6) If (f'(x) – test Tolerance) < 0.001 then the value calculated for f'(x) is within three decimal places of the correct value for f'(x) and the work is done. 

7) Otherwise, set the new value for delta x to be the old value divided by 2 and set test tolerance equal to the current value of f'(x) and repeat steps 4 through 6.

Remember this is a C++ program.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Copyable Code include using namespace std int main float c1 c2 c3 x float deltax 01f floa... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Accounting

Authors: James D. Stice, Earl K. Stice, Fred Skousen

17th Edition

032459237X, 978-0324592375

More Books

Students also viewed these Accounting questions

Question

Solve the system of comparisons :

Answered: 1 week ago