Integration and Differentiation

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.
think in the factorial way

for eg x^2 then integrating that will give x^3/3 . I will also try too.
@ghosh how bout Cos,tan,sin,sinh,cosh et al
¿symbolic or numeric?
Functions like Cos(x) or tan(y) etc
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").
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.

--sigh--
For the calculation of the integration look


http://www.cpluscode.blogspot.com/p/integration.html
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.