Close
Close window
Simple Unit Worksheet - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

Simple Units Environment

The Simple Units environment is an environment designed for computations with units. This environment is set up by using the command with(Units[Simple]), or alternatively by using the command with(Units).

Various procedures are overloaded to handle units. For example, sin3.0degrees evaluates the sine of 3 degrees and max4m,10ft returns 4m.

Arithmetic operators are overloaded to extract units from their operands. For example, 3m+4cm evaluates to 7625m and 53.32km 1.3h evaluates to 11.39316239ms, which can be converted to 25.48577843mph.

Note: Although easier to use, it is slower, in general, to perform computations in the Simple Units environment than to use the conversion routines at the top-level.

These computations can also be done in the Standard Units or Natural Units environment or at the top-level by using only conversion routines (see Default Units ). Each example in this worksheet is also in the other worksheets to show how you can perform the computations in the other environments.

>

restart

>

withUnits:

Automatically loading the Units[Simple] subpackage


Simple Examples

Add 4 feet to 3 inches.

>

4ft+3inches

64775000m

(1.1)
>

convert,units,inches

51in

(1.2)

How many meters are equivalent to 4 yards?

>

4yd

4yd

(1.3)
>

convert,units,m

2286625m

(1.4)

How many liters are equivalent to 5 UK gallons?

>

convert5galUK,units,L

45460920000L

(1.5)

How many liters are equivalent to 5 US gallons?

>

convert5galUS_liquid,units,L

47317647325000000L

(1.6)

How many US liquid gallons are equivalent to a UK gallon?

>

convertgalUS_liquid,units,galUK

473176473568261250galUK

(1.7)

Unit Names and Symbols

Unit symbols and various spellings of unit names are recognized by the package.

>

32000m,32000meter,32000metres

32000m,32000m,32000m

(2.1)

This feature is expandable so that, for example, you can specify metr (the Polish word for this unit) as an alternate spelling of meter. See the AddUnit help page for more information.

Some units can be recognized with SI or IEC prefixes.

>

32km,32kilometer,32kilometres

32km,32km,32km

(2.2)

Sample Questions with Solutions

How many miles do you travel in 35 minutes moving at 55 miles per hour?

>

distance55mph 35 minutes

distance129082825m

(3.1.1)
>

convertdistance,units,mi

38512mi

(3.1.2)
>

evalf

32.08333333mi

(3.1.3)

How many seconds are equivalent to 3 weeks?

>

convert3week,units,s

1814400s

(3.2.1)

How many inches are equivalent to 5 feet 4 inches?

>

convert5ft+4inches,units,inches

64in

(3.3.1)

Convert 50 km/h to cm/s.

>

convert50kmh,units,cms

125009cms

(3.4.1)
>

evalf

1388.888889cms

(3.4.2)

How many seconds does it take an object, released from rest, to fall 20 meters?

From the equation d=gnt22, we derive:

>

elapsed_time2 distaccel

elapsed_time2distaccel

(3.5.1)
>

evalelapsed_time,dist=20 m,accel=gn

2400000196133196133s

(3.5.2)
>

evalf

2.019619976s

(3.5.3)

What is the rest energy of an electron?

Assume the mass of an electron is 9.111031 kilograms.

>

mass9.1110−31kg

mass9.11000000010−31kg

(3.6.1)

Approximate the speed of light by 3.00108 meters per second.

>

c3.00108m's'

c3.000000000108ms

(3.6.2)

Using the formula E=mc2, you can approximate the rest energy of the electron.

>

Emassc2

E8.19900000010−14J

(3.6.3)

A more precise answer can be found by converting the known unit the electron mass (em) to joules using energy conversions.

>

convertem,units,J,energy

8.18710414110−14J

(3.6.4)

Approximately what volume does 1,000,000,000 US dollars worth of gold occupy?

>

cost1210.00 USDoztroy; # November 18th, 2016

cost1210.00USDoztroy

(3.7.1)
>

density19.3gcm3

density19.3gcm3

(3.7.2)
>

mass109USDcost

mass25705.35273kg

(3.7.3)
>

volumemassdensity

volume1.331883561m3

(3.7.4)

What is the length of one side of a cube with this volume?

>

length_sidevolume3

length_side1.100243351m

(3.7.5)

An Su-27 Flanker can travel at mach 1.1 at sea level. How fast is this in miles per hour, miles per second, and meters per second?

>

convert1.1M,units,mph

815.6003937mph

(3.8.1)
>

convert1.1M,units,mis

0.2265556649mis

(3.8.2)
>

convert1.1M,units,ms

364.606ms

(3.8.3)

Approximately how many meters are there in 3.5 miles?

>

convert3.5mi,units,m

5632.704000m

(3.9.1)
>

round

5633m

(3.9.2)

Given 50 US gallons of water, how many 750 mL bottles could you fill?

>

50galUS_liquid750mL

157725491625000

(3.10.1)
>

floor

252

(3.10.2)

Given nylon with a linear mass density of 20 deniers, what length of thread is used in an object weighing 12 grams?

>

12g20deniers

5400m

(3.11.1)

What is the volume in cubic inches of a 2 liter engine.

>

convert2L,units,inches3

2500000002048383in3

(3.12.1)
>

evalf

122.0474882in3

(3.12.2)

For a given phenomena with a frequency of 1.420,405,761 GHz, find the:

1. period,

2. number of cycles per year, and

3. number of cycles since the beginning of the earth.

First you must convert the frequency from GHz to Hz (cycles per second).

>

frequency1.420405761GHz

frequency1.420405761GHz

(3.13.1)

The period is:

>

1frequency

0.70402417921GHz

(3.13.2)
>

convert,units,nanoseconds

0.7040241792ns

(3.13.3)

The number of cycles per year is:

>

convertfrequency,units,1yr

4.48236383810161yr

(3.13.4)

The number of cycles since the beginning of the earth is:

>

frequency 10000000000 yr

4.4823638381026

(3.13.5)

Given inductance and capacitance, find the resistance in microohms.

The following formula relates the resistance to the inductance and capacitance.

>

resistanceinductancecapacitance

resistanceinductancecapacitance

(3.14.1)

Use an inductance of 124 nanohenries and a capacitance of 3.52 microfarads.

>

evalresistance, inductance = 124. nH, capacitance = 3.52 uF

0.1876892984Ω

(3.14.2)
>

evalf

0.1876892984Ω

(3.14.3)
>

convert,units,uOmega

187689.2984μΩ

(3.14.4)

Given a molar energy, find the mass energy in Btu's per pound.

>

molar_energy523.432Btumolcarbon

molar_energy523.432Btumolcarbon

(3.15.1)
>

carbon_mass12kgmolcarbon

carbon_mass12kgmolcarbon

(3.15.2)
>

mass_energymolar_energycarbon_mass

mass_energy45990.05563m2s2

(3.15.3)
>

convert,units,Btulb

19.78539678Btulb

(3.15.4)

Given a distance function, find the speed by differentiation, speed at 2.5 seconds and at 5 blinks by evaluation, and distance traveled between 1 and 2.5 seconds by integration and by subtraction of the distance function values.

>

distance51+4ⅇ3 tsm

distance51+4ⅇ3t1sm

(3.16.1)

The expression ⅇ3 t, where t is a duration or a time, doesn't make sense without specifying with what unit of time this expression is to be understood. This can be specified by dividing by the appropriate unit: that way, if t is given in seconds, the unit will just be stripped off, and otherwise the appropriate conversion to seconds is done automatically.

To find the speed function, differentiate the distance function.

>

speeddiffdistance,t

speed60ⅇ3t1s1+4ⅇ3t1s2ms

(3.16.2)

To find the speed at 2.5 seconds, evaluate the speed function at t=2.5 s.

>

speedt=2.5|speedt=2.5s

0.03303871496ms

(3.16.3)

To find the speed at 5 blinks, evaluate the speed function at t=5. blink.

>

speedy|xt=5. blink

0.0001411518555ms

(3.16.4)

By using a definite integral, you can determine the distance traveled from the speed function.

>

intspeed, t=1s..2.5s

0.8193365798m

(3.16.5)
>

evalf

0.8193365798m

(3.16.6)

The distance traveled can also be calculated directly from the distance function.

>

distancex=a|f(x)t=2.5sdistancex=a|f(x)t=1s

4.98896273351+4ⅇ−3m

(3.16.7)
>

evalf

0.819336584m

(3.16.8)

Find the minimum and maximum length of 1.2 yards, 1 meter, 3.2 feet, and 0.6 fathoms.

>

min1.2yd,m,3.2ft,0.6fathom

0.9753600000m

(3.17.1)
>

max1.2yd,m,3.2ft,0.6fathom

1.097280000m

(3.17.2)

Given a torque of 3 newton meters, how much energy is required to move a lever through 10 degrees?

The energy required is the product of the torque and the angle in radians.

>

energytorque angle

energytorqueangle

(3.18.1)
>

evalenergy, torque = 3 Nm, angle = 10 deg

π6J

(3.18.2)
>

convert, system

π6J

(3.18.3)
>

evalf

0.5235987758J

(3.18.4)

The Hyper-X can travel at speeds up to 7200 miles per hour. How long would it take to circle the earth at maximum speed (assuming it could carry sufficient fuel)? How far does it travel in a 10 second flight at maximum speed?

To find the time to circle the earth, divide the distance by the speed.

The meter was originally defined as 1/10,000,000 th the distance from the North Pole to the Equator on the meridian passing through Paris. Therefore, 40,000 kilometers is a good approximation of the circumference of the earth.

>

40000km7200mph

15625000012573s

(3.19.1)
>

convert,units,h

390625113157h

(3.19.2)
>

evalf

3.452062179h

(3.19.3)

To find the distance traveled, multiply the speed by the time.

>

7200mph 10 s

80467225m

(3.19.4)
>

evalf

32186.88000m

(3.19.5)
>

convert,units,km

32.18688000km

(3.19.6)

Given 1032 UK gallons of oil, how many cylindrical cans with a height of 1.2 feet and diameter of 0.9 feet could you fill?

The volume of a cylinder is hπd22.

>

volconvert1.2 ftπ.9 ft22,units,galUK

vol4.755136685galUK

(3.20.1)
>

1032galUKvol

217.0284617

(3.20.2)
>

evalf681.8150208π

217.0284616

(3.20.3)

Given an power gain from 332 microwatts to 23 milliwatts, what is the gain in decibels? What would the decibel gain be if the increase were a voltage increase?

A gain is a quotient of the final value divided by the initial value.

>

gain23 mW332 uW

gain575083

(3.21.1)

Since this is a gain in power, we can use the following formula to find the gain in decibels.

>

10 log10gain

10ln575083ln10

(3.21.2)
>

evalf

18.40589752

(3.21.3)

Power is proportional to the square of the voltage. Therefore, the decibel increase corresponding to the voltage gain should be a factor of 2 times that of the power gain.

>

voltage_gain23mV332 uV

voltage_gain575083

(3.21.4)
>

20 log10gain

20ln575083ln10

(3.21.5)
>

evalf

36.81179504

(3.21.6)

Given an initial velocity of 2.4 meters per second and an otherwise unspecified uniform acceleration, what is the generic formula for position? For starting at the origin and acceleration being gravity in the opposite direction to the initial velocity? After 0.4 seconds?

The general formula for velocity in a uniform acceleration is:

>

v v0 + at

vat+v0

(3.22.1)

Substitute the given starting velocity.

>

vs vy|xv0 = 2.4ms

vsat+2.4ms

(3.22.2)

Integrating this over time answers the first question.

>

x x0 + 0t0vs ⅆt

xx0+0.5000000000at02sm2+2.400000000t0smm2s2

(3.22.3)

Starting at the origin and with the specified gravity:

>

gravity evalfScientificConstants:-Constantg, units;

gravity9.80665ms2

(3.22.4)
>

xy|xx0 = 0m, a=gravity

4.903325000t021m+2.400000000t0smm2s2

(3.22.5)

After 0.4 seconds, this is the location:

>

y|xt0 = 0.4s

0.1754680000m

(3.22.6)

Return to Index for Example Worksheets


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /