[Haskell-beginners] Antiderivative (indefinite integral)?

Miguel Negrao miguel.negrao-lists at friendlyvirus.org
Sat Jan 19 21:25:28 CET 2013


A 19/01/2013, às 18:55, Martin Drautzburg escreveu:

> Hello all,
> 
> not strictly a Haskell question, but anyways ...
> 
> is it possible to compute the antiderivative of a function f::Int->Int ? 
> 
> I understand that you can compute the definite integral by simply summing up 
> the values of f within a given interval.
> 
> My first guess would be: no this is not possible. The antiderivative F of a 
> function f::Int->Int needs to have the property that F(b) - F(a) must be the 
> sum of f within [a,b]. To do this I must know all values withib [a,b]. But at 
> the time I compute the antiderivative I do not know this interval yet.
> 
> What is striking me is that in calculus I can often symbolically compute the 
> antiderivative and I get a simple function, and I can get the value of F for a 
> given x and I get a simple number. Why is that so?


	That’s due to the http://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus together with rules for certain functions that allow you to symbolically get your antiderivative. Off course, those tricks don’t work for all functions, there are functions which are know to have an antiderivative but which cannot be given an analytical expression.  
	If you implement the rules I mentioned in haskel then you can get the the antiderivative by substitution for a subset of functions which also have to be encoded symbolically. 

best,
Miguel


More information about the Beginners mailing list