Bug introduced in 9.0 or earlier and persisting through 11.2 or later
Why does this strange behavior occur when dealing with units and quantities?
A[t_] := A0 Exp[-b t / (2m)]
FullSimplify[A[Quantity[0, "Seconds"]]]
A0 -- (* wrong; should be A0 *) 2
b = Quantity[7, "Newtons"*"Seconds"/"Meters"]
7 second newtons per meter
m = Quantity[10, "Kilograms"]
10 kilograms
FullSimplify[A[Quantity[0, "Seconds"]]]
A0 (* right *)
I can imagine it spitting out an error because Exp[Quantity[0, "Seconds"]]
doesn't make sense, but where does the 1/2
come from?
I don't think it's from the 2
in -b t / (2 m)
; changing this to -b t / (7m)
gives the same result.
A[Quantity[0, "Seconds"]]; Simplify@A[Quantity[0, "Seconds"]]; FullSimplify@A[Quantity[0, "Seconds"]]
screen shot: !Mathematica graphics $\endgroup$x*E^Quantity[0, "Feet"] // FullSimplify
$\endgroup$E^Quantity[0, "Feet"]
? Exponents are dimensionless quantities, and raising something to a number of feet (even if it's zero) doesn't really make sense, so I wouldn't expect Mathematica to do anything sensible (in fact, an error would be nice). That being said, in the equation in the example, the remaining variables are still able to cancel out the units, so I don't really know what to expect in that case. $\endgroup$