# How to do a double integral in time with variable limits?

All,

I have a fairly straightforward problem to solve.

The simplest way to show the problem is to simplify it to the following:

where xi is the first variable of integration which ranges from tau to t (t=10 in this case), and tau is the second variable of integration which ranges from 0 to t. For this example, I have made the 'function' here be xi for clarity, as the issue is not form of the function but how to setup such an integral in Mathematica.

The code here is:

NIntegrate[-Exp[NIntegrate[\[Xi], {\[Xi], \[Tau], 10}]], {\[Tau], 0,


10}];

So, how does is this done in Mathematica?

• Give us your constants and all relevant definitions otherwise nobody can run your code. What is compute and what are all the greek letters? Jul 19, 2020 at 20:35
• Sure: c0 = 0.5; c1 = 0.001; Jul 19, 2020 at 20:52
• And the rest please... what is $\Delta_c$, what is $\mathbf{n}$, what is $\lambda_s$, what is the function $m_c^0$, what is $\tau$ ? Jul 19, 2020 at 20:59
• Deltac, ls, and n (or equivalently theta) are just constants. Jul 19, 2020 at 21:10
• Just move the inner integral to a separate function and make sure the argument is pattern tested ?NumericQ as follows: inneri[τ_?NumericQ] := NIntegrate[ξ, {ξ, τ, 10}] then do NIntegrate[-Exp[inneri[τ]], {τ, 0, 10}] Jul 19, 2020 at 21:47