Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
393 B
0
Indexable
Never
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()