0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Could you clarify what you mean by "optimising this integral"? $\endgroup$ – smh Jun 24 at 17:11
  • $\begingroup$ What do you know about the dependence of $g$ on $x$? Could you do a Taylor expension of $f$ around some $x$ by doing a Taylor expansion of $g$ around some $x$ for every $u$? $\endgroup$ – Wolfgang Bangerth Jun 24 at 18:53
  • $\begingroup$ Are you trying to differentiate $f(x)$ with respect to $x$? Could you differentiate $g(x,u)$ with respect to $x$ inside the integral? $\endgroup$ – Brian Borchers Jun 24 at 21:41
  • $\begingroup$ @smh I want to make it as fast as possible to compute exploiting the fact that I know the integrand. Basically, I'd like a specialised algorithm rather than a general-purpose one like your typical quadrature. $\endgroup$ – Okarin Jun 25 at 9:30
  • $\begingroup$ @WolfgangBangerth everything, I know the exact function, though it's rather complicated to write. But I'm not sure a Taylor expansion is any good as I need to cover a large range of $x$. I can expand in $u$ and thus define the integral as a sum of polynomial integrals on each small $du$, though. That's my first idea. $\endgroup$ – Okarin Jun 25 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.