Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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) – celtschk Sep 14 '12 at 9:26
Probably it does. I just wondered if there is some kind of function implementing this theorem. – Misery Sep 14 '12 at 10:01
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]. – kglr Sep 14 '12 at 10:41
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. – Misery Sep 14 '12 at 10:49
up vote 3 down vote accepted

Try this:

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

Then its derivative:

D[g[y], y]


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!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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