# Unit of output changes when constant quantity is moved over integral

Bug introduced in 9.0 and persisting through 11.0.1 or later

Quantity is new in 9.0.

Why do these two expressions give the same result in different units?
In:

Integrate[
gravitationalAcceleration  Quantity[1, "g/m^3"] fluidArea h, {h, 0, height}]


Out:

Quantity[1/2 fluidArea gravitationalAcceleration height^2,
"Grams" "Meters"]


In:

Quantity[1, "g/m^3"] Integrate[
gravitationalAcceleration  fluidArea h, {h, 0, height}]


Out:

fluidArea gravitationalAcceleration height^2 (Quantity[1/2, (
"Grams")/("Meters")^3])

• I think we can safely use the BUG tag here. In the spirit of minimal working examples, this is wrong too Integrate[ x Quantity[1, "Meters^2"] p , {p, 0, z}] ( V10.1 ) – george2079 Sep 28 '15 at 15:19