I need to make a program that calculates the average rate of change of a function.
And my struggle is how to deal with the function input.
I need my program be able to understand a function and replace x per values.
Example:
Write the function:
input: f(x) = x^3 - 9x
Write the x value:
input: 9
I need the program, to automatic replace the function values with the x value, i mean like this:
f(9) = 9^3 - 9x9
I was thinking code this in java, but i have no required language, can be any one.