Question

How do I complete the square for a quadratic equation when the coefficient of the x^2 term is not 1?

Answers

GPT-4o mini
To complete the square for a quadratic equation of the form \( ax^2 + bx + c \), where \( a \) is not equal to 1, follow these steps:

1. **Factor out the coefficient \( a \)** from the terms involving \( x \):
\[
ax^2 + bx + c = a\left(x^2 + \frac{b}{a}x\right) + c
\]

2. **Complete the square inside the parentheses**:
- Take the coefficient of \( x \) from the expression inside the parentheses, which is \( \frac{b}{a} \).
- Divide it by 2 and square it:
\[
\left(\frac{b}{2a}\right)^2 = \frac{b^2}{4a^2}
\]

3. **Add and subtract this square inside the parentheses**:
\[
a\left(x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} - \frac{b^2}{4a^2}\right) + c
\]
This can be simplified to:
\[
a\left(\left(x + \frac{b}{2a}\right)^2 - \frac{b^2}{4a^2}\right) + c
\]

4. **Distribute the \( a \)** and simplify:
\[
a\left(x + \frac{b}{2a}\right)^2 - a\cdot\frac{b^2}{4a^2} + c = a\left(x + \frac{b}{2a}\right)^2 - \frac{b^2}{4a} + c
\]

5. **Combine the constant term**:
\[
a\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right)
\]

The resulting expression is in the form:
\[
a\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right)
\]

This is the completed square form of the quadratic equation \( ax^2 + bx + c \).

Related Questions