Question 941811
[( 1 gallon ) / ( 20 mi )] x D = ( gallons used )
{{{ ( 1/20 )*D }}} = gallons used
for instance, if he travels {{{ D = 40 }}}  mi, then
( gallons used ) = {{{ 2 }}}
---------------------------
( gallons left in tank ) = ( 18 gallons ) - ( gallons used )
{{{ G = 18 - ( 1/20 )*D }}}
-----------------------
This is the equation to use, but if you have to graph it,
you need to decide which variable is dependent and
which variable is independent.
You have to choose between:
(1) G depends on D
OR
(2) D depends on G
----------------------
(1) is correct, because the gallons I have left in my tank
DEPENDS on how far I have driven
----------------------
So, G is the DEPENDENT variable, and that makes
D the INDEPENDENT variable
----------------------
The independent variable is always plotted on the 
horizontal axis
The dependent variable is always plotted on the
vertical axis
-----------------------
So, I want my equation to look like:
{{{ G = f( D ) }}}, so it is correct as shown:
{{{ G = 18 - ( 1/20 )*D }}}
Here's the plot:
{{{ graph( 400, 400, -50, 500, -10, 22, 18 - ( 1/20 )*x ) }}}
The graph looks OK
If {{{ D = 0 }}}, {{{ G = 18 }}}
If {{{ D = 360 }}}, {{{ g = 0 }}}