Saw this thread today: http://www.daniweb.com/software-development/csharp/threads/448676/derivative-integrals
You may download the (free) source code from here http://xrjunque.nom.es/precis/swdownload.aspx
Need to say it's all vb.net, but you can easily have a .dll (all the 'machinery' is inside a folder: just complile as a .Net's .dll).
Then, to derivate say 'cos(x)':
dim strToDerivate as string = "Dx(cos(x))"
dim m8 as matrixParser = Mates8.matrixParser.parse(strToDerivate, "", Nothing)
Label1.text = Mates8.m8.ret.toStringRetVal ' retrive & show the result:
dim strToIntegrate as string = "∫(cos(x))dx" ' also "integral(cos(x))dx" does work
m8 = Mates8.matrixParser.parse(strToIntegrate, "", Nothing)
Label2.text = m8.ret.toStringRetVal