Integrating over Implicit Regions with unspecified parameter

So have this code (giving the moment of inertia of a cube)

Integrate[x^2 + y^2,
{x, y, z} ∈ ImplicitRegion[Max[Abs[x], Abs[y], Abs[z]] < 1, {x, y, z}]]


which works fine giving 16/3. But when I replace 1 by an abstract parameter a like in

Integrate[x^2 + y^2,
{x, y, z} ∈ ImplicitRegion[Max[Abs[x], Abs[y], Abs[z]] < a, {x, y, z}]]


I only get something obvious like the following:

How can I make Mathematica use the formal parameter?

• If you would not need implicit regions you could do this: Integrate[ x^2 + y^2, {x, y, z} \[Element] Cuboid[a {-1, -1, -1}, a {1, 1, 1}]] which leads to: ConditionalExpression[(16 a^5)/3, a > 0] but that will probably not solve your problem Commented Jul 21, 2017 at 13:48
• I'm aware of Mathematica's predefined Regions, but I do need ImplicitRegion for my actual problem
– chr
Commented Jul 21, 2017 at 14:05
• That's what I thought (since this problem is of course solvable without the regions). I thought putting the assumption in that a is larger than 0 would help solve it, but that also did not seem to work. Commented Jul 21, 2017 at 14:10
• Adding that assumption also was my first try
– chr
Commented Jul 21, 2017 at 15:21

maybe rewritting your implicit region as:

Integrate[x^2 + y^2, {x, y, z} \[Element]
ImplicitRegion[-a <= x <= a && -a <= y <= a && -a <= z <= a, {x, y,
z}], Assumptions -> a > 0]

(* (16 a^5)/3 *)

• Thanks! Seems that Region doesn't like Abs
– chr
Commented Jul 31, 2017 at 17:17
• Well, Region does like Abs :-) It needs a clear definition of the region: region = ImplicitRegion[Max[Abs[{x, y, z}]] < a, {{x, -a, a}, {y, -a, a}, {z, -a, a}}], then: Integrate[x^2 + y^2, Element[{x, y, z}, region], Assumptions -> a > 0] which gives ((16 a^5)/3).
– djg
Commented Jul 31, 2017 at 23:54

MMA tries to figure out the implicit region without no assumptions about $\{x,y,z\}$ or $a$, so we can tell it what to do in specific cases:

 Integrate[x^2 + y^2, {x, y, z} \[Element] ImplicitRegion[
Evaluate@Reduce[Max[Abs[x], Abs[y], Abs[z]] < a, {x, y, z}, Reals], {x, y, z}]]


$\begin{array}{cc} \bigg\{ & \begin{array}{cc} \frac{16 a^5}{3} & a>0 \\ 0 & \text{True} \\ \end{array} \\ \end{array}$