How to Create an Equation for Handling Charges Based on Computer Cost

  • Thread starter Thread starter stufine
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
stufine
Messages
2
Reaction score
0
I can't figure this one out. It sounds simple but I can't get anything to work.

If a computer costs 300-399 charge 2.00 handling charge.
If a computer costs 400-499 charge 2.50 handling charge.
If a computer costs 500-599 charge 3.00 handling charge.

So for every hundred add $.50.

$1-$100 add .50
$101-$200 add 1.00
$201-$299 add 1.50

So part of the equation could be 2.00+.5x this part will work if I can get x to equal 1,2,3.

As you can see I am completely confused on how to do this. Any help will be appreciated.
 
Physics news on Phys.org
First of all, you should decide what y and x should be. Y is dependent of what x is. Is y the handling charge or the total price? What will x be in that case?
 
The "equation" for this is actually going to be discontinuous. When x goes from 399 to 400, y jumps from 2.00 to 2.50.

These kinds of equations cannot be cast in the form y = ax + b, because of those discontinuities.

The best way to describe this relationship would be to use a piecewise function. Do you know what those are?

- Warren
 
I don't know what piecewise functions are. I will look up what they are and see if I can figure it out. Any pointers you could give would be very appreciated.