Alvaro:
Yes, your text only version was too complicated to decipher
intelligently so I ran it through LaTex (Scientific Word actually). I
suggest sending a pdf file instead. What you have is an application of
Leibniz's rule. In the more general case where f(t) -> f(x,t), there
will be another term which you did not include. See (possibly advanced)
calculus books for a discussion.
It appears as if you are differentiating integrals of products of shape
functions for use in a finite element code. While I do not have an
explicit solution for your problem, I suggest you take one of the
integrals inside the summation, write it out in excruciating detail, and
then try to differentiate it. The equations you included have too much
symbolism for a solution to jump out at you.
Professor Dominique Pelletier of the University of Montreal in Canada
(and many others) has published extensively on grid adaptive methods and
I suspect some of his publications will show you how to do your
differentiation.
Good luck.
Ben Blackwell
Blackwell Engineering
PO Box 2879
822 Camino de Lucia
Corrales, NM 87048
505/897-5090
-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]] On Behalf
Of Alvaro Fernandez
Sent: Tuesday, February 03, 2004 8: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
|