I looked through five books on real analysis and vector calculus, and only
found it in an elementary calculus book, Calculus with Analytic Geometry, by
George F. Simmons, and that in the problems section :-|
$\frac{d}{dx} \int_u^v f(x,y) dy = -f(x,u) \frac{du}{dx} + f(x,v)
\frac{dv}{dx} + \int_u^v \partial_x f(x,y) dy$
No wonder I didn't remember it... You would think it would be more widely
presented. This may work, although it will be partial derivatives in my
case; the bounds depend on all the $p$ vectors, and I am only taking the
derivative with respect to the $ith$.
Thanks to everyone for their input. Sometimes a little math is good for the
soul. Easy to forget your roots when you're always programming... :-) I'll
keep you posted if this works.
Alvaro
-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of
Harry R Millwater
Sent: Tuesday, February 03, 2004 11:02 AM
To: [log in to unmask]
Subject: Re: My math problem (was: Somewhat OT)
Taking the derivative of an integral with repect to parameter p with bounds
that depend on the p requires Liebnitz's rule found in calculus books.
Basically one takes the derivative inside the integral and differentiates
the arguement but than adds the integrand times the derivative of the upper
bound with p minus the derivative of the lower bound with p.
-----Original Message-----
From: Alvaro Fernandez [mailto:[log in to unmask]]
Sent: Tuesday, February 03, 2004 9:14 AM
To: [log in to unmask]
Subject: My math problem (was: Somewhat OT)
OK, here goes. For the benefit of those who have plain text mail readers, I
will use a LaTex kind of notation for the math. I hope it's not too
cumbersome to decode.
I am debugging an algorithm I wrote for an adaptive meshless method. My
question is related to how to take the derivative of an integral with
variable bounds.
Ordinarily, if the integral looks like $\frac{d}{dx} \int_{u_1(x)}^{u_2(x)}
f(t) dt$ then the result is $f(u_2(x)) \grad u_2 - f(u_1(x))\grad u_1$. So
this is the case if the bounds are functions of the integration variable.
My case is more complicated; I have partial derivatives. Specifically, I
have an integral that looks something like this:
$I =
\sum_{j=1}^{i-1}
\int_{a_j(p_j)}^{b_j(p_j)}\phi_j(x,p_j)\phi_i(x,\vec{p_i})dx +
\int_{a_i(p_i)}^{b_i(p_i)}\phi_i(x,p_i)\phi_i(x,\vec{p_i})dx $ where the
$p_j$ are vectors of parameters for the basis functions $\Phi_j$. The
variable $x$ is a spatial variable, 1, 2, or 3-D. So in this case, the
bounds are functions of indexed parameter vectors $p_i$ as well as of the
integration variable.
Now, the point is I want to take the grad of $I$ with respect to the
specific parameter vector $\vec{p}_i$ (the other vectors
$p_j,~,j=1,2,\ldots,p_{i-1}$ are held constant).
How should I proceed? The more I look at it, the more it looks like I can't
really do this without more information.
One added wrinkle - the functions $a$ and $b$ use things like maxval(),
whose derivative is a little complicated; so taking the partial derivatives
of the bounds is not that straightforward.
My apologies if this appears disjointed, but this is as much as I can
simplify without possibly over-simplifying.
Alvaro Fernandez
|