Results 1 to 10 of 10

Math Help - Who wants to do some maths for me?

  1. #1
    Newbie
    Joined
    Sep 2009
    Posts
    5

    Smile Who wants to do some maths for me?

    I need to work out a fee calculator, but i cant for the life of me figure out the equation to do it. Anyone want to show off their skills?
    The calculator works like this. The figures are approx ( a couple of dollars either way does not matter)
    Min charge $4.95. The Fee starts at $4.95 and goes up to $29.95 an so on. The fees go up depending on the amount deposited with a fee ending at the amount of F. The deposit are up to the amount in D. So each dollar amount entered goes up in scale - which varies.

    D refers to Deposit and F refers to the fee charged.
    D $700 F $29.95
    D $1000 F $32.95
    D $2000 F $33.95
    D $5000 F $55.00
    D 10,000 F $70
    D 25,000 F $160
    D 50,000 F $280
    D 75,000 F $350
    D 100,000 F $380 which is the maximum fee.

    So basically, I want field that you enter and amount into "D", the calculator has the formula already and spits out the answer of "F".

    Who's game?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Master Of Puppets
    pickslides's Avatar
    Joined
    Sep 2008
    From
    Melbourne
    Posts
    5,236
    Thanks
    28
    There is no clear relation ship between F & D in this case.

    I would create an excel sheet with a look up table to determine F for any D entered into a cell.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Sep 2009
    Posts
    5
    Hi,

    I had thought of that. I'm sure their must be an equation though.

    thanks
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Master Of Puppets
    pickslides's Avatar
    Joined
    Sep 2008
    From
    Melbourne
    Posts
    5,236
    Thanks
    28
    None that I know.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Sep 2009
    Posts
    5
    I did get this advice, but it is unfinshed and I have no way of testing it:

    Polynomials would never be a good fit: for example it must go to either -infinity or +infinity, thus violating the assumptions for min or max.

    For this question, line segments make more sense. You are given 10 data points (including (0, 4.95)): let's label them as (x_0, y_0), ..., (x_9, y_9), where (x_0, y_0) = (0, 4.95), etc.

    The slopes between (x_(i-1), y_(i-1)) and (x_i, y_i) is

    m_i = (y_i-y_(i-1))/(x_i-x_(i-1)), for i = 1, ..., 9.

    Now you can always find the function of the form:

    f(x) = sum_{i=0 to 9} a_i*|x-x_i| + b, subject to the slope condition

    a_0 - a_1 - a_2 ... - a_9 = m_1
    a_0 + a_1 - a_2 ... - a_9 = m_2
    ...
    a_0 + a_1 +... +a_8 -a_9 = m_9
    a_0 + a_1 +... +a_8 +a_9 = 0 (this last equation takes care of the slopes for x < 0, and x > x_9)

    and b is chosen so that f(0) = 4.95.

    This is a system of equation with 10x10 matrix of full rank, hence solvable. (in fact the coefficient determinant is 2^9 > 0)

    Therefore the formula does exist.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by paullovesjo View Post
    I need to work out a fee calculator, but i cant for the life of me figure out the equation to do it. Anyone want to show off their skills?
    The calculator works like this. The figures are approx ( a couple of dollars either way does not matter)
    Min charge $4.95. The Fee starts at $4.95 and goes up to $29.95 an so on. The fees go up depending on the amount deposited with a fee ending at the amount of F. The deposit are up to the amount in D. So each dollar amount entered goes up in scale - which varies.

    D refers to Deposit and F refers to the fee charged.
    D $700 F $29.95
    D $1000 F $32.95
    D $2000 F $33.95
    D $5000 F $55.00
    D 10,000 F $70
    D 25,000 F $160
    D 50,000 F $280
    D 75,000 F $350
    D 100,000 F $380 which is the maximum fee.

    So basically, I want field that you enter and amount into "D", the calculator has the formula already and spits out the answer of "F".

    Who's game?
    Try:

    F=20+500(1-e^{-0.000137P})

    CB
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Sep 2009
    Posts
    5
    Looks interesting.

    Now - how do I go about using that magical formula.

    Do you know of an online calculator I could use?

    Let say I wanted to enter $1500.00 and calculate what the fee would be. How do I use that formula?

    You may have guessed, maths wasnt one of my strongest subjects.

    Could you enlighten me?

    Thanks
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by paullovesjo View Post
    Looks interesting.

    Now - how do I go about using that magical formula.

    Do you know of an online calculator I could use?

    Let say I wanted to enter $1500.00 and calculate what the fee would be. How do I use that formula?

    You may have guessed, maths wasnt one of my strongest subjects.

    Could you enlighten me?

    Thanks
    Google will do it, enter as:

    20+500*(1-exp(-0.000137*1500))

    20+500*(1-exp(-0.000137*1500)) - Google Search

    CB
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Sep 2009
    Posts
    5
    I got this from a maths guru. Unfortunately, he cant fathom how I dont understand it.

    Does anyone know how I would enter this into a google calculator and where i would enter say $32,000 into the equation so that I get an answer to the equation?

    Alright, if you solve the system of equations I mentioned earlier (either by hand or by using a calculator, say TI83 or TI84), you get the following numbers (there may be rounding error for the numbers listed below):
    a_0 = 0.017857
    a_1 = -0.01286
    a_2 = -0.0045
    a_3 = 0.003008
    a_4 = -0.00201
    a_5 = 0.0015
    a_6 = -0.0006
    a_7 = -0.001
    a_8 = -0.0008
    a_9 = -0.0006
    Therefore the formula for the function is (denoting square root by sqrt)
    f(x) = 0.017857*sqrt((x-0)^2) -0.01286*sqrt((x-700)^2) -0.0045*sqrt((x-1000)^2) +0.003008*sqrt((x-2000)^2) -0.00201*sqrt((x-5000)^2) +0.0015*sqrt((x-10000)^2) -0.0006*sqrt((x-25000)^2) -0.001*sqrt((x-50000)^2) -0.0008*sqrt((x-75000)^2) -0.0006*sqrt((x-100000)^2) + b.
    To determine b, substitute 0 for x, since f(0) = 4.95, you get b = 192.475.
    In conclusion the sought for formula is
    f(x) = 0.017857*sqrt((x-0)^2) -0.01286*sqrt((x-700)^2) -0.0045*sqrt((x-1000)^2) +0.003008*sqrt((x-2000)^2) -0.00201*sqrt((x-5000)^2) +0.0015*sqrt((x-10000)^2) -0.0006*sqrt((x-25000)^2) -0.001*sqrt((x-50000)^2) -0.0008*sqrt((x-75000)^2) -0.0006*sqrt((x-100000)^2) + 192.475.
    I have checked the formula in Excel, it works well, since the rounding error is negligible.
    To avoid rounding error, you could obtain those a_i by the following formulas, which I have solved for you
    a_0 = m_1/2,
    a_1 = (m_2-m_1)/2
    a_2 = (m_3-m_2)/2
    a_3 = (m_4-m_3)/2
    a_4 = (m_5-m_4)/2
    a_5 = (m_6-m_5)/2
    a_6 = (m_7-m_6)/2
    a_7 = (m_8-m_7)/2
    a_8 = (m_9-m_8)/2
    a_9 = -m_9/2,
    where m_i is the slope of the line joining (x_(i-1), y_(i-1)) to (x_i, y_i) for i = 1, 2, ..., 9. (For example, (x_0, y_0) = (0, 4.95), (x_1, y_1) = (700, 29.95), hence m_1 = (29.95 - 4.95)/(700 - 0), etc.)
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by paullovesjo View Post
    I got this from a maths guru. Unfortunately, he cant fathom how I dont understand it.

    Does anyone know how I would enter this into a google calculator and where i would enter say $32,000 into the equation so that I get an answer to the equation?

    Alright, if you solve the system of equations I mentioned earlier (either by hand or by using a calculator, say TI83 or TI84), you get the following numbers (there may be rounding error for the numbers listed below):
    a_0 = 0.017857
    a_1 = -0.01286
    a_2 = -0.0045
    a_3 = 0.003008
    a_4 = -0.00201
    a_5 = 0.0015
    a_6 = -0.0006
    a_7 = -0.001
    a_8 = -0.0008
    a_9 = -0.0006
    Therefore the formula for the function is (denoting square root by sqrt)
    f(x) = 0.017857*sqrt((x-0)^2) -0.01286*sqrt((x-700)^2) -0.0045*sqrt((x-1000)^2) +0.003008*sqrt((x-2000)^2) -0.00201*sqrt((x-5000)^2) +0.0015*sqrt((x-10000)^2) -0.0006*sqrt((x-25000)^2) -0.001*sqrt((x-50000)^2) -0.0008*sqrt((x-75000)^2) -0.0006*sqrt((x-100000)^2) + b.
    To determine b, substitute 0 for x, since f(0) = 4.95, you get b = 192.475.
    In conclusion the sought for formula is
    f(x) = 0.017857*sqrt((x-0)^2) -0.01286*sqrt((x-700)^2) -0.0045*sqrt((x-1000)^2) +0.003008*sqrt((x-2000)^2) -0.00201*sqrt((x-5000)^2) +0.0015*sqrt((x-10000)^2) -0.0006*sqrt((x-25000)^2) -0.001*sqrt((x-50000)^2) -0.0008*sqrt((x-75000)^2) -0.0006*sqrt((x-100000)^2) + 192.475.
    I have checked the formula in Excel, it works well, since the rounding error is negligible.
    To avoid rounding error, you could obtain those a_i by the following formulas, which I have solved for you
    a_0 = m_1/2,
    a_1 = (m_2-m_1)/2
    a_2 = (m_3-m_2)/2
    a_3 = (m_4-m_3)/2
    a_4 = (m_5-m_4)/2
    a_5 = (m_6-m_5)/2
    a_6 = (m_7-m_6)/2
    a_7 = (m_8-m_7)/2
    a_8 = (m_9-m_8)/2
    a_9 = -m_9/2,
    where m_i is the slope of the line joining (x_(i-1), y_(i-1)) to (x_i, y_i) for i = 1, 2, ..., 9. (For example, (x_0, y_0) = (0, 4.95), (x_1, y_1) = (700, 29.95), hence m_1 = (29.95 - 4.95)/(700 - 0), etc.)
    Now why do I think that is linear interpolation between the tabulated values?

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Should I buy maths books to teach myself maths.
    Posted in the Math Topics Forum
    Replies: 2
    Last Post: November 21st 2011, 03:45 PM
  2. Help me with my grade 11 maths [easy maths]
    Posted in the Pre-Calculus Forum
    Replies: 11
    Last Post: December 27th 2009, 03:09 PM
  3. Maths help.
    Posted in the Algebra Forum
    Replies: 2
    Last Post: October 29th 2009, 07:17 AM
  4. Replies: 0
    Last Post: September 5th 2007, 02:50 AM
  5. Replies: 1
    Last Post: October 3rd 2006, 08:59 AM

Search Tags


/mathhelpforum @mathhelpforum