There is an example in Vector Calculus from Madsen & Tromba page 435 that states:

Let $F=(xy^2,y+x)$.Integrate $(\nabla \times F)\cdot k$ over the region in the first quadrant bounded by the curves $y=x^2$ and $y=x.$

We first compute the Curl :

$$ (\nabla \times F) = \left(0,0,\frac{\partial F_{2}}{\partial x} - \frac{\partial F_{1}}{\partial y} \right)=(1-2xy)k$$

Thus, $(\nabla \times F)\cdot k =(1-2xy) $

This can be integrated over the given region $D$ using an iterated integral as follows:

$$\begin{align*} \int \int_{D} (\nabla \times F)\cdot k \quad dxdy &= \int_{0}^{1}\int_{x^2}^{x}(1-2xy)\quad dydx\\ &=\int_{0}^{1} [y-xy] |_{x^{2}}^{x} dx \\ &= \int_{0}^{1} [x-x^3-x^2+x^5]\\ &= 1/2-1/4-1/3+1/6=1/12 \end{align*}$$

Searching in sympy module in order to calculate this example in python I am confused how they implement the line integral.Does someone know how this can be done in Sympy?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy