+ Reply to Thread
Results 1 to 5 of 5

Derivative of a function

  1. #1
    Registered User
    Join Date
    11-27-2009
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    6

    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.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    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.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-27-2009
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    6

    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.
    Last edited by krusader23; 12-03-2009 at 07:54 AM.

  4. #4
    Registered User
    Join Date
    03-14-2013
    Location
    Chattanooga, Tn
    MS-Off Ver
    Excel 2007
    Posts
    14

    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.
    Make sure to Star Me if I have helped.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Derivative of a function

    mrsmirf,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1