# Partial derivative of an integral

I have the following function (it is the incomplete elliptic integral of first kind) $$F(b,g) = \int_{0}^{b} \frac{dx}{\sqrt{(1-x^2)(1-gx^2)}}$$ I would like to compute $$\frac{\partial F}{\partial g} \ ,\ \frac{\partial F}{\partial b} \ ,\ \frac{\partial^2 F}{\partial g^2} \ ,\ \frac{\partial^2 F}{\partial b^2} \ ,\ \frac{\partial^2 F}{\partial b\partial g}$$ so I defined

F[b_,g_]:= Integrate[1/Sqrt[(1 - x^2)*(1 - g*x^2)], {x, 0, b}]


and tried the command

D[F[b,g],g]


but Mathematica cannot compute it. Am I doing something wrong or is there a way to do it?

• Why not use EllipticF instead of an integal? E.g., F[b_, g_] := EllipticF[ArcSin[b], g]. Oct 20 '20 at 16:26
• An indirect way: try Integrate[f[x, g], {x, 0, b}] // D[#, g] & , then replace f with real func. Oct 20 '20 at 16:31
• @CarlWoll because I want to keep it as general as possible in order to modify it easily someday Oct 20 '20 at 16:36
• Derivatives relative to "b" are trivial and why not swap the derivative relative to g and the integral? Oct 20 '20 at 16:46

F[b_,g_]:= Integrate[1/Sqrt[(1 - x^2)*(1 - g*x^2)], {x, 0, b}]

$$\frac{\sin \left(2 \sin ^{-1}(b)\right)}{4 (g-1) \sqrt{1-b^2 g}}-\frac{F\left(\left.\sin ^{-1}(b)\right|g\right)}{2 g}-\frac{E\left(\left.\sin ^{-1}(b)\right|g\right)}{2 (g-1) g}$$