벡터장의 선적분

Find the work done by the force field

in moving an object along an arch of the cycloid

(출처, Calculus ( James Stewart ) ch16.3 problem 39)

import numpy as np
import matplotlib.pyplot as plt
import math
X, Y = np.mgrid[-0.5:2*math.pi:20j, -0.5:2.5:20j]   # 10j 는 10개 생성한다!
U = X
V = Y+2
th=np.linspace(0,2*math.pi,100)
x=th - np.sin(th)
y=1-np.cos(th)
plt.quiver(X, Y, U, V, color='k')
plt.plot(x,y,color='red')
plt.show()

Output