# Derivative of a function

1. ## Derivative of a function

Hi,
is there a way to calculate a derivative of a function?
For example I have this function in one cell: f(x)=x^2 and I want excel to automatically convert that function to the derivative (f'(x)=2x). It would also be nice, if there was a function, which could substitute a given value as "x" in the function formula and calculate the "y".

Functions like:
double derivative(char* function, char c, double value)
double calcFunction(char* function, char c, double value)

My Casio Algebra 2.0+ can calculate the derivatives in this way (using the CAS system).

Cheers.  Register To Reply

2. ## Re: Derivative of a function

You can name a cell x, enter a value, and then enter a formula that uses x, e.g., =x^2 + 2*x - 1

As to calculating derivatives -- Excel doesn't do symbolic algebra.  Register To Reply

3. ## Re: Derivative of a function

Maybe somebody know of the external (free) VBA libraries to deal with the problem?

//Edit: I found a way to do it. There is a matlab (a mathematical program) extension that lets you integrate the matlab functions with excel. (Matlab functions will work as the excel macros).
But I haven't tested it, because I haven't got the time to read through all the matlab documentation. So if someone ever tries this solution, please post your assesment on it.  Register To Reply

4. ## Re: Derivative of a function

I was recently searching for a way to to this, and then it hit me. Excel has matrix function like matrix multiplication etc. well you can find the derivative of a function by taking it in the form of a matrix and multiplying it by the derivative. for instance, a 3x1 matrix (broken into terms) from y= x^3+x^2+x would become y=3x^2+2x+1 when multiplied by [0,1,0;0,2,0;0,0,3]. This maybe one of the easiest ways excel offers. I am on the search for an easier way though. Let me know if an example is needed.  Register To Reply

5. ## Re: Derivative of a function

mrsmirf,  Register To Reply