Integration and Differentiation

Mar 28, 2012 at 5:10am
Just a quick question to ask: Is it possible to write a program to find the integration and differentiation of a given function? Say f(x) = cos 3x + e^x;
Please if yes,how do i go about it? If no,then I'll just keep thinking.
Mar 28, 2012 at 5:51am
think in the factorial way

for eg x^2 then integrating that will give x^3/3 . I will also try too.
Mar 28, 2012 at 6:11am
@ghosh how bout Cos,tan,sin,sinh,cosh et al
Mar 28, 2012 at 8:57am
¿symbolic or numeric?
Mar 29, 2012 at 7:32am
Functions like Cos(x) or tan(y) etc
Mar 29, 2012 at 9:05am
If you know the function in advance, it's relatively easy to come up with a numerical answer.

If the user can type in whatever equation they like, it becomes harder (see "equation parsing").
Mar 29, 2012 at 9:56am
I've written a program which can differentiate an arbitrary function symbolically. Symbolic integration is way more difficult (but not impossible).
For differentation probably the most difficult part is parsing the function into someshort of syntax tree. After parsing it is a very straightforward and trivial algorithm (which will result in a very long function, that can be simplified either by hand or algorithmically to the common, shorter form).

About symbolic integration :
http://en.wikipedia.org/wiki/Symbolic_integration

Numeric integration is relatively easy.

Mar 29, 2012 at 7:49pm
--sigh--
Mar 31, 2012 at 8:09am
For the calculation of the integration look


http://www.cpluscode.blogspot.com/p/integration.html
Mar 31, 2012 at 11:21am
Yes, it is possible. Mathematika, MATLab, Derive and what else is out there can do that. I would start out with the simple ones and a "look-up-table".

Since ln(x) integrated is 1/x that one is not so difficult. Same with sin(x) or cos(x) etc. The same is for the differentiation. cos(x) is - sin(x) and so forth.
Topic archived. No new replies allowed.