Green’s Theorem Example

First -- you need to parametrize the curve forming the boundary of the region in question. In this case, it is the “lens shaped” region bounded by y = (x^2) and x = (y^2).

x1[t_]:=t;  y1[t_]:=(t^2); x2[t_]:=t;y2[t_]:=(Sqrt[t]);

Second, define P(x,y) and Q(x,y) from problem:

P[x_,y_]:=y+(E^(Sqrt[x])); Q[x_,y_]:=2x+Cos[(y^2)];

Third, integrate P(x(t),y(t))*x’(t) + Q(x(t),y(t))*y’(t) in t from t = 0 to t =1 along the first portion of the boundary:

IPart1 = (∫_0^1)(P[x1[t],y1[t]]*x1'[t]+Q[x1[t],y1[t]]*y1'[t])\[DifferentialD]t

Fourth, integrate P(x(t),y(t))*x’(t) + Q(x(t),y(t))*y’(t) in t from t = 1 to t =0 along the second portion of the boundary:

IPart2 =(∫_1^0)(P[x2[t],y2[t]]*x2'[t]+Q[x2[t],y2[t]]*y2'[t])\[DifferentialD]t

The sum of the prior two results is the value of the contour integral along the positively oriented boundary, which can be simplied in various ways:

GeneralValue=FullSimplify[IPart1 + IPart2]

N[GeneralValue]

Re[IPart1+IPart2]

FullSimplify[Re[IPart1+IPart2]]

Evaluate the corresponding double integral from Green’s Theorem

(∫_0^1)(∫_(x^2)^(Sqrt[x]))((∂_x)Q[x,y]-(∂_y)P[x,y])\[DifferentialD]y\[DifferentialD]x