# Problem with specifying quantity value in FormulaData

I wanted to use the formulas for KineticEnergy and KineticEnergyRelativistic with specific quantity vaules. The later formula does not work as I expected.

First, the KineticEnergy formula:

FormulaData["KineticEnergy"] Specifying quantity values per the documentation works as expected:

FormulaData["KineticEnergy", {"m" -> Quantity[64.8*^-6, "Kilograms"], "v" -> Quantity[0.2, "SpeedOfLight"]}] Now, the KineticEnergyRelativistic part:

keRelFD = FormulaData["KineticEnergyRelativistic"] Again, specifying values:

FormulaData["KineticEnergyRelativistic", {"m" -> Quantity[64.8*^-6, "Kilograms"], "v" -> Quantity[0.2, "SpeedOfLight"]}] When I looked at the result that occurs for a symbolic quantity for the QuantityVariable, v, I see more details about the problem and possibly why the previous result returned False.

FormulaData["KineticEnergyRelativistic", {"m" -> Quantity[64.8*^-6, "Kilograms"], "v" -> Quantity[v, "Meters"/"Seconds"]}] The only way I found to get around this issue it to use apply a rule to the 2nd part of previous result:

FormulaData["KineticEnergyRelativistic", {"m" -> Quantity[64.8*^-6, "Kilograms"], "v" -> Quantity[v, "Meters"/"Seconds"]}][] /. v -> QuantityMagnitude[UnitConvert[Quantity[0.2, "SpeedOfLight"]]] While this works, it seems a bit clunky. Does anyone have any idea of how to do this in a way that works like it did for KineticEnergy?

I'm running Mathematica 11 on Win 10.

• FormulaData[ "KineticEnergyRelativistic", {"m" -> Quantity[64.8*^-6, "Kilograms"], "v" -> Quantity[v, "SpeedOfLight"]}] /. {v -> 0.2} works too. Btw. I guess you edited-out the second part after && in your final screenshot? – masterxilo Aug 31 '16 at 1:24
• Probably you discovered a bug, report it. – masterxilo Aug 31 '16 at 1:30
• @masterxilo, it probably looks like I edited the && out, but I didn't intend to edit it out. If you look closely, I take the 2nd part of the formula result like so FormulaData[ "KineticEnergyRelativistic", {"m" -> Quantity[64.8*^-6, "Kilograms"], "v" -> Quantity[v, "Meters"/"Seconds"]}][] /. v -> QuantityMagnitude[UnitConvert[Quantity[0.2, "SpeedOfLight"]]]. – david Aug 31 '16 at 5:39
• Ah, it's just missing the part selection in the code you posted. – masterxilo Aug 31 '16 at 10:33
• @masterxilo, I guess I left that out my original post. Sorry about that. I've edited to fix it. And, I guess I'll report this issue to WRI. – david Aug 31 '16 at 13:50