My Math Forum Renting a car

 Algebra Pre-Algebra and Basic Algebra Math Forum

 September 17th, 2012, 07:43 AM #1 Newbie   Joined: May 2012 Posts: 17 Thanks: 0 Renting a car I have a tricky math question regarding renting car. I have to find a function that can describe the following situation. A car rental agency charges a fee of 40$for renting a car. The first 100 miles are for free, but after you exceed 100 miles, you have to start paying an extra 0.34$ per mile. The key says the answer should be: $y=40+(x-100)\cdot0.34$ But if you drive say 50 miles, you only have to pay 23$, although the fee was 40$. The function above says that if you drive less than 100 miles, you will pay less then the 40$start fee, which should not be possible. The problem is to find a function that will give $y=40$, When $0\leq x\leq100$ but when $x>100$ gives you the total amount you have to pay, 40$ fee + 0.34$/mile after 100 miles. The function I'm looking for should be flat at 40$ the first 100 miles, but after 100 miles start to move up like a linear function. That is to say if you enter x=50 in the function you should get y=40$, and not 23$ All I get is this function below, although it is not complete. Their shoud be a flat line at 40\$ the first 100 miles, and then move like the graph I have below. If you plot it you will see what I mean. $y=40+(\sqrt{(x-100)^2})\cdot0.34$ I'm really thankful if somebody could help me find this function.
 September 17th, 2012, 07:53 AM #2 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,211 Thanks: 521 Math Focus: Calculus/ODEs Re: Renting a car You could use a piecewise defined function: $y(x)=\begin{cases} 40 && 0\le x\le100 \\ 40+0.34(100-x) && 100 \end{cases}$
 September 17th, 2012, 08:37 AM #3 Global Moderator   Joined: Dec 2006 Posts: 20,973 Thanks: 2224 Or y = 40 + .17(x - 100 + |x - 100|), for x ? 0.
September 17th, 2012, 09:46 AM   #4
Newbie

Joined: May 2012

Posts: 17
Thanks: 0

Re: Renting a car

I was also thinking of a piecewise defined function, but I'm looking for one function that incorporates all x-values without making any definitions for the x-values and y-values.

The function I'm looking for should give a graph that lookes like the graph in the attached image file.

Is it even possible to make such a function?
Attached Images
 renting car.jpg (12.8 KB, 111 views)

 September 17th, 2012, 09:54 AM #5 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,211 Thanks: 521 Math Focus: Calculus/ODEs Re: Renting a car [color=#008000]skipjack[/color] cleverly gave you such a function using absolute value.
 September 17th, 2012, 10:10 AM #6 Newbie   Joined: May 2012 Posts: 17 Thanks: 0 Re: Renting a car Oh sorry, I didn't really know what absolute values were, until you (MarkFl) pointed it out. I looked up what absolute values are about, and I now understand what skipjack meant. One learns something new every day! So once again I would like to thank skipjack and MarkFL for your answers.

 Tags car, renting

 Thread Tools Display Modes Linear Mode

 Contact - Home - Forums - Cryptocurrency Forum - Top