Completing the Square Solver

Rewrites ax² + bx + c as a(x - h)² + k with every step, solves the equation from the square, gives exact and decimal roots and draws the parabola.

يعمل في متصفحك. ملفاتك لا تغادر جهازك أبدًا. شاهد كيف تتحقق

…

كيف تفعل ذلك

  1. 1
    Enter the quadratic

    Type it, for example 2x^2 - 8x + 3, or press an example.

  2. 2
    Read vertex form

    The boxes show the vertex form, turning point and roots.

  3. 3
    Follow the steps

    Each step shows taking out a, halving and squaring, and simplifying.

  4. 4
    Look at the graph

    The parabola marks the turning point, roots, axis and y-intercept.

  5. 5
    Practise

    Practice asks you to complete the square on new quadratics at two levels.

  6. 6
    Save or print

    Save keeps the quadratic; Print / PDF gives a copy of the steps.

عن هذه الأداة

Completing the square turns a quadratic into vertex form a(x - h)² + k, which shows the turning point at a glance and leads directly to the roots. It is also how the quadratic formula is derived and how circles and other conics are put into standard form. This solver takes any quadratic, including ones with a ≠ 1, negative a or fractional coefficients, and writes out each step: take a out of the x terms, halve the coefficient of x and square it, add and subtract that square inside the bracket, write the perfect square and simplify the constants. It then solves a(x - h)² + k = 0 by square roots, giving the roots exactly as h ± √(…) and as decimals, or the complex roots when the square would have to be negative. The parabola is drawn with the turning point, roots, axis of symmetry and y-intercept marked, and a practice mode asks you to complete the square on fresh quadratics.

Why it works

(x + p)² = x² + 2px + p². So x² + bx is the start of a perfect square with p = b/2, missing only p² = (b/2)². Adding (b/2)² completes the square, and subtracting the same amount keeps the expression equal to what it was.

When a is not 1

Factor a out of the x² and x terms first: 2x² - 8x + 3 = 2(x² - 4x) + 3. Complete the square inside the bracket, then multiply the subtracted square by a when it comes out: 2((x - 2)² - 4) + 3 = 2(x - 2)² - 5.

Reading vertex form

In a(x - h)² + k the turning point is (h, k) and the axis of symmetry is x = h. If a > 0 the parabola opens up and k is the minimum value; if a < 0 it opens down and k is the maximum. Setting the expression to zero gives (x - h)² = -k/a, which has real solutions only when -k/a ≥ 0.

Worked example

2x² - 8x + 3 = 2(x² - 4x) + 3 = 2(x² - 4x + 4 - 4) + 3 = 2(x - 2)² - 5. The minimum point is (2, -5). Solving 2(x - 2)² = 5 gives x = 2 ± √(5/2) ≈ 0.418861 or 3.581139.

Limits

The input must be a quadratic in x with numeric coefficients. Coefficients with letters, such as completing the square on ax² + bx + c in general, are not handled symbolically. Decimal coefficients are shown as fractions where possible, which can look long. Use the steps to learn the method and still show your own working.

مثال محلول

2x² - 8x + 3 = 2(x - 2)² - 5: turning point (2, -5), roots 2 ± √(5/2) ≈ 0.4189 and 3.5811.

حقائق سريعة

الأسئلة الشائعة

What is vertex form?

a(x - h)² + k. It shows the turning point (h, k), the axis of symmetry x = h and whether the graph opens up or down.

What number do I add to complete the square?

Half the coefficient of x, squared, after taking out a. For x² - 4x that is (-4/2)² = 4.

How do I handle a ≠ 1?

Factor a out of the x² and x terms, complete the square inside the bracket, and multiply the subtracted square by a.

What if there are no real roots?

Then (x - h)² would have to equal a negative number. The tool reports the complex roots h ± (…)i instead.

Is this the same as the quadratic formula?

Yes in result. The quadratic formula is what you get by completing the square on ax² + bx + c with letters.

Can I practise?

Practice gives quadratics with whole-number turning points; type the answer as a(x - h)^2 + k.

مجاني تمامًابلا تكلفة وبلا تسجيل
ملفات خاصةكل شيء يعمل في متصفحك
سهل بلغتكمتوفر بلغات كثيرة