Solution: Find the value of $k$ such that $x^2 + kx + 9$ has exactly one real root.
Find the value of k such that x2+kx+9 has exactly one real root.
Calculations Finished
Code:
import sympy
x, k = sympy.symbols('x k')
# A quadratic ax^2 + bx + c has exactly one real root if its discriminant b^2 - 4ac is zero.
# For x^2 + kx + 9: a=1, b=k, c=9
discriminant = k**2 - 4*1*9
solutions = sympy.solve(discriminant, k)
print(f"{discriminant=}")
print(f"{solutions=}")
Output:
discriminant=k**2 - 36
solutions=[-6, 6]
STEP 1 • VERIFIED
Solution for k2−4⋅1⋅9=0
STEP 2 • VERIFIED
Solution for k2−36=0
Have a Math Question?
Ask your own question to get a step-by-step verified solution instantly.