teodorom
(Teodoro Marinucci)
November 27, 2023, 8:44pm
1
Hi,
I’m trying to understand how WM handles UM.
That is I expect that a calculation should give some UM, but I don’t succeed.
Let’s take as an example
(314.159 m Sqrt[((7.34102*10^-6 - 0.0000178801 I) s^2)/m^2])/s
The results should be a scalar that I can calculate using coth[] but I’m unable to “convince” WM to give me that,
Thanks for any help
Look up Quantity in the documentation:
Quantity[314.159, "Meters"] *
Sqrt[Quantity[7.34102*10^-6 - 0.0000178801 I,
"Seconds"^2/"Meters"^2] ]/Quantity[1, "Seconds"]
% // Coth
You can also use your notation, but adding the information that s and m are positive:
(314.159 m *
Sqrt[((7.34102*10^-6 - 0.0000178801 I)
s^2)/m^2])/s
Simplify[%, s > 0 && m > 0]
teodorom
(Teodoro Marinucci)
November 27, 2023, 11:09pm
3
Applying your second “trick” and crashing my head against the wall I’ve got the desired result.
However plotting a graph with the resulting function is much faster (0.235151) when I disregard the UM’s than when I use them (2.97654).
Doing physics calculations with WM can be a nightmare.
teodorom
(Teodoro Marinucci)
November 28, 2023, 12:37am
4
$Assumptions = {m > 0, s > 0, kg > 0}
Z[x_] := Sqrt[R K ] // Simplify;
Cleaner
Thanks again