CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2006
    Posts
    132

    Method that calculates the derivative of a function?

    I don't know a whole lot of C#, but I would like to learn more. I'm a Computer Science student with some experience in C++, Java, VB.net and some other languages. I'm taking Calc 1 and we are going over Newton's Method for find zeros of a function. I would like to write a program that will use Newton's Method to find the zero of an inputted funtion. I would like to have a nice GUI, so I picked C#, plus I want to write the program to gain some experience in C#. It would make my job a lot eaiser if there is some pre-built function that calculates the derivative of a function. If not, some sample code with an algorithm would be the next best thing.

    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Method that calculates the derivative of a function?

    If you search for it, you can find it. Only took a few seconds:

    http://www.codeproject.com/KB/recipe...ntialEqns.aspx
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Feb 2006
    Posts
    132

    Re: Method that calculates the derivative of a function?

    I did a lot of searching, but apparently I did not use the right keywords.

    Thanks.

  4. #4
    Join Date
    Nov 2006
    Posts
    146

    Re: Method that calculates the derivative of a function?

    Or you could use a TI-89 :P
    If this post helps you out, please rate it!

  5. #5
    Join Date
    Feb 2006
    Posts
    132

    Re: Method that calculates the derivative of a function?

    Quote Originally Posted by messycan
    Or you could use a TI-89 :P
    yep.. got one of those Too bad I can't use them on exams

    I'm doing this for fun and to learn C# better. I might try to write my own function to find a derivative. That maybe hard though. I like a challenge though. I hate doing math, but when I use it in a computer program, it's fun.

  6. #6
    Join Date
    Sep 2004
    Posts
    1,361

    Thumbs up Re: Method that calculates the derivative of a function?

    Look at:

    System.Math.Calculus namespace.

  7. #7
    Join Date
    Nov 2006
    Posts
    146

    Re: Method that calculates the derivative of a function?

    Quote Originally Posted by DeepT
    Look at:

    System.Math.Calculus namespace.
    You are kidding, right?
    If this post helps you out, please rate it!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured