I need to compute repeatedly a function that depends on an integral. The integral is not solvable analytically, but it depends on the argument of the function parametrically, like this:
$$ f(x) = \int_0^1g(x, u)du $$
The function $g(x,u)$ is of known and fixed analytical shape, infinitely differentiable. My question is, is there any specialised algorithm that I can use to optimise this integral as much as possible, exploiting what I know of the function? I tried to see if it could be expressed as a Chebyshev series but no luck.