<div class="notes">
<h2>How to Complete the Square</h2>
<p>
A quadratic expression has the general form:
$$ax^2 + bx + c, \quad a \neq 0$$
</p>
<p>
<span class="highlight">Completing the square</span> means rewriting the quadratic in the form
$$(x + p)^2 + q$$
This form is useful for <span class="highlight">solving equations</span> and for finding the maximum/minimum values of a quadratic function.
</p>
<!-- Case 1 -->
<h3>Case 1: When the coefficient of \(x^2\) is 1</h3>
<ul class="steps">
<li><b>Step 1:</b> Identify coefficients \(a\), \(b\), and \(c\).</li>
<li><b>Step 2:</b> Take half the coefficient of \(x\) and square it.</li>
<li><b>Step 3:</b> Add and subtract this square inside the expression.</li>
<li><b>Step 4:</b> Rewrite as a perfect square plus/minus a constant.</li>
</ul>
<div class="example">
<h3>Example 1</h3>
<p><b>Question:</b> Rewrite \(x^2 + 5x + 3\) in completed square form.</p>
<p><b>Step 1:</b> \(a = 1,\; b = 5,\; c = 3\).</p>
<p><b>Step 2:</b> Half of \(b = 5\) is \(\tfrac{5}{2}\). Squaring gives \(\left(\tfrac{5}{2}\right)^2 = \tfrac{25}{4}\).</p>
<p><b>Step 3:</b> Add and subtract \(\tfrac{25}{4}\):
$$x^2 + 5x + 3 = \left(x^2 + 5x + \tfrac{25}{4}\right) - \tfrac{25}{4} + 3$$
$$= \left(x + \tfrac{5}{2}\right)^2 - \tfrac{13}{4}$$
</p>
<p><b>Final Answer:</b>
$$x^2 + 5x + 3 = \left(x + \tfrac{5}{2}\right)^2 - \tfrac{13}{4}$$
</p>
</div>
<!-- Case 2 -->
<h3>Case 2: When the coefficient of \(x^2\) is not 1</h3>
<p>
Factor out the coefficient of \(x^2\) first, then complete the square inside the brackets.
</p>
<ul class="steps">
<li><b>Step 1:</b> Factor out the coefficient of \(x^2\).</li>
<li><b>Step 2:</b> Take half the coefficient of \(x\) inside the bracket and square it.</li>
<li><b>Step 3:</b> Adjust by subtracting the extra constant, then simplify.</li>
<li><b>Step 4:</b> Expand back if required.</li>
</ul>
<div class="example">
<h3>Example 2</h3>
<p><b>Question:</b> Rewrite \(3x^2 - 9x + 50\) in completed square form.</p>
<p><b>Step 1:</b> Factor out 3:
$$3x^2 - 9x + 50 = 3(x^2 - 3x) + 50$$
</p>
<p><b>Step 2:</b> Half of \(-3\) is \(-\tfrac{3}{2}\). Squaring gives \(\tfrac{9}{4}\).
Add and subtract inside:
$$3\left(x^2 - 3x + \tfrac{9}{4}\right) - 3\left(\tfrac{9}{4}\right) + 50$$
$$= 3\left(x - \tfrac{3}{2}\right)^2 + \tfrac{173}{4}$$
</p>
<p><b>Final Answer:</b>
$$3x^2 - 9x + 50 = 3\left(x - \tfrac{3}{2}\right)^2 + \tfrac{173}{4}$$
</p>
</div>
<h2>Summary</h2>
<p>
To complete the square for \(ax^2 + bx + c\):
<br>• Factor out \(a\) if \(a \neq 1\).
<br>• Add and subtract \(\left(\tfrac{b}{2a}\right)^2\).
<br>• Rewrite as \((x + \tfrac{b}{2a})^2 + \text{constant}\).
</p>
</div>