Mixing units with functions or derivatives?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 1K views
christian0710
Messages
407
Reaction score
8
Hi,
How do you correctly use units when writing derivatives and functions in math?

Example

A car goes 17miles per gallon, so a function m with the equation m(g)=17g describes the distance it can go with g gallons.

And the derivative dm/dg = 17 miles/gallon. Question: could you write the equation as m(g)=17(miles/gallon)*g or is that incorrect?
 
Physics news on Phys.org
christian0710 said:
Hi,
How do you correctly use units when writing derivatives and functions in math?

Example

A car goes 17miles per gallon, so a function m with the equation m(g)=17g describes the distance it can go with g gallons.

And the derivative dm/dg = 17 miles/gallon.Question: could you write the equation as m(g)=17(miles/gallon)*g or is that incorrect?
Your question is confusing. It looks like you are asking is m(g)=17g correct, if m(g)=17g, except you are writing a label for 17?
 
When you are defining a variable, you can give it its unit right away or not.
So if you say ##m## is the distance the car can drive, then the variable ##m## has already contained the unit, maybe miles. So you should write:$$m=17mile/gallon\cdot g.$$You can see here my ##g## has also contained its unit: gallon, but 17 not, so then I write 17mile/gallon in the equation.
By the way, we seldom use ##m## to represent the distance because it is more often used to say mass, but it doesn't matter while it just depends on one's habits.
 
  • Like
Likes   Reactions: christian0710
It should be evident that if m is a distance, measured in miles, and g is a quantity of gasoline, measured in gallons, then in order that "m (miles)= k g(gallons) make sense, k must be in "miles per gallon" so that (k miles/gallon)(g gallons)= kg miles.