3
$\begingroup$

I have quite a lot expressions that need to be integrated after switching the integral sign with differentiation operator. The additional problem is that the bounds are dependent to one of the variables. So I need to use:

$\int_{a(y)} ^{b(y)} {\frac{\partial f(x,y)}{\partial y}}=\frac{\partial}{\partial y} \int_{a(y)} ^{b(y)} f(x,y) dx- \frac{db}{dy}f(x=b,y)+\frac{da}{dy}f(x=a,y)$

How do I achieve this in Mathematica? For now Mathematica just writes the output

Integrate[D[f[x, y], y], {x, a[y], b[y]}]

in the symbolic form. How do I workaround this? Of course I can write my own function, but I wonder if Mathematica has some built in functionality I require.

$\endgroup$
  • 2
    $\begingroup$ Does a replacement rule work? (your expression) /. HoldPattern[Integrate[D[e_, y_], {x_,a_,b_}]]:>D[Integrate[e,{x,a,b}],y]-D[b,y](e/.x->b)+D[a,y](e/.x->a) $\endgroup$ – celtschk Sep 14 '12 at 9:26
  • $\begingroup$ Probably it does. I just wondered if there is some kind of function implementing this theorem. $\endgroup$ – Misery Sep 14 '12 at 10:01
  • 3
    $\begingroup$ I am not sure if this is relevant to your question,but Mma does use the Leibniz rule: when you evaluate D[Integrate[f[x, y], {x, a[y], b[y]}], y] you get Integrate[Derivative[0, 1][f][x, y], {x, a[y], b[y]}] - f[a[y], y]*Derivative[1][a][y] + f[b[y], y]*Derivative[1][b][y]. $\endgroup$ – kglr Sep 14 '12 at 10:41
  • $\begingroup$ Well, it looks like my doesn't :] Or better... sometimes it does tometimes it doesn't <?> Ok, now I get it, it does so only in one direction. $\endgroup$ – Misery Sep 14 '12 at 10:49
4
$\begingroup$

Try this:

g[y_] := Inactivate[Integrate][f[x, y], {x, a[y], b[y]}];

Then its derivative:

D[g[y], y]

yields

enter image description here

Let us now make an equation:

    eq = Inactivate[D[Integrate[f[x, y], {x, a[y], b[y]}], y], 
   D | Integrate] == D[g[y], y]

enter image description here

and solve it with respect to the integral in question:

enter image description here

Done. Have fun!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.