4 ms·
> Another useful tidbit is if your formula has a log or an exp, the arg needs to be dimensionless. I have cognitive dissonance about that. I understand that if
by feoren 5y ago
> Another useful tidbit is if your formula has a log or an exp, the arg needs to be dimensionless.
I have cognitive dissonance about that. I understand that if you look at the Taylor series of Exp(x), you're clearly adding terms containing 1, x, x^2, x^3, etc., and that it doesn't make sense to add a meter to a square meter to a cubic meter and so forth. So therefore Exp(1m) doesn't/shouldn't make sense.
But on the other hand, I can come up with examples that seem to make sense, but seem "dimensionful". Is a bit dimensionless? Because it certainly makes sense to consider 2^(32 bits) and 2^(4 bytes). Yet bits are deeply related to entropy and might even be considered a unit of energy. Are we sure they're dimensionless? What is a "square bit" anyway?
I can also define "specific meters" to be the length of an object divided by the length of a 1-meter-long stick. This value is now dimensionless, so it should be OK to exponentiate it, correct? Am I cheating? How?
Or I should be allowed to take Log(7 mg/kg) because mg/kg is dimensionless. But this should equal Log(7 mg) - Log(1 kg), which I'm not allowed to do. What gives?
Again I come back to: is this actually helping me catch errors in my calculation? I'm honestly not sure here.
- fuzzybear3965 5y agoYeah, so the problem is that the units of a function applied to a value is not necessarily the same as the value. Consider the area of a square. It has one argument whose unit is of length type. But, the function returns something of area type - totally fine. If you want to talk about e^(x) then you're totally free to do that but, you're right: if x is not dimensionless then the expression has no physical meaning (as little meaning as one meter added to one second, as an example of another clearly nonsensical physical function). In Physics, your starting point always makes sense dimensionally (F=m*a, E=m*g*h) and the game is to combine expressions that make dimensional (and physical) sense to glean insight into how different physical constraints of the system are related. If you have any Physics problem where you end up with e^(x) or sin(x) and x is not dimensionless then it's a dead giveaway that you performed an algebraic misstep at some point when playing the game. So, in short, you can propose a lot of functions that make no sense from a physical standpoint, but you won't arrive at those if you're working from first principles which are, by nature, dimensionally consistent.
- danuker 5y agoI would treat a Taylor series as "numeric trickery" that happens to produce useful approximations, in which case I wouldn't care about units. As for Log of a unit, if it is useful in some strange circumstance, would require a different unit to keep track of (like logkg), similarly to i (the imaginary unit) being the result of sqrt(-1).
- lordnacho 5y agoI think it's more errors in derivations that you're after. Like the sibling comment mentions, in physics you get a bunch of different units but they have to be consistent, eg despite there being different expressions that describe energy, they end up being the same under the hood. I'm not sure I can think of a case where you can do otherwise. Entropy is J/K and seems to follow the same dimensionality constraints as everything else, though I'm not well versed in information theory so I don't know how they think about it. The log example only works because log only takes a dimensionless parameter. The only way to get that is to cancel the two kinds of meters and shove the dimensionless 0.007 into it. Ie it is a type error to take the log of 7mg or anything with a unit. One interesting thing I came across is in the cpp book by Stroustrup he actually builds a custom type system capable of preventing issues like this and uses physics examples.