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
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
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.
Re: Method that calculates the derivative of a function?
Or you could use a TI-89 :P
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.
Re: Method that calculates the derivative of a function?
Look at:
System.Math.Calculus namespace.
Re: Method that calculates the derivative of a function?
Quote:
Originally Posted by DeepT
Look at:
System.Math.Calculus namespace.
You are kidding, right? :p