Skip to main content
2 of 5
edited title
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

How to integrate a function which is only known at discrete points

I have an integration to do. I want to integrate.

$\int_0^\infty sin^2(2\pi t)f(t)dt$

where $f(t)$ takes values from an array in the form $\{t,f(t)\}$

The time steps in the array is 1.1s. Can you please suggest a method to do this? I tried using the Trapezoidal method for numerical integration but gave a bad approximation. Is there an easy method with inbuilt function or another method?

jason
  • 275
  • 1
  • 8