To find the values of \(k\) for which the line is tangent to the curve, we set the equations equal to each other:
\(kx + 6 = x^2 + 3x + 2k\)
Rearrange to form a quadratic equation:
\(x^2 + (3-k)x + (2k-6) = 0\)
For the line to be tangent to the curve, the discriminant of this quadratic must be zero:
\(b^2 - 4ac = 0\)
Here, \(a = 1\), \(b = 3-k\), \(c = 2k-6\).
Substitute into the discriminant formula:
\((3-k)^2 - 4(1)(2k-6) = 0\)
Simplify:
\((3-k)^2 - 8k + 24 = 0\)
\(9 - 6k + k^2 - 8k + 24 = 0\)
\(k^2 - 14k + 33 = 0\)
Factorize the quadratic:
\((3-k)(11-k) = 0\)
Thus, \(k = 3\) or \(k = 11\).