You are living dangerously by using the same variable t
for both the integration variable and the endpoint of the interval of integration. It seems that an object of the form Integrate[f[t], {t, 0, t}]
is treated in a funny way by Integrate
:
D[Integrate[f[t], {t, 0, t}], t]
Integrate[Integrate[f[t], {t, 0, t}], {t, a, b}]
Is the following what you wanted?
Clear[s, demand];
demand[t_] = d0 - a p[t];
s[t_] = s0 - Integrate[demand[r], {r, 0, t}];
Integrate[p[u] demand[u], {u, 0, t}] -
Integrate[s[u] \[Sigma], {u, 0, t}]
profitRate[t_] = D[%, t]