的士收費數學問題

2010-03-07 6:09 am
市區的士實施「短加長減」的收費 , 首兩公里收費為18元(即起錶18元) , 其後每五分之一公里跳錶一次 , 每跳錶加1.5元 , 70.5元後每跳錶減到1元 , 假設不須考慮等候時間及其他收費,請計算乘的士行車 n公里的收費 。如何n term 形式列出???
更新1:

可唔可以寫出 computer programming language mathematical language and excel formula 3條formula ... thx mathematical 果個一定無可能寫在一條式?

更新2:

thanks for help~!

回答 (2)

2010-03-17 3:38 pm
✔ 最佳答案
我相信發問者最想要的是一條過的function。

2010-03-12 07:33:45 補充:
一條過的function是絕對可行的,只不過樓上果位叫匿名的人似乎沒有足夠的智慧可以做到。

2010-03-12 07:55:31 補充:
首先當的士是連續地跳錶的:

於是我們便可輕易地求得該三段直線的function,正如樓上果位叫匿名的人做到的事。

接著下來就是最精彩的事,把該三段直線的function合併成一個function。

首先,對絕對值函數有較深入地認識的人,可能都會知道對於一個有n條邊且不會直向和反方向地發展的開口多邊形,其函數的形式一定是a_0 x + b_0 + Σ(k = 1 to n - 1) ±│a_k x + b_k│這樣式。

因此,對於這題來說,其函數的形式是An + B ±│Cn + D│±│En + F│,然後找適當的A,B,C,D,E,F和加減號組合。

2010-03-12 08:14:06 補充:
最後就要把該函數調整成一級級。

由於的士未行夠五分之一公里的倍數的距離是不會跳錶的,所以不是五分之一公里的倍數的距離的收費是之前五分之一公里的倍數的距離的收費,這正是高斯函數的概念,因此我們可以用高斯函數進行調整。

2010-03-17 07:38:14 補充:

圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction0.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction1.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction2.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction3.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction4.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction5.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction6.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction7.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction8.jpg


圖片參考:http://i212.photobucket.com/albums/cc82/doraemonpaul/yahoo_knowledge/crazyfunction/taxifarefunction9.jpg

參考資料:
my wisdom of maths
2010-03-08 4:54 pm
obviously, it is not a continuous function

let $X be the taxi fare in terms of n kilometre(s)

$X = f(n) = $0 if n <=0
= $18 if 0 < n <= 2
= $18 + [(n - 2) x $1.5] x 5 = $18 + (n - 2) x $7.5 if 2 < n <= 9
= $70.5 + [(n - 9) x $1.0] x 5 = $70 + (n - 9) x $5.0 if n > 9

Hence, when we plot $X against n km, we have:

it is level at $18 between n = 0 and 2
it then climb up sharply from $18 to $70.5 between n = 2 and 9 with slope $7.5 / km
after that, it climb up from $70.5 starting from n = 9 with slope $5.0 / km to infinity

2010-03-10 08:42:44 補充:
It seems that it is not possible to have an one single formula, without any function with "if ... then ..."

or we could use some "truncation" funcation or "mod" funcation in computer language, but not just one simple mathematical funcation.

2010-03-10 08:44:05 補充:
alan5q2005, when you are talking about 如何n term 形式列出, what language would you use?

computer programming language or mathematical language, or excel formula, etc.

2010-03-12 08:42:57 補充:
so doraemonpaul, can you work it out? What A, B, C, D, E, & F are?


收錄日期: 2021-04-23 18:24:36
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20100306000051KK01637

檢視 Wayback Machine 備份