Grouping by units over add - progress, and a couple questions



--- Albert Reiner  wrote:
> [C Y , Thu, 19 May 2005 18:40:13 -0700 (PDT)]:
> > In general, it is meaningless to pose an expressin a^b where b is a
> > quantity with units.
> 
> Not sure: In any book on liquid state physics you are likely to find
> expressions like rho*log(rho), rho being of dimension 1/volume. 
> Which is, of course, equivalent to log(rho^rho).  It may seem
> meaningless, but that is only because some not very interesting 
> quantities like, e.g., -rho*log(...) with ... of appropriate 
> dimensions are often left out.

Well, I guess the question becomes different forms of the same issue -
what units does rho*log(rho) have?  I have no idea what the log of a
unit means physically.  Unless I do understand it it would most likely
be worse than useless for me to attempt to program Maxima to handle it.
 For algebraic expressions, unit behavior and desired display is
usually fairly well defined, but when functions are introduced I start
having problems.  What, for example, does sin(1/s) mean?  Anything? 
Should this return an error?  What do I do with
'integrate(a*kg/s+b*kg/s,t)?  Simplify what's inside integrate, or (my
inclination) respect the ' symbol and do nothing to it?  The case of
-1/s currently also produces an error, but that at least is a simple
special case and can be (I think) delt with fairly simply.

> OTOH, it may well be that people who want to do their calculations in
> this way simply should not use the units package.

I would like to have the units package work in such a fashion that any
legal use of units, and any helpful error reporting that can be managed
without massive effort, works as expected.  When getting to special
cases like this that gets rather involved, unless someone smarter than
me can straighten me out and point out the obvious solution? (pretty
please? :-)

> > In general, it is meaningless to evaluate a trigonometic function
> > with a unit bearing argument, e.g. sin(a*b), where b is a unit 
> > other than rad or deg or some other numerical factor.
> 
> But rad and deg are not really units but simple numbers. rad = 1, deg
> = pi/180.

Right.  I'm not sure they properly belong in a units package at all,
but that seems to be the standard convention and it's certainly easy
enough to make those definitions.

> Also, suppose b = 1/meter.  Why should sin(a*b) be prohibited?  Do
> you require the dimensions of a (which would be a length) to be 
> manifest in all calculations?

I think you are assuming a=n*meter?  This should work OK, since a
dimension check on a*b would reveal it as dimensionless.  Perhaps I
stated this badly - what I want to know is if sin(x) where x has some
dimension can have physical meaning.  I don't know what sin(1/m) means,
so I have no idea how to deal with it.  Having units suddenly "vanish"
when they aren't convenient seems like wimping out to me, unless there
is some sound theoretical basis for doing this.  So I pose the question
if sin(1/m) is in fact as meaningless in general as it is to me.  If
this is the case, it would be appropriate to signal an error for this
input.  The other obvious alternative would be to do sin(a*m)=sin(a)*m,
but this would also require justification and personally I doubt it's
correct.

CY



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250