0
$\begingroup$

I am considering a function of the form:

u0 = p[1](Q1[1] - K1)/(p[1] - K1 + Sqrt[(K1)^2 - m1^2](1 - 2*alpha));

with p[1],Q1[1], and m1 being constant (set p[1] = 1, Q1[1] = 1/2, m1 = 0.1). Therefore, i am considering u0 as a function of K1 and alpha. Due to physical restrictions, i want my u0 to be between the values 4/9 and 0.48, while K1 might be between 0.1 and 1/2 and alpha between 1/2 and 1. One can easily check that the domain for K1 and alpha are too large in order to guarantee that u0 lies between 4/9 and 0.48 by checking the equation above. Hence, i need to restrict alpha or K10 such that u0 always lies in my desired domain. A plot might be somewhat revealing:

Plot3D[u0Max3*0.48, {K1, 0.1, 1/2}, {alpha, 1/2, 1}, PlotRange -> {4/9, 0.48}]; enter image description here

Ultimately, i aim for integrating this volume with numerical procedures like NIntegrate or Vegas, but for this i need to state the domain of the variables. So i am looking for a way to get a functional dependence between alpha and K1 such that i can integrate this and obtain the correct volume.

$\endgroup$
2
  • $\begingroup$ You can use Boole or Ramp to avoid explicit specification of the variable domains. For example, let u[x_,y_]:=Sin[x^2 + y^3];, then you can use NIntegrate[ Ramp[u[x,y]], {x, -1, 1}, {y, -1, 1}] or NIntegrate[Boole[u[x,y]>0]u[x,y],{x, -1, 1}, {y, -1, 1}]. $\endgroup$
    – kglr
    Commented Jun 21, 2019 at 9:33
  • $\begingroup$ Thank you for your comment, but using this type of functions nevertheless leads to a larger volume than the one which is actually required. $\endgroup$ Commented Jun 22, 2019 at 8:02

1 Answer 1

0
$\begingroup$

Function defined:

p1 = 1;
Q1 = 1/2;
m1 = 1/10;
u0[K1_, alpha_] := p1 (Q1 - K1)/(p1 - K1 + Sqrt[K1^2 - m1^2] (1 - 2 alpha))

writing:

restrictions = {4/9 < u0[K1, alpha] < 48/100, 1/10 < K1 < 1/2, 1/2 < alpha < 1};
domain = ImplicitRegion[restrictions, {K1, alpha}];
NIntegrate[u0[K1, alpha] - 4/9, {K1, alpha} ∈ domain]

we get:

0.000517558

which should correspond to the requested volume.

In a less cryptic way, writing:

Reduce[restrictions]

we get:

1/2 < alpha < 1 && 1/10 < K1 < (-41 + 64 alpha - 64 alpha^2)/(-90 - 640 alpha + 640 alpha^2)

then writing:

NIntegrate[u0[K1, alpha] - 4/9, {alpha, 1/2, 1}, {K1, 1/10, (-41 + 64 alpha - 64 alpha^2)/(-90 - 640 alpha + 640 alpha^2)}]

we get:

0.000517558

which of course is identical to the previous one.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.