Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- def f(x):
- return (np.sin(x)**2 + np.cos(2 * x)) / (np.sin(x**2) + 2)
- def grafic(x, y):
- plt.title("f(x)")
- plt.xlabel("x")
- plt.ylabel("y")
- plt.grid()
- plt.plot(x, y, label='f(x)=(sin(x)^2 + cos(2x)) / (sin(x^2) + 2)')
- plt.show()
- X = np.linspace(-np.pi, np.pi, 1000)
- Y = f(X)
- grafic(X, Y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement