# How to differentiate an integral on Mathematica?

I am so new on Mathematica. I try to find the first variation of this function according to $t$ on mathematica but I could not achieve. Here is the function ;

$$\int_{0}^{\infty}u\left(c\left(t\right)\right)\exp\left\{ -\int_{0}^{t}\theta\left(c\left(s\right)\text{d}s\right)\right\} \text{d}t$$

How can I find the first variation of this integral according to $t$ ?

• Have you tried to read the documentation? The variable t is only a dummy variable, that expression is not a function of t. Therefore its derivative is zero. – rhermans Oct 11 '14 at 21:25

In general you write your integral using Integrate

Integrate[f[x], {x, a, t}]


And the derivatives using D

D[g[x], x]

g'[x]


To differentiate the integral you can write

D[Integrate[f[x], {x, a, t}], t]

f[t]


D[Integrate[ u[c[t]] Exp[-Integrate[th[c[s]], {s, 0, t}]], {t, 0, \[Infinity]}], t]