I'm wondering if anyone know how to write a program to solve a simple integral when input a number of subintervals. this program can be written with any language, C++, java, fortran, C, etc...(adsbygoogle = window.adsbygoogle || []).push({});

this is an obvious integral to solve, but i have no idea how to write a program for it. the answer is pi, but how to write a program to get this answer when entered a subinterval of 400,000,000?

[tex]\int^{1}_{0}[/tex] [tex]\frac{4}{1 + x^{2}}[/tex]dx

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# A program to solve an integral

**Physics Forums | Science Articles, Homework Help, Discussion**