Hope you are doing great!
I am trying to solve a double Integral of a function let's say f(w,q). My upper and lower limits are
wmin = 0;
wmax[T_] = T - 5;
qmin[w_, T_] := Sqrt[T] - Sqrt[(T - w)];
qmax[w_, T_] := Sqrt[T] + Sqrt[(T - w)];
The integral I am trying to solve is:
Iw[q_,T_] := NIntegrate[f[w,q], {w,wmin,wmax[T]}]
Iq[w_,T_] := NIntegrate[q*Iw[q,T], {q,qmin[w, T], qmax[w,T]}] /;(wmin<w<=wmax[T])
Iq[w_,T_] := 0 /; (w < wmin or w >= wmax[T])
The problem is that if I give the integral let's say a value of Iq[1,25], it will go and replace w to NIntegrate[f[1,q],d1] which will give an error. I want Mathematica to first solve the I1 NIntegral with respect to w for a given T(must be same for all integrals) and then calculate the second integral which only has w-dependence in the limits of qmin, qmax and the condition.
Thanks in advance!