Help for, how to write fortran codes for numerical integration

Can anyone suggest, how to write fortran codes for numerical integration which having limit from -infinity to +infinity ?

Welcome to the forum! Such integration problems are often handled by transforming the integrand, so that finite bounds result. So, that part is mostly a bit of mathematics. You should check out quadpack for routines that do the actual numerical integration.

1 Like

Is your question related, to some type of homework you have been tasked at school or university?

One method is Gauss–Hermite quadrature, also DLMF 3.5.28.

Welcome to the forum. For your problem see qagi.f90 of Alan Miller, adapted from the QUADPACK library others have mentioned. His site is the first place I go to when looking for numerical codes. You can also get a modernized QUADPACK from GitHub - jacobwilliams/quadpack: Modern Fortran QUADPACK Library for 1D numerical quadrature.