Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.1K Views
|
6 Replies
|
1 Total Like
View groups...
Share
Share this post:

Speed up Nintegrate for certain range of function's input

Posted 2 years ago
POSTED BY: John Wick
6 Replies

When integrating, I would recommend UnitStep instead of HeavisideTheta. This gives me a symbolic output:

With[{g = 10^-23, c = 10^14}, 
 Integrate[
  Simplify[(6 (10^-10 Sqrt[
           xP])^2 10^-11 (10^-7 Sqrt[(10^-38 c^2 xP + (10^-10 Sqrt[
                  xP])/x)/(1/10 + 
              10^-38 c^2)])^3)/((10^-38 c^2 xP + (10^-10 Sqrt[xP])/
           x)^4/(1/10 + 10^-38 c^2)^4)*
    UnitStep[10^-38 c^2 xP + (10^-10 Sqrt[xP])/x - 1/g]],
  {xP, 1/g, 10^12},
  Assumptions -> And[c > 0, x > 0, xP > 0, g > 0]]]
POSTED BY: Gianluca Gorni
Posted 2 years ago

But I can't assume {g = 10^-23, c = 10^14} as a general solution since it will give the results for a point but in principle g,c have to vary for a range of values g=>(10^-2,10^-24) and c=>(10^10-10^15)

POSTED BY: John Wick

If Mathematica doesn't do it automatically, you can easily work out the point where the HeavisideTheta discontinuity lies, and the conditions under which that point is to the left, within, or to the right of the integration interval [1/g, 10^12].

POSTED BY: Gianluca Gorni
POSTED BY: Gianluca Gorni
Posted 2 years ago
POSTED BY: John Wick
Posted 2 years ago
POSTED BY: John Wick
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard