Results 1 to 13 of 13
  1. #1
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    I need help creating/solving a formula

    I have so much gold and need to buy two items to craft something, I want to know how much of each I can buy if I need one of each for the synth.

    I know price(x)+price(y)=gold will give me the maximum I can buy of both, but two problems, I forgot how to solve this equation (Yeah I know >_>) and also that doesnt take into account I need one of each

    I guess the first step is remembering how to solve it, I remember there are three ways to do it, two of them being substitution and I dont remember the name of the other one, but it was like canceling them out but it doesnt really work for complicated equations.

    x=(gold-price(y))/(price of x)

    Then substitute into the original equation right?

    price of x((gold-price(y))/(price of x))+price(y)=gold

    And that's solvable... I think?
    If that's right, then I just forgot basic principles of math and need help solving because I'm obviously doing something very wrong

    100x+50y=500
    x=(500-50y)/100

    100((500-50y)/100)+50y=500
    (50000-5000y)/100)+50y=500
    500-50y+50y=500
    ...wait what 1=1

    Wait I think I remembered something

    I have to solve to go back and create a formula for y an substitute x into that to solve for x then substitute that into the original problem to find y I think. Man this would've been simpler if I could remember what kind of problem this was to look up examples.

    100x+50y=500
    x=(500-50y)/100
    y=(500-100x)/50

    x=(500-50((500-100x)/50))/100
    x=(500-500-100x))/100
    x=(-100x))/100
    x=-x

    ......wait what I'm so terrible I cant remember shit

    After I remember how to solve this fucking thing (or even if I did the formula right) it'll show how much I can buy of each optimally but not take into account how much of each I need so my next step after that will be to manipulate the formula for one of each then that should even be easily manipulated to create a formula if I have a synth that requires different amounts of each item

  2. #2
    Ridill
    Join Date
    Oct 2006
    Posts
    18,369
    BG Level
    9
    FFXIV Character
    Sath Fenrir
    FFXIV Server
    Cactuar
    FFXI Server
    Fenrir

    10x = 500
    x = 50 @ 10 each
    50y = 500
    y = 10 @ 50 each
    price: x/y = 1/5
    buy 1 y for every 5 x
    5 * 1y = 250
    5 * 5x = 250


    Not really a straight forward problem but the ratio then plug in numbers usually works.

  3. #3
    CustomTitle
    Banned for Duping
    HOT LITTLE SNATCH

    Join Date
    Feb 2007
    Posts
    7,994
    BG Level
    8
    FFXIV Character
    Jam Valesti
    FFXIV Server
    Leviathan

    Run. Escape.

  4. #4
    Canadian Fury
    MANITOBA IS NOT A REAL PLACE

    Join Date
    Jun 2008
    Posts
    1,089
    BG Level
    6
    FFXI Server
    Valefor

    RUUUUUNESCAAAAAAPE

  5. #5
    Old Merits
    Join Date
    Sep 2006
    Posts
    1,010
    BG Level
    6

    Quote Originally Posted by SathFenrir View Post
    10x = 500
    x = 50 @ 10 each
    50y = 500
    y = 10 @ 50 each
    price: x/y = 1/5
    buy 1 y for every 5 x
    5 * 1y = 250
    5 * 5x = 250


    Not really a straight forward problem but the ratio then plug in numbers usually works.
    ur gay

  6. #6
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Quote Originally Posted by SathFenrir View Post
    10x = 500
    x = 50 @ 10 each
    50y = 500
    y = 10 @ 50 each
    price: x/y = 1/5
    buy 1 y for every 5 x
    5 * 1y = 250
    5 * 5x = 250


    Not really a straight forward problem but the ratio then plug in numbers usually works.
    This could potentially be useful. I dont know yet if I can make it take into account what numbers of each item I need it to though.

  7. #7
    Salvage Bans
    Join Date
    Apr 2009
    Posts
    772
    BG Level
    5
    FFXI Server
    Bahamut

    Numbers all up in this bitch.

  8. #8
    Salvage Bans
    Join Date
    Apr 2009
    Posts
    772
    BG Level
    5
    FFXI Server
    Bahamut

    btw why are you selling gil?

  9. #9
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    What

  10. #10
    Hydra
    Join Date
    Jun 2010
    Posts
    106
    BG Level
    3
    WoW Realm
    Nesingwary

    Quote Originally Posted by #686578 View Post
    Blah blah math crap.
    Well, given the numbers here the answer would be 4 of Y and 3 of X (just by plugging in numbers and seeing which gave the most) but I totally forgot how to solve it legitimately. I think it involves calculus.

    Edit: google ftw.
    http://tutorial.math.lamar.edu/Class...imization.aspx

  11. #11
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Wow I just woke up so a lot of this isnt making sense. I also dont remember this being calculus level but this is definitely the same kind of problem lol

    Thanks a lot for finding that, I couldnt remember what kind of equation it was for the life of me or else I would've googled it myself.

    Gonna have to read the rest of this later. My calculus class was terrible and never even taught us derivatives so I'm going to have to actually have to learn something new it looks like lol...

  12. #12
    Hydra
    Join Date
    Jun 2010
    Posts
    106
    BG Level
    3
    WoW Realm
    Nesingwary

    To do a derivative, all you do is multiply each chunk of an equation (separated by addition/subtraction) by it's variable's exponent, and then decrease the exponent by one, anything without a variable goes to 0. So, the derivative of 4x^2 would be 8x. Derivative of 8x is 8. Derivative of 8 is 0.

    Putting this into practice, the derivative of 5x^2 + 3x + 8 is 10x + 3.

    In this case the hardest part is the maximize function. I can't figure out what the formula is for something where x must = y for a unit to be made. Once you get that part it's pretty much cake. The constraint is 100x+50y=500.

  13. #13
    Ridill
    Join Date
    Oct 2006
    Posts
    18,369
    BG Level
    9
    FFXIV Character
    Sath Fenrir
    FFXIV Server
    Cactuar
    FFXI Server
    Fenrir

    So I took another look at what I wrote last night and I see where I fucked up. You don't need Calculus.

    Gonna use retarded numbers for emphasis:
    item 1: 1,172g
    item 2: 292g
    Total gil: 100,000g
    Divide the larger number into 100,000. This is your upper bound:
    UB: 85.3

    1172x + 292y = 100,000
    y = 85.3 - x

    ***EQ1***
    1172x +292(85.3 - x) = 100,000
    1172x + 24,907.6 - 292x = 100,000
    880x = 75,092.4
    x = 85.3 (the upper bound)

    ***EQ2***
    1172x + 292(85.3 + x) = 100,000
    1172x + 24,907.6 + 292x = 100,000
    1464x = 75,092.4
    x=51.3

    A(85.3) + B(51.3) = 136.6
    136.6 / 2 = 68.3

    68.3 * 1172 = 80,047'6
    68.3 * 292 = 19,943.6
    = 99,991.2 gil

    Round it down to 68. You can buy 68 of each at 1,172 for A and 292 for B.

    I dunno why that took my brain so long to churn out.