How to write a function which include integral sign inside the function

The question is on what these integrals depend. If they depend on endogenous variables so that derivatives are required, then you may have to go for an external function. See e.g. Integration in Dynare 4