Urgent math help (Equation related)

Talk about just about anything else that is non-gaming here, but keep it clean
User avatar
KillerJuan77
Next-Gen
Posts: 1432
Joined: Mon Jun 06, 2011 5:01 am

Re: Urgent math help (Equation related)

Post by KillerJuan77 »

pakopako wrote:You have an error there. It should be:[*](-3x -24y/5 = -408/5) = L1
[*]L2 becomes (3x + 10y) + (-3x -24y/5) = 118 + -408/5
[*]L2 becomes 10y - 24y/5 = 118 -408/5
[*]Multiply everything by 5
[*]50y - 24y = 590-408
[*]26y = 182
[*]y = 182/26
[*]y = 7
Y=7 is about all I got from that.

This is still algebra right? I still remember bits of that.

[*]5x + 8y = 136 (L1), 3x + 10y = 118 (L2)
[*]L1 - L2 = 2x -2y = 18
[*](L1 - L2) / 2 = x - y = 9
[*]x = y + 9
[*]L2 = 3(y+9) + 10y = 118
[*]L2 = 3y + 27 + 10y = 118
[*]L2 = 13y = 91
[*]L2 = y = 7

(Gah.. no "/table" BBcode here. "Bullets! Buuulleeeets!")[/quote]

GOOD LORD :|
Image
User avatar
MrPopo
Moderator
Posts: 24194
Joined: Tue Aug 26, 2008 1:01 pm
Location: Orange County, CA

Re: Urgent math help (Equation related)

Post by MrPopo »

gtmtnbiker wrote:
MrPopo wrote:Another way to view it is that you're just using Gaussian elimination.

5x + 8y = 136 (L1)
3x + 10y = 118 (L2)

The goal is to eliminate x from the bottom equation, then y from the top equation (this generalizes for a system of n equations with n unknowns to only have the 1st term in the 1st equation, only the 2nd term in the 2nd equation, etc).

So you add -3/5 * L1 to L2. This will eliminate the x term, and it looks like this:

(-3x - 12/5y = -408/5) = L1, this is added to L2, so L2 becomes (38/5y = 182/5)
You have an error there.

It should be

(-3x -24y/5 = -408/5) = L1
L2 becomes (3x + 10y) + (-3x -24y/5) = 118 + -408/5
L2 becomes 10y - 24y/5 = 118 -408/5
Multiply everything by 5
50y - 24y = 590-408
26y = 182
y = 182/26
y = 7

Right?
Oops, good catch. You plug that back in and x = 16. The last time I touched this stuff was back in college where ugly rationals were the norm, so I didn't think twice that the solutions I'd get would look nasty.
Blizzard Entertainment Software Developer - All comments and views are my own and not representative of the company.
Ivo
Next-Gen
Posts: 3627
Joined: Tue Mar 28, 2006 11:24 am
Location: Portugal

Re: Urgent math help (Equation related)

Post by Ivo »

J T wrote: However, I've never learned Gaussian Elimination before, so it was kind of interesting to me. It doesn't seem as parsimonious to me, at least from a hand calculation standpoint. Is there any situation where Gaussian Elimination is the preferred method instead of the substitution method?
It is all basically the same. When you get into really large systems you want to automate it, so usually matrix notation is used and the matrix is worked on to make it triangular, at which point it is trivial to solve it equation by equation.

The point is that you have same number of (different) equations and unknowns, so either some of the equations are incompatible (I already excluded the redundancy case) or you can just solve it with a given method. It is trivial - just might be a bit of work to do it (and you may do a mistake from all the manual labour) but there is nothing conceptually complicated about it.

Ivo.
Hatta
Next-Gen
Posts: 4030
Joined: Tue May 06, 2008 8:33 pm

Re: Urgent math help (Equation related)

Post by Hatta »

Ivo wrote: It is all basically the same.
It really is. It's all just substitution.
We are prepared to live in the plain and die in the plain!
Post Reply