Simple Plotting of a function is to display its values within an interval [a, b] using simple symbols. For example, plotting
f(x) =ax3+bx2+cx + d
in the interval [x1, x2] is to display the points:
(x1, f(x1)), (x1+dx, f(x1+dx)), …, (x2, f(x2))
on the screen. dx is an increment used to have enough values between x1 and x2.
The menu consists of the following options:
- Read a third-degree function.
- Plot the function in [x1,x2].
- Plot the derivative of the function in [x1,x2].
- Plot the function and its derivative in [x1,x2].
- Find the maximum of the function in [x1,x2]
- Find the minimum of the function in [x1,x2]
- Quit.
You should apply modular programming, with a separate function for each major task in your program.