Is it possible to define a function in stan that returns a parametrized integral? For example, an integrand parametrized by t_i,

As far as I understand this is not possible, since the integrand has a strict definition

```
real integrand(real x, real xc, real[] theta,real[] x_r, int[] x_i)
```

that does not accept parametrized functions. Or the parametrization of the integrand should be fixed and dependent only on `x_r`

and `x_i`

.

My questions are:

- Is my understanding correct?
- Is there a workaround? I guess one workaround is to solve the integral using an ode solver.
- Is there a particular reason the integrand has a strict definition? Since in the definition of the ode systems the user is free to pass any parameters.

Thank you for your time and your assistance.