TITLE: Differentiating a definite integral w.r.t. a parameter
QUESTION [0 upvotes]: $$Q=\int_0^{\infty}qf(q) \:dq$$
But $q=ax$, where $a$ is a constant; and I want to know how $Q$ varies with the parameter $a$. That is, I want a useful expression for $\frac{\partial Q}{\partial a}$.
I proceed to factor out the $a$ where I can.
$$Q=a \int_0^{\infty}xf(ax) \:dq$$
(I have a density function in mind for $f(q)$--possibly the lognormal density--so generally $a$ cannot be factored out of $f(ax)$.)
Proceeding with the derivative of $Q$...
$$\frac{\partial Q}{\partial a}=\frac{Q}{a}+a\frac{\partial}{\partial a}   \int_0^{\infty}xf(q)\:dq$$
Now the meat of the matter: How to handle the derivative in the second term on the RHS? This is what I've tried..
$$\frac{\partial}{\partial a}   \int_0^{\infty}xf(q)\:dq=   \int_0^{\infty}\frac{\partial (xf(q))}{\partial a}\:dq$$
(Where I assume all the good stuff necessary to bring the differentiation operation under the integral sign.)
$$=   \int_0^{\infty}x\frac{\partial f(q)}{\partial a}\:dq = \int_0^{\infty}x\frac{d f}{d q}\frac{\partial q}{\partial a}\:dq$$
$$=   \int_0^{\infty}x^2\frac{d f}{d q}\:dq = \int_0^{\infty}x^2\:df$$
So (if I haven't made some mistake in these steps), the question is reduced to how to evaluate
$$\int_0^{\infty}x^2\:df$$
(Or I guess alternatively how to evaluate $fx^2-\int_0^{\infty}f\:d(x^2)$)
?

REPLY [0 votes]: I don't know whether I understand clearly what are you up to, but it seems to me that your integral is constant for $a > 0$.
First of all, we have, according to your definition ($a > 0$):
$$\int \limits_0^\infty a x \, f (a x) \, \mathrm{d} (a x)$$
so after substitution x = q/a for a > 0 we get
$$\int \limits_0^\infty q \, f (q) \, \mathrm{d} q$$
If you want to use approach via $Q^\prime (a)$:
$$\begin{aligned}
Q(a) &= \int \limits_0^\infty a x \, f (a x) \, \mathrm{d} (a x) = a^2 \int \limits_0^\infty x \, f (a x) \, \mathrm{d} x \\
Q^\prime (a) &= 2 a \int \limits_0^\infty x \, f (a x) \, \mathrm{d} x + a^2 \frac{\mathrm{d}}{\mathrm{d} a} \int \limits_0^\infty x \, f (a x) \, \mathrm{d} x = \\
&= \frac{2}{a} Q (a) + a^2 \int \limits_0^\infty x \, \frac{\partial}{\partial a} f (a x) \, \mathrm{d} x = \\
&= \frac{2}{a} Q (a) + a^2 \int \limits_0^\infty x \, f^\prime (a x) \, x \, \mathrm{d} x = \\
&= \frac{2}{a} Q (a) + \frac{1}{a} \int \limits_0^\infty q^2 \, f^\prime (q) \, \mathrm{d} q = \\
&= \frac{2}{a} Q (a) + \frac{1}{a} \left[ q^2 \, f (q) \right]_0^\infty - \frac{2}{a} \int \limits_0^\infty q \, f (q) \, \mathrm{d} q = \\
&= \frac{1}{a} \left[ q^2 \, f (q) \right]_0^\infty
\end{aligned}$$
This should be zero, because: for your original integral $Q(a)$ to have finite value, function $f$ must go to zero faster than $1/q^2$ for $q \to \infty$ and it shouldn't blow up to $\infty$ at $q \to 0^+$ faster than $1/q^2$. But that means that both limits $q^2 f(q)$ when $q \to \infty$ and $q \to 0^+$ are zero.
     (*)
Thus $Q^\prime (a) = 0$. But the real reason the $Q$ is a constant is that the original integral
$$ \int \limits_0^\infty q \, f(q) \, \mathrm{d} q$$
is really just a constant. You don't see '$a$' anywhere in it (neither inside the integral, nor in the bounds). From the other side, in the integral
$$\int \limits_0^\infty a x \, f (a x) \, \mathrm{d} (a x)$$
we can make a substitution for $a > 0$ for $q$: $q = x/a$ and again, you get an integral which does not depend on anything, it's just a number:
$$\int \limits_0^\infty a x \, f (a x) \, \mathrm{d} (a x) = \int \limits_0^\infty q \, f(q) \, \mathrm{d} q $$
Let me know if this makes sense to you...
(*) actually this is true only if $f(q)$ is really some kind of a density function, i.e. it's positive (or zero). There are functions like $\sin (x^3)$, that are really strange: $\int_0^\infty x \sin (x^3) \, \mathrm{d} x$ exists, but the limit $x^2 \sin (x^3)$ for $x \to \infty$ does not.
{"set_name": "stack_exchange", "score": 0, "question_id": 2191003}