
Edward A. answered 02/19/18
Tutor
4.9
(17)
Math Tutor, Retired Computer Scientist and Technical Communicator
Writing the equation as y = Mx + b
lets see what we already know.
M is how many Rs per km. The problem says that is 5 Rs/km.
So we can start with y = 5x + b
what is the value of b?
Find out by putting in 0 km.
As soon as you step in the taxi, y = 12 Rs., So b = 12.
now we have y = 5x + 12
But it’s wrong, because the fare is 12 for x =0, x=1, and x=2.
Also, those first two kilometers are free, it‘s only km beyond two that cost.
so let’s change it to y = 5(x-2) + 12
This is now accurate for x=2 and above, but still not accurate for x<= 2.
So the function is really
y = 12 , x<= 2
y = 5(x-2) + 12, x>2
so this function is not linear, it is “piecewise linear”. I’ll bet you know how to graph it.