Untitled

 avatar
unknown
plain_text
2 years ago
393 B
0
Indexable
import numpy as np
import matplotlib.pyplot as plt

# Define the function
def f(x):
    return (x**2 + x - 6) / abs(x - 2)

# Define the x range for the plot
x = np.linspace(-10, 10, 1000)

# Plot the function
plt.plot(x, f(x))

# Add axis labels and a title
plt.xlabel('x')
plt.ylabel('f(x)')
plt.title('Graph of f(x) = (x^2 + x - 6)/|x - 2|')

# Show the plot
plt.show()