MATHEMATICA TUTORIAL

# Numerical Calculations with Units

Mathematica's unit system utilizes various numerical methods, facilitating calculations using Quantity expressions within Mathematica's numerical functions.

 N[quantity] numerical approximation of the specified quantity FindRoot[lhs=rhs,{x,x0}] search for a numerical solution to an equation, starting with FindMaximum[f,{x,x0}] search for a maximum of f, starting with

Numerical functions that operate on Quantity expressions.

N[quantity] gives you a numerical approximation of quantity.
 Out[1]=

For numerical functions like FindRoot and FindMaximum, if a variable is specified within a Quantity expression, then that variable is assumed to be a dimensionless value (representing the magnitude of its Quantity). If no unit is specifically associated with a variable, these functions will attempt to automatically determine the units associated with the variable, based on the expression and any specified start values.

Specifying within a Quantity indicates that is a dimensionless value.
 Out[2]=
Find the time it takes for a falling body to hit the ground.
 Out[3]=
Find a local maximum, starting the search at x=2.
 Out[4]=
Find the peak height of a bullet fired from a rifle vertically, without dampening.
 Out[6]=
Find how long it takes the bullet to return to Earth.
 Out[7]=
Find the maximum height of a body shot vertically upward, with dampening.
 Out[9]=

## Related TutorialsRelated Tutorials

New to Mathematica? Find your learning path »
Have a question? Ask support »