Serving the Quantitative Finance Community

 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Stupid question of the day

December 5th, 2015, 7:34 pm

There's also manually solving the 2 equations in two unknowns:B = A - 38 by the 2nd eqn;A = 76 - B by the 1st eqn;B = 76 - B - 38 getting an eqn in B alone to get B.2B = 38B = 19A = 76-B = 76-19 = 57A/B = 57/19 = 3
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Stupid question of the day

December 5th, 2015, 7:35 pm

QuoteOriginally posted by: Traden4AlphaThere's also manually solving the 2 equations in two unknowns:B = A - 38 by the 2nd eqn;A = 76 - B by the 1st eqn;B = 76 - B - 38 getting an eqn in B alone to get B.2B = 38B = 19A = 76-B = 76-19 = 57A/B = 57/19 = 3Gauss Elimination, yippee. //You can solve it as a 2X2 matrix systemM y = 0, y = (A,B) and determinant (M) = -2. => y = 0 => A = B = 0.
Last edited by Cuchulainn on December 4th, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Stupid question of the day

December 5th, 2015, 7:40 pm

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: Traden4AlphaThere's also manually solving the 2 equations in two unknowns:B = A - 38 by the 2nd eqn;A = 76 - B by the 1st eqn;B = 76 - B - 38 getting an eqn in B alone to get B.2B = 38B = 19A = 76-B = 76-19 = 57A/B = 57/19 = 3Gauss Elimination, yippee.I recommend Taylor series for this problem!
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Stupid question of the day

December 5th, 2015, 8:14 pm

QuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: Traden4AlphaThere's also manually solving the 2 equations in two unknowns:B = A - 38 by the 2nd eqn;A = 76 - B by the 1st eqn;B = 76 - B - 38 getting an eqn in B alone to get B.2B = 38B = 19A = 76-B = 76-19 = 57A/B = 57/19 = 3Gauss Elimination, yippee.I recommend Taylor series for this problem!That's not very discrete.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Stupid question of the day

December 5th, 2015, 8:22 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunA+B=2C!C is not defined.sorry, this then:2C = A+B?but you don't need to know C, it all cancels out:A+B=2CA-B=C(A+B) + (A-B) = 2A = 3C(A+B) - (A-B) = 2B = CA:B = 2A:2B = 3C:C = 3Your C is my x. And it may NOT be 0.YES is may: L'HôpitalUnfortunately1. A = B = 0 in that case, so no (result is undefined).2. A and B are integers, Hospital's is in the limit of real numbers. No derivative possible.You can solve it as a 2X2 matrix systemM y = 0, y = (A,B) and determinant (M) = -2. => y = 0 => A = B = 0.My f(C) = 3C/C is a real valued function whose solution is the solution to the problem. In this case the solution is indeed an integer, 3, -for all C including C=0-. Also, it's nowhere stated that A:B should be integer. If the first line was A+B=77 then it wouldn't have been, right? And you would have given the non integer solution I expect instead of saying that it has no solution.I see. OK, let's call C >x because x is a real. Now we can use Taylor etc.Could you take us through the steps up to f(x) = 3x/x? Then it should be clear. ==and A + B = 0A - B = 0/2 = 0A = ? , B = ?
Last edited by Cuchulainn on December 4th, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Stupid question of the day

December 5th, 2015, 10:40 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunA+B=2C!C is not defined.sorry, this then:2C = A+B?but you don't need to know C, it all cancels out:A+B=2CA-B=C(A+B) + (A-B) = 2A = 3C(A+B) - (A-B) = 2B = CA:B = 2A:2B = 3C:C = 3Your C is my x. And it may NOT be 0.YES is may: L'HôpitalUnfortunately1. A = B = 0 in that case, so no (result is undefined).2. A and B are integers, Hospital's is in the limit of real numbers. No derivative possible.You can solve it as a 2X2 matrix systemM y = 0, y = (A,B) and determinant (M) = -2. => y = 0 => A = B = 0.My f(C) = 3C/C is a real valued function whose solution is the solution to the problem. In this case the solution is indeed an integer, 3, -for all C including C=0-. Also, it's nowhere stated that A:B should be integer. If the first line was A+B=77 then it wouldn't have been, right? And you would have given the non integer solution I expect instead of saying that it has no solution.I see. OK, let's call C >x because x is a real. Now we can use Taylor etc.Could you take us through the steps up to f(x) = 3x/x? Then it should be clear.Ok,So I noticed that the numbers after the equal sign had a nice relation, one of them (76) is twice the other (38). So (using your notation) I call one x and the other 2x. I then eliminate thing for the generic solution when one number is twice the other. Turns out that for all those case the solution to A:B is 3. So if the first eq said A+B=6.28 and the 2nd A-B=3.14 then A:B would also be 3 (but that's irrelevant because it's not saying that)What you and I do is first generalize the problem (it has one solution, but we introduce variables) and show that the generalized problem has one solution. If I had said A+B=2x^2 and A-B=|x|^2 then I would have had to do more work to find the only good solution.A=B=0 is not a solution of the original problem, I don't make A and B variables. I think the only assumptions I make about the A,B symbols are that D-D=0 and D+D=2D (substitute D with A or B), so my method would also work if A and B are matrices is seems! It's not a goal, just a property of the chosen generalization. Different generalization can solve different *other* problems too, but that doesn't matter and it's irrelevant.Indeed! A and B are nuisance variables. Gauss Elimination on the general form of the problem (A+B=X; A-B=Y, find A/B) yields a very satisfying answer of (X+Y)/(X-Y) which is 3 for the numbers given.Also, a clever person (which I was not!) would notice the linearity of the system. Thus, one can scale the "76" and "38" by any common constant without affecting the result. From an mental arithmetic standpoint, solving the A+B=2, A-B = 1 lets one avoid two-digit math.
Last edited by Traden4Alpha on December 5th, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
trackstar
Posts: 3420
Joined: January 1st, 1970, 12:00 am

Stupid question of the day

December 5th, 2015, 11:31 pm

Wouldn't it be nice if C was pi?I think you could reverse engineer that! Certainly easy enough to obtain 3pi.
Last edited by trackstar on December 5th, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Stupid question of the day

December 6th, 2015, 12:11 am

QuoteOriginally posted by: trackstarWouldn't it be nice if C was pi?I think you could reverse engineer that! Certainly easy enough to obtain 3pi.Here you go!A+B = 6*arctan(1)+0.5A-B = 6*arctan(1)-0.5Find A/B.........
 
User avatar
trackstar
Posts: 3420
Joined: January 1st, 1970, 12:00 am

Stupid question of the day

December 6th, 2015, 12:17 am

QuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: trackstarWouldn't it be nice if C was pi?I think you could reverse engineer that! Certainly easy enough to obtain 3pi.Here you go!A+B = 6*arctan(1)+0.5A-B = 6*arctan(1)-0.5Find A/B.........Beautiful - this made my night! :DMay the Gods of the Western Microbreweries smile upon you!
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Stupid question of the day

December 6th, 2015, 9:33 am

A + B = xA - B = x/2(A+B)/(A-B) = 2(y+1)/(y-1) = 2 where y = A/BSolve this nonlinear equation using least squares.
Last edited by Cuchulainn on December 5th, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Stupid question of the day

December 6th, 2015, 9:43 am

QuoteOriginally posted by: trackstarQuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: trackstarWouldn't it be nice if C was pi?I think you could reverse engineer that! Certainly easy enough to obtain 3pi.Here you go!A+B = 6*arctan(1)+0.5A-B = 6*arctan(1)-0.5Find A/B.........Beautiful - this made my night! :DMay the Gods of the Western Microbreweries smile upon you!You called, your highness?
Last edited by Cuchulainn on December 5th, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
ppauper
Posts: 11729
Joined: November 15th, 2001, 1:29 pm

Stupid question of the day

December 6th, 2015, 11:33 am

[$]\pmatrix{1&1\cr 1&-1}\pmatrix{A\cr B}=\frac{x}{2}\pmatrix{2\cr 1}\\\pmatrix{A\cr B}=\frac{x}{4}\pmatrix{1&1\cr 1&-1}\pmatrix{2\cr 1}=\frac{x}{4}\pmatrix{3\cr 1}[$]
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Stupid question of the day

December 6th, 2015, 1:14 pm

The formulas for creating the general version of this ratio problem are nicely symmetric for the two ratio involved:If (A+B)/(A-B) = r1, then A/B = (r1+1)/(r1-1).If A/B = r2, then (A+B)/(A-B) = (r2+1)/(r2-1).