tol-units.mw

This worksheet demonstrates the use of Tolerances and Units in Maple.  I wish I had this
available when I was taking University Physics, since it would have saved a crap load of
time during lab assignments.
 

> with( Tolerances ):
with( Units ):
 

Indicate the default outputs for unit calculations 

> UseSystem( SI );
 

Some measurements to play with 

> meas1 := 0.3145 &+- 0.0001 * Unit(m);
meas2 := 0.2231 &+- 0.0001 * Unit(m);
meas3 := 0.4122 &+- 0.0003 * Unit(um);
 

INTERVAL(.3144 .. .3146)*Units:-Unit(m) 

INTERVAL(.2230 .. .2232)*Units:-Unit(m) 

INTERVAL(.4119 .. .4125)*Units:-Unit(um) 

> meas1 + meas2 + meas3;
 

INTERVAL(.5374004119 .. .5378004125)*Units:-Unit(m) 

> sqrt( meas1^2 + meas2^2 + meas3^2 );
 

INTERVAL(.3854560416 .. .3857348830)*Units:-Unit(m) 

> meas1 * meas2;
 

INTERVAL(0.7011120e-1 .. 0.7021872e-1)*Units:-Unit(m^2) 

Let's see if we can simplify Joules per second to Watts. 

> A := 100 * Unit(J);
B := 10 * Unit(sec);
C := A / B;
 

100*Units:-Unit(J) 

10*Units:-Unit(s) 

10*Units:-Unit(W)