0
$\begingroup$

All,

I have a fairly straightforward problem to solve. integrals

The simplest way to show the problem is to simplify it to the following: enter image description here

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?

$\endgroup$
7
  • $\begingroup$ Give us your constants and all relevant definitions otherwise nobody can run your code. What is compute and what are all the greek letters? $\endgroup$
    – flinty
    Jul 19, 2020 at 20:35
  • $\begingroup$ Sure: c0 = 0.5; c1 = 0.001; $\endgroup$
    – mssacks
    Jul 19, 2020 at 20:52
  • $\begingroup$ 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$ ? $\endgroup$
    – flinty
    Jul 19, 2020 at 20:59
  • $\begingroup$ Deltac, ls, and n (or equivalently theta) are just constants. $\endgroup$
    – mssacks
    Jul 19, 2020 at 21:10
  • 1
    $\begingroup$ 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}] $\endgroup$
    – flinty
    Jul 19, 2020 at 21:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.