       Re: Units question

• To: mathgroup at smc.vnet.net
• Subject: [mg115555] Re: Units question
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Fri, 14 Jan 2011 06:19:43 -0500 (EST)

```Dimensions aren't numbers, so being positive doesn't make sense. It is a just convenient to say that they are positive to trick Sqrt and the like. In some cases using this is better than using PowerExpand since PowerExpand would affect the treatment of variables not just the dimensions. You can handle all of the dimensions at once:

Needs["Units`"]

simplifyUnits = ToExpression[# <> " > 0" & /@ Names["Units`*"]];

Simplify[Sqrt[Meter^2/Second^2] Second/Meter^2, simplifyUnits]

1/Meter

Bob Hanlon

---- Murray Eisenberg <murray at math.umass.edu> wrote:

=============
Meter and Second are positive.

My naive sense is that this is just plain stupid. Am I missing something
here?

On 1/12/2011 4:07 AM, Bob Hanlon wrote:
> Simplify[Sqrt[Meter^2/Second^2] Second/Meter^2,
>   {Meter>  0, Second>  0}]
>
> 1/Meter
>
>
> Sqrt[Meter^2/Second^2] Second/Meter^2 // PowerExpand
>
> 1/Meter
>
>
> Bob Hanlon
>
> ---- Ted Sariyski<tsariysk at craft-tech.com>  wrote:
>
> =============
> Hi,
> Working with units I get correct result:
>
> Sqrt[Meter^2/Second^2] Second)/Meter^2
>
>    How to tell Mathematica to simplify the result to Meter^-1?
> Simplify and FullSimplify doesn't do the job.
> --Ted
>
>

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

--

Bob Hanlon

```

• Prev by Date: Re: Styles for inline boxes
• Next by Date: Help with non-linear system of equations (Trigonometric and Polynomial)
• Previous by thread: Re: Units question
• Next by thread: Ctrl-K in MyContext