• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Can someone help me with my math?

Status
Not open for further replies.
Level 6
Joined
Oct 6, 2005
Messages
203
Hah, quite an ironic title considering I usually understand math well.

Does anyone understand how the quadratic formula ((-b)+/-SQRT(b^2-4ac))/(2a) works?

How and why does this work? I've tried to figure it and checked a few places on line but I never really understand them. Thanks to anyone who trys to assist.
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
So you have a quadratic equation (not considering the 'b' parameter):

f(x) = a(x-h)2 + k
Let's solve for the roots:
0 = a(x-h)2 + k
-k/a = (x-h)2
± √(-k/a) = x - h
h ± √(-k/a) = x

Now we can simply substitute in the values for h and k, considering their equivalents to the f(x) = ax2 + bx + c quadratic formula:
f(x) = a(x-h)2 + k
f(x) = a(x2 - 2hx + h2) + k
f(x) = ax2 - 2ahx + ah2 + k

We know that b is the linear term, therefore:
-2ah = b
h = -b/2a

We know that c is the constant term, therefore:
c = ah2 + k
k = c - ah2
k = c - ab2/4a2
k = (4ac - b2)/4a

Substituting those two values in the quadratic root formula gives:
h ± √(k/a) = x
-b/2a ± √(-(4ac - b2)/4a/a) = x
-b/2a ± √((b2 - 4ac)/4a2) = x
-b/2a ± √(b2 - 4ac)/2a = x
(-b ± √(b2 - 4ac))/2a = x

There 'ya go! :D
 
Level 6
Joined
Oct 6, 2005
Messages
203
... where the hell did k come from? By the way, 0 = ax^2+bx+c... right? Not f(x)...?

Er thanks for trying, can anyone explain it for a n00b :)?
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
k is the vertical translation of the f(x) function from the summit of the parabola, whereas c is the vertical translation of f(x) from the Y axis intersection.

h is the horizontal translation of f(x) from the summit of the parabola.

Here is the role of all parameters:
(x, y) -> (x + h, ay + k)

So let's say you have this function : g(x) = 2(x - 1)2 + 3
From the regular parabola f(x) = x2, here are a few transformed points:
(0, 0) -> (0 + 1, 2*0 + 3) = (1, 3)
(1, 1) -> (1 + 1, 2*1 + 3) = (2, 5)
(2, 4) -> (2 + 1, 2*4 + 3) = (3, 11)
(3, 9) -> (3 + 1, 2*9 + 3) = (4, 21)

I'd plot the graphs but I'm too lazy.
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
For a n00b like myself, I just accept that it works. I used the shit out of it this year. It's a pretty rad formula.
 
Level 6
Joined
Oct 6, 2005
Messages
203
With you Gilles now... who could've thought it would be so long and confusing.

At any rate, Thanks heaps for trying HINDYhat but I really don't understand.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
ƒ (proper symbol) is just a function, which takes a parameter x.

The value of ƒ(x) (ƒ at some value x in this case) is just the same thing as you would write the value of y to be equal in a y= equation. Basically, if you have ƒ(x) = 3x + 5 anywhere, and somewhere else ƒ(x) is written, ƒ(x) could be replaced with 3x + 5.

http://en.wikipedia.org/wiki/Function_(mathematics)
 
Status
Not open for further replies.
Top