mgonzalezg9 / Definite-integral

A pascal program that calculates the definite integral of a function.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Definite Integrals Calculator

A pascal program that calculates the definite integral of a function given the upper and lower limits of the integral.

Method

The method used is the Trapezoidal rule. By default it calculates the integral for the function f(x) = x². However, this method is applicable for any function just changing the function definition in the Pascal code.

Running the file

It requires to install the Free Pascal Compiler (fpc):

$ fpc aproxintegral.pas

Now we can execute the binary file

$ ./aproxintegral 

About

A pascal program that calculates the definite integral of a function.


Languages

Language:Pascal 100.0%