# Derivative and Parameterisation of a Contour Integral

• I
Gold Member
As part of the work I'm doing, I'm evaluating a contour integral:
$$\Omega \equiv \oint_{\Omega} \mathbf{f}(\mathbf{s}) \cdot \mathrm{d}\mathbf{s}$$
along the border of a region on a surface ##\mathbf{s}(u,v)##, where ##u,v## are local curvilinear coordinates, and where the surface itself is part of a family of surfaces ##\mathbf{s}(u,v,q)##, with ##q## being a continuous parameter.

The border ##\mathbf{s}## is actually the set of solutions to an equation (which I won't bother to specify, but you can take for granted has solutions of the required form) in ##\mathbf{s}(u,v)## (at each ##q## held constant). ##\mathbf{f}(\mathbf{s})## is shorthand for a more complex expression which depends entirely on ##\mathbf{s}## and other unstated constants (i.e. it doesn't depend on ##u,v,q## other than through ##\mathbf{s}##.

In my work I do three things to this expression:
1. I explicitly parameterise the contour integral into a definite integral in ##\lambda \in [\lambda_1, \lambda_2]##
2. I discretise the contour integral (I actually have a "trick" for my case which let's me apply it directly to the contour form)
3. I take the derivative of this w.r.t. the aforementioned ##q##
It occurred to me that I should be able to get the same result no matter the order I do them. Step 2. is only relevant if you want to numerically evaluate this for a specific set of cases, so the question is "1. then 3." or "3. then 1.".

If I parameterise then differentiate, I get the following:

\begin{align} \Omega &= \int_{\lambda_1}^{\lambda_2} \left( \mathbf{f}(\mathbf{s}) \cdot \frac{\mathrm{d}\mathbf{s}}{\mathrm{d}\lambda} \right) \mathrm{d}\lambda \\ \frac{\mathrm{d} \Omega}{\mathrm{d} q} &= \frac{\mathrm{d}}{\mathrm{d} q} \int_{\lambda_1}^{\lambda_2} \left( \mathbf{f}(\mathbf{s}) \cdot \frac{\mathrm{d}\mathbf{s}}{\mathrm{d}\lambda} \right) \mathrm{d} \lambda \\ \mathrm{(Leibniz'~rule)} &= \int_{\lambda_1}^{\lambda_2} \frac{\mathrm{d}}{\mathrm{d} q} \left( \mathbf{f}(\mathbf{s}) \cdot \frac{\mathrm{d}\mathbf{s}}{\mathrm{d}\lambda} \right) \mathrm{d} \lambda \\ \mathrm{(Product~rule)}&\Rightarrow \int_{\lambda_1}^{\lambda_2} \left( \frac{\mathrm{d} \mathbf{f}}{\mathrm{d} q}\cdot\frac{\mathrm{d}\mathbf{s}}{\mathrm{d}\lambda} + \mathbf{f}\frac{\mathrm{d}}{\mathrm{d} q} \cdot \frac{\mathrm{d} \mathbf{s}}{\mathrm{d} \lambda}\right) \mathrm{d} \lambda \\ \mathrm{(Integration~by~parts)} &\Rightarrow \int_{\lambda_1}^{\lambda_2}\left(\frac{\mathrm{d} \mathbf{f}}{\mathrm{d} q}\cdot\frac{\mathrm{d}\mathbf{s}}{\mathrm{d}\lambda}\right)\mathrm{d}\lambda + \left[ \mathbf{f} \frac{\mathrm{d}\mathbf{s}}{\mathrm{d}q}\right]_{\lambda_1}^{\lambda_2} - \int_{\lambda_1}^{\lambda_2} \left( \frac{\mathrm{d}\mathbf{s}}{\mathrm{d} q} \cdot \frac{\mathrm{d}\mathbf{f}}{\mathrm{d} \lambda}\right) \mathrm{d}\lambda \\ \left( \mathbf{s}(\lambda_1) \equiv \mathbf{s}(\lambda_2)\right) &\Rightarrow \int_{\lambda_1}^{\lambda_2} \left( \frac{\mathrm{d} \mathbf{f}}{\mathrm{d} q}\cdot\frac{\mathrm{d}\mathbf{s}}{\mathrm{d}\lambda} - \frac{\mathrm{d}\mathbf{s}}{\mathrm{d} q} \cdot \frac{\mathrm{d} \mathbf{f}}{\mathrm{d} \lambda}\right) \mathrm{d} \lambda \end{align}
where I stop, since it seems clear that from here you need to use the actual form of ##\mathbf{f}(\mathbf{s})##.

However, if I try to differentiate then parameterise:
\begin{align} \frac{\mathrm{d} \Omega}{\mathrm{d} q} &\equiv \frac{\mathrm{d}}{\mathrm{d} q} \oint_{\Omega} \mathbf{f}(\mathbf{s}) \cdot \mathrm{d} \mathbf{s} \\ \mathrm{(Leibniz'~rule)} &= \oint_{\Omega} \frac{\mathrm{d}}{\mathrm{d} q} \left( \mathbf{f}(\mathbf{s}) \right) \cdot \mathrm{d} \mathbf{s} \end{align}
I'm straight away suspicious of whether I'm on the right track, since if I try to parameterise from here:

$$\frac{\mathrm{d} \Omega}{\mathrm{d} q} = \int_{\lambda_1}^{\lambda_2} \left( \frac{\mathrm{d} \mathbf{f}}{\mathrm{d} q} \cdot \frac{\mathrm{d} \mathbf{s}}{\mathrm{d} \lambda} \right) \mathrm{d}\lambda$$

I'm obviously missing a whole term from the alternate approach; assuming that that was right.

I'm pretty sure that in the second approach, the ##\mathrm{d}\mathbf{s}## is supposed to be affected by the ##\frac{\mathrm{d}}{\mathrm{d}q}## but I'm not sure how to write that as a valid contour integral (prior to explicit parameterisation).

To me this is only of academic importance - since I convert directly from the contour to a discretisation, and differentiate that - and I've been able to independently verify that what I'm doing is correct. However, if there's anyone who can point out the flaw in my reasoning, and/or recommend how best to express this process, I'd very much appreciate it, since it means I'd be able to make a clearer, more water-tight case for what I "actually" do, and can avoid "sloppy" justifications in the future.

Last edited: