Suppose the progressive table form looks like this:
gross income % to be applied ---------------------------------------------- =< 1,000.00 0% > 1,000.00 and =< 1,500.00 10% > 1,500.00 25% ----------------------------------------------Thus:
* If the monthly gross income is US$800.00, the individual pays no tax;
* If it is US$1,200.00, he pays nothing over the first US$1,000.00 plus 10% of US$200.00 (US$1,200.00 - US$1,000.00), a total tax of US$20.00;
* If it is US$1,800.00, he pays nothing over the first US$1,000.00, plus 10% over US$500,00 (US$1,500.00 - US$1,000.00) plus 25% over US$300.00 (US$1,800.00 - US$1,500.00), a total tax of US$125.00.
Write a single math expression, function of those parameters, which gives the value of the tax to be paid.