I want to numerically evaluate the function $f:\mathbb{R} \rightarrow \mathbb{R}$ given by
$$ \begin{align} f(x) &= \frac{d}{d x} g(x) \\ g(x) &= \int_a^b h(x,y)dy \end{align} $$
with $a,b \in \mathbb{R}$ and $h:\mathbb{R}^2 \rightarrow \mathbb{R}$ some continous function.
What would be an efficient way to approach this? I know I can use some kind of ode-solver to numerically evaluate a definite integral of a single variable, but how to deal with the derivative and the second variable?
Substituting the second equation into the first, $$f(x)=\frac{d}{dx}\int_a^b h(x,y)dy$$ And by the Leibniz Integral rule, $$f(x)=\int_a^b\frac{\partial }{\partial x}h(x,y)dy$$ So if you were trying to evaluate $f(x_0)$, then $$f(x_0)=\int_a^b\frac{\partial }{\partial x}h(x,y)\bigg|_{x=x_0} dy$$ $$f(x_0)=\int_a^b h^{*}(y)dy$$ Which is of course just a constant. Is this the sort of answer you wanted? Tell me what I can do to better answer your question.