# Exits and beeps on Integration

Evaluating

$Version (*12.0.0 for Linux x86 (64-bit) (April 7, 2019)*) Clear["Global*"]; ineq1 = r+y r>r+y r&&(-1+y) r+r<y r; reg1=ImplicitRegion[ineq1,{{r,0,1},{r,0,1},{r,0,1},{r,0,1}}]; int[y_]=Assuming[1>y>0,Integrate[y r,{r,r,r,r}\[Element]reg1]]  beeps with no output. "Why the beep?" explains "The kernal Local has quit(exited) during the course of an evaluation) Do Windows/Mac users experience the same? Is the error elsewhere? • Reproduced on 12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019). The kernel should not crash. Please report to Wolfram Support. Using SetDelayed and specifying a value for y seems to work. int[y_] := ..., int[0.5]. – Rohit Namjoshi Nov 20 '19 at 20:52 • Thanks. Just reported. – Logan Smith Nov 20 '19 at 22:00 • @RohitNamjoshi - on my Mac with v12, int[0.5] erroneously evaluates to a complicated Piecewise function of y. – Bob Hanlon Nov 20 '19 at 23:06 • @BobHanlon, I was not able to replicate the complicated Piecewise function in this case, although in other similar problems I've gotten complicated piecewise functions. What code did you specifically run? – Logan Smith Nov 21 '19 at 0:39 ## 1 Answer This is an extended comment to demonstrate the results on my system $Version

(* "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)" *)

Clear["Global*"];

ineq1 = r + y r > r + y r && (-1 + y) r + r < y r;

reg1 = ImplicitRegion[
ineq1, {{r, 0, 1}, {r, 0, 1}, {r, 0, 1}, {r, 0, 1}}];

int[y_] :=
Assuming[1 > y > 0,
Integrate[y r, {r, r, r, r} ∈ reg1]]

int[0.5] % // Simplify[#, 0 < y < 1] & Since int[0.5] has a numeric value for y, the symbol y should not appear in the evaluated output.

Presumably, it is a scoping issue which is avoided by explicitly passing y as a parameter to ineq1 and reg1

Clear["Global*"];

ineq1[y_] := r + y r > r + y r && (-1 + y) r + r < y r;

reg1[y_] :=
ImplicitRegion[
ineq1[y], {{r, 0, 1}, {r, 0, 1}, {r, 0, 1}, {r, 0, 1}}];

int[y_] :=
Assuming[1 > y > 0,
Integrate[y r, {r, r, r, r} ∈ reg1[y]]]

int[0.5]

(* 0.09375 *)
`