728x90
import matplotlib.pyplot as plt
import numpy as np
def f(x):
return 2 * x / (x**2 + 1)
x = np.linspace(-10, 10, 400)
y = f(x)
plt.figure(figsize=(8, 6))
plt.plot(x, y, label=r'$f(x) = \frac{2x}{x^2 + 1}$')
plt.title('Graph of f(x)')
plt.xlabel('x')
plt.ylabel('f(x)')
plt.axhline(0, color='black',linewidth=0.5)
plt.axvline(0, color='black',linewidth=0.5)
plt.grid(True)
plt.legend()
plt.show()
728x90
'수학(Curiosity)' 카테고리의 다른 글
가장 쉬운 수학 문제 풀이 (0) | 2024.10.31 |
---|---|
가장 쉬운 수학 문제 (0) | 2024.10.31 |
몬티홀 딜레마의 핵심논리 (0) | 2024.05.11 |
PI 소수점과 모든 가능한 숫자열 (0) | 2024.05.06 |
How does linear regression help in predicting the outcome values and what are the assumptions of it? (0) | 2024.03.03 |