Compute the derivative of y = (x² + x - 2)² using the chain rule:
dy/dx = 2 (x² + x - 2) d/dx [x² + x - 2]
dy/dx = 2 (x² + x - 2) (2x + 1)
Evaluate the derivative at x = -1 :
dy/dx (-1) = 2 ((-1)² + (-1) - 2) (2 (-1) + 1) = 4
This is the slope of the tangent line to the function at (-1, 4).
Use the point-slope formula to get the equation for the tangent line:
y - 4 = 4 (x - (-1)) → y = 4x + 8