How to solve y
= a*x^2 + b*x + c for x for when y is not necessarily zero. We can solve for x algebraically using various methods.

**Method 1: Completing the Square**

y = a*x^2 +
b*x + c

Divide both
sides by a:

y/a = x^2 +
b/a * x + c/a

Add b^2/(4*a^2) to both sides.

Note that (x
+ b/(2*a))^2 = x^2 + b/a * x + b^2/(4*a^2).

y/a +
b^2/(4*a^2) = x^2 + b/a * x + b^2/(4*a^2) + c/a

y/a +
b^2/(4*a^2) = (x + b/(2*a))^2 + c/a

y/a +
b^2/(4*a^2) – c/a = (x + b/(2*a))^2

Solving for x
gives:

x + b/(2*a)
= ±√( y/a + b^2/(4*a^2) – c/a )

x = b/(2*a) ±√(
y/a + b^2/(4*a^2) – c/a )

**Method 2: Quadratic Formula**

The quadratic
formula requires that the polynomial is equal to zero. Hence:

y = a*x^2 +
b*x + c

0 = a*x^2 +
b*x + c – y

The constant
term is c – y. By the quadratic formula:

x = (-b ± √(b^2
– 4*a*(c-y))/(2*a)

x = (-b ± √(b^2
– 4*a*c + 4*a*y))/(2*a)

In the term
with the square root, divide b^2 – 4*a*c + 4*a*y by 4*a^2:

x = (-b ± √(b^2/(4*a^2)
– c/a + y/a))/(2*a)

Hope this helps,

Eddie

This blog is
property of Edward Shore. 2014.

I remember when I first derived the quadratic formula several years ago and it felt good that I could do that.

ReplyDeleteOn the last line you have ..../(2*a). Since you move that inside the square root I don't think it is needed anymore.