Hi all,
This may be a "simple" language issue that I have overlooked, but I am enountering the ollowing situation when trying to run some NIntegrate calculations.
If i define the following 3 functions:
integralMax = 100;
ff1[Q_, w_, A_, p_] := A Sin[w Q + p]^2/Q; (* a simplified version of the function I'm using *)
ff2[Q_, w_, A_, p_, sig_] :=
NIntegrate[
ff1[x0, w, A, p] PDF[NormalDistribution[Q, sig], x0], {x0, Q - sig,
Q + sig}];
ff3[Qth_?NumberQ, w_, A_, p_, sig_] :=
NIntegrate[ff2[Q0, w, A, p, sig], {Q0, Qth, integralMax }];
ff1 represents an event rate vs variable Q.
ff2 represents a "quasi" convolution of ff1 with some resolution fn (p.s. using the built in covolve fn on my working version of ff1 does not compute within a days time on my computer)
ff3 is the integral from a starting point Q to a maximum value.
When I run ff3, for example:
ff3[2, 10, 2, 0, 1]
I get :
NIntegrate::nlim: x0 = -1.+Q0 is not a valid limit of integration. >>
NIntegrate::nlim: x0 = -1.+Q0 is not a valid limit of integration. >>
NIntegrate::nlim: x0 = -1.+Q0 is not a valid limit of integration. >>
General::stop: Further output of NIntegrate::nlim will be suppressed during this calculation. >>
followed by a valid numerical result. As far as I can tell, the function work like I want them to, eventhough the NIntegrate::nlim errors pop up.
Is there a "correct Mathematica" way to implement this ?
Thanks