Find $ k $ so that the function
\[
f(x) =
\begin{cases}
\frac{x^2 - 2x - 3}{x + 1} & \text{if } x \neq -1 \\
k & \text{if } x = -1
\end{cases}
\]
is continuous at $ x = -1 $.
Show Hint
For piecewise functions to be continuous at a certain point, the function values from both sides of the point must match the function value at that point. Simplify the expression and find the limit to determine the necessary value.
For the function to be continuous at $ x = -1 $, the left-hand limit, right-hand limit, and the function value at $ x = -1 $ must all be equal. That is:
\[
\lim_{x \to -1} f(x) = f(-1)
\]
Step 1: Simplify the expression for $ f(x) $ when $ x \neq -1 $:
\[
f(x) = \frac{x^2 - 2x - 3}{x + 1}
\]
Factor the numerator:
\[
x^2 - 2x - 3 = (x - 3)(x + 1)
\]
Thus:
\[
f(x) = \frac{(x - 3)(x + 1)}{x + 1}
\]
For $ x \neq -1 $, cancel out $ x + 1 $:
\[
f(x) = x - 3
\]
Step 2: Find the limit as $ x \to -1 $:
\[
\lim_{x \to -1} f(x) = \lim_{x \to -1} (x - 3) = -1 - 3 = -4
\]
Step 3: For continuity at $ x = -1 $, we must have:
\[
f(-1) = k = -4
\]
Thus, the value of $ k $ is $ \boxed{-4} $.