Puranapuranabhyam — By Completion or Non-Completion
In this tutorial, you'll learn about Puranapuranabhyam. We cover key concepts, practical examples, and best practices.
Puranapuranabhyam ("By completion or non-completion") transforms algebraic equations by adding or subtracting terms to create perfect squares or cubes, making complex equations instantly solvable.
What you'll learn: The Puranapuranabhyam method for solving equations by completing squares and recognizing incomplete forms. Why it matters: This sutra is the Vedic equivalent of completing the square — it solves quadratic and cubic equations in fewer steps than the standard formula. Real-world use: Computer graphics programmers use completion-of-square techniques for bounding-box calculations; physicists reduce orbital equations using this exact pattern.
The Sutra: By Completion or Non-Completion
The sutra states: if an expression is almost a perfect square or cube, add the missing term to complete it (completion) or recognize the form as deliberately incomplete (non-completion) to factor it directly.
For quadratics like x^2 + 6x + 5 = 0, complete the square: x^2 + 6x + 9 = 4, then (x + 3)^2 = 4, so x = -1 or x = -5.
Completion Flow
flowchart TD
A["Equation
ax² + bx + c = 0"] --> B["Is it a
perfect square?"]
B -->|No| C["Find term to
complete the square
(b/2a)²"]
B -->|Yes| D["Factor directly"]
C --> E["Add and subtract
the completing term"]
E --> F["Rewrite as
(x + p)² = q"]
F --> G["Take square root
x = -p ± sqrt(q)"]
style A fill:#1a73e8,color:#fff,stroke:none
style C fill:#fbbc04,color:#333,stroke:none
style F fill:#34a853,color:#fff,stroke:none
style G fill:#46bdc6,color:#fff,stroke:none
Worked Examples
Example 1: Completing the square — simple quadratic
Solve: x^2 + 8x + 7 = 0
Step 1: Identify the completing term. Half of 8 is 4. Square it: 16.
Step 2: Add and subtract 16: x^2 + 8x + 16 - 16 + 7 = 0.
Step 3: Group: (x^2 + 8x + 16) - 9 = 0.
Step 4: Factor: (x + 4)^2 - 9 = 0.
Step 5: Solve: (x + 4)^2 = 9, so x + 4 = 3 or x + 4 = -3.
Answer: x = -1 or x = -7
Check: (-1)^2 + 8(-1) + 7 = 1 - 8 + 7 = 0. (-7)^2 + 8(-7) + 7 = 49 - 56 + 7 = 0.
Example 2: Non-completion — recognizing a pattern
Solve: x^2 + 10x + 25 = 9
Step 1: Recognize that x^2 + 10x + 25 is already a perfect square: (x + 5)^2.
Step 2: Rewrite: (x + 5)^2 = 9.
Step 3: Take square root: x + 5 = 3 or x + 5 = -3.
Answer: x = -2 or x = -8
Check: (-2)^2 + 10(-2) + 25 = 4 - 20 + 25 = 9. (-8)^2 + 10(-8) + 25 = 64 - 80 + 25 = 9.
Example 3: Quadratic with odd coefficient
Solve: x^2 + 5x + 6 = 0
Step 1: Half of 5 is 2.5. Square it: 6.25 (or 25/4).
Step 2: Add and subtract 6.25: x^2 + 5x + 6.25 - 6.25 + 6 = 0.
Step 3: Group: (x^2 + 5x + 6.25) - 0.25 = 0.
Step 4: Factor: (x + 2.5)^2 - 0.25 = 0.
Step 5: (x + 2.5)^2 = 0.25, so x + 2.5 = 0.5 or x + 2.5 = -0.5.
Answer: x = -2 or x = -3
Check: (-2)^2 + 5(-2) + 6 = 4 - 10 + 6 = 0. (-3)^2 + 5(-3) + 6 = 9 - 15 + 6 = 0.
Example 4: Cubic completion
Solve: x^3 + 6x^2 + 12x + 8 = 0
Step 1: Recognize the pattern of (x + 2)^3 = x^3 + 6x^2 + 12x + 8.
Step 2: The equation is already a perfect cube: (x + 2)^3 = 0.
Step 3: Take cube root: x + 2 = 0.
Answer: x = -2 (triple root)
Check: (-2)^3 + 6(-2)^2 + 12(-2) + 8 = -8 + 24 - 24 + 8 = 0.
Example 5: Near-perfect cube
Solve: x^3 + 6x^2 + 11x + 6 = 0
Step 1: Compare with (x + 2)^3 = x^3 + 6x^2 + 12x + 8.
Step 2: Our expression: x^3 + 6x^2 + 11x + 6. The difference: (x^3 + 6x^2 + 12x + 8) - (x^3 + 6x^2 + 11x + 6) = x + 2.
Step 3: So x^3 + 6x^2 + 11x + 6 = (x + 2)^3 - (x + 2) = (x + 2)[(x + 2)^2 - 1].
Step 4: Factor further: (x + 2)(x + 2 - 1)(x + 2 + 1) = (x + 2)(x + 1)(x + 3).
Step 5: (x + 2)(x + 1)(x + 3) = 0.
Answer: x = -1, x = -2, or x = -3
Code Snippet: Python Implementation
def complete_square(a, b, c):
"""
Solve ax^2 + bx + c = 0 using Puranapuranabhyam
(completing the square). Returns roots.
"""
# Normalize: divide by a
p = b / a
q = c / a
# Half of p, squared
h = p / 2
h_sq = h ** 2
# (x + h)^2 = h_sq - q
rhs = h_sq - q
if rhs < 0:
return None # Complex roots
sqrt_rhs = rhs ** 0.5
x1 = -h + sqrt_rhs
x2 = -h - sqrt_rhs
return (x1, x2)
def solve_by_completion(coefficients):
"""Solve multiple quadratics by completion."""
for a, b, c in coefficients:
roots = complete_square(a, b, c)
if roots:
x1, x2 = roots
# Verify
check1 = a * x1**2 + b * x1 + c
check2 = a * x2**2 + b * x2 + c
print(f"{a}x^2 + {b}x + {c} = 0")
print(f" Roots: x = {x1}, x = {x2}")
print(f" Verify: {check1:.6f}, {check2:.6f}")
else:
print(f"{a}x^2 + {b}x + {c} = 0")
print(f" Complex roots (not handled)")
tests = [(1, 8, 7), (1, 10, 25), (1, 5, 6), (1, -4, 3)]
solve_by_completion(tests)
Expected output:
1x^2 + 8x + 7 = 0
Roots: x = -1.0, x = -7.0
Verify: 0.000000, 0.000000
1x^2 + 10x + 25 = 0
Roots: x = -5.0, x = -5.0
Verify: 0.000000, 0.000000
1x^2 + 5x + 6 = 0
Roots: x = -2.0, x = -3.0
Verify: 0.000000, 0.000000
1x^2 + -4x + 3 = 0
Roots: x = 3.0, x = 1.0
Verify: 0.000000, 0.000000
Code Snippet: JavaScript Implementation
function solveByCompletion(a, b, c) {
const p = b / a;
const q = c / a;
const h = p / 2;
const rhs = h * h - q;
if (rhs < 0) return null;
const sqrt = Math.sqrt(rhs);
return [-h + sqrt, -h - sqrt];
}
const tests = [[1, 8, 7], [1, 10, 25], [1, 5, 6], [1, -4, 3]];
tests.forEach(([a, b, c]) => {
const roots = solveByCompletion(a, b, c);
console.log(`${a}x^2 + ${b}x + ${c} = 0`);
if (roots) {
console.log(` x = ${roots[0]}, x = ${roots[1]}`);
const v1 = a * roots[0]**2 + b * roots[0] + c;
const v2 = a * roots[1]**2 + b * roots[1] + c;
console.log(` Verify: ${v1}, ${v2}`);
}
});
Common Errors
Forgetting to divide by the leading coefficient first. For 3x^2 + 12x + 9 = 0, divide by 3 first: x^2 + 4x + 3 = 0, then complete the square.
Incorrect completing term. The completing term is always (b/2a)^2, not (b/2)^2. For 2x^2 + 8x + 5 = 0, first divide by 2, then complete: (4/2)^2 = 4.
Misapplying non-completion. Non-completion only works when the expression is already a near-perfect form. Randomly adding terms changes the equation.
Adding the completing term without compensating. If you add 9 to complete the square, you must also subtract 9 to keep the equation balanced.
Forgetting the plus-minus in the square root. (x + p)^2 = q implies x + p = sqrt(q) OR x + p = -sqrt(q). Both roots must be computed.
Practice Questions
- x^2 + 6x + 5 = 0 — solve by completion.
- x^2 + 2x - 15 = 0 — solve by completion.
- x^3 + 9x^2 + 27x + 27 = 0 — solve by completing the cube.
Answers:
- (x + 3)^2 = 4, x = -1 or x = -5.
- (x + 1)^2 = 16, x = 3 or x = -5.
- (x + 3)^3 = 0, x = -3 (triple root).
Mini Project: Completion Solver
def general_completion(coeffs):
"""
Solve polynomial by completion/non-completion.
Works for quadratics and recognizable cubes.
"""
degree = len(coeffs) - 1
if degree == 2:
a, b, c = coeffs
roots = complete_square(a, b, c)
return roots
elif degree == 3:
a, b, c, d = coeffs
# Check if it matches (x + k)^3 = x^3 + 3kx^2 + 3k^2x + k^3
# 3k = b/a, so k = b/(3a)
if a == 1:
k = b / 3
expected_c = 3 * k**2
expected_d = k**3
if abs(c - expected_c) < 1e-9 and abs(d - expected_d) < 1e-9:
return (-k, -k, -k)
return None
tests = [(1, 8, 7), (1, 6, 5), (1, 6, 12, 8)]
for coeffs in tests:
result = general_completion(coeffs)
print(f"{coeffs} -> roots: {result}")
FAQ
Next Steps
Continue with Vyashtisamasthi — part and whole techniques for fractions.
Related tutorials:
- Vedic Maths Overview — introduction to all Vedic sutras
- Sopantyadvayamantyam — ultimate and twice the penultimate for partial fractions
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro