3. (8 points).
Let F(x,y,z) := (y + 1)i + (x+cos(y)) j

a) Is this vector field exact ?

Answer. Yes, because

In[8]:=

  D[y + 1, y] == D[x+Cos[y], x]

Out[8]=

  True

b) Evaluate the integral of F . dx along C_1, where
where C_1 is the closed loop given by x(t) = cos(t),
y = t^2 - 2 9 t, 0 2 t 2 2 9.

Because the vector field is exact, the integral around any closed loop is 0,
It is not necessary to parametrize.

c) Evaluate the integral of F . dx,
where C_2 is the non-closed curve given by x(t) = cos(t), y = t^2 - 2 9 t, 0 2 t 2 9.

Because the vector field is exact, the vector field is the gradient of a scalar
function f[x,y], and the integral is just f[end point] - f[ starting point]. I will
solve this by finding the scalar function f. Another valid possibility is to use
the path-independence property, and do the integral directly along a straight
linefrom (1,0) to (-1,- pi^2).

To find x, integrate the components of the vector field and compare terms to
fix the "constants" of integration, by which I mean the arbitrary functions of
one variable alone . I will write them explicitly:

In[9]:=

  f[x, y] = Integrate[y + 1, x] + C1[y]

Out[9]=

  x (1 + y) + C1[y]

In[10]:=

  f[x, y] = Integrate[x + Cos[y], y] + C2[x]

Out[10]=

  x y + C2[x] + Sin[y]

In[11]:=

  % == %%

Out[11]=

  x y + C2[x] + Sin[y] == x (1 + y) + C1[y]

Evidently, we can take C1[y] = Sin[y] and C2[x] = x, so

In[12]:=

  Clear[f]

In[13]:=

  f[x_,y_] = x y + x + Sin[y]

Out[13]=

  x + x y + Sin[y]

Checking:

In[14]:=

  {D[f[x,y], x], D[f[x,y], y]}

Out[14]=

  {1 + y, x + Cos[y]}

The value of the integral is

In[15]:=

  (%% /.{x -> -1, y -> - Pi^2}) - (%% /.{x -> 1, y -> 0})

Out[15]=

         2         2
  -2 + Pi  - Sin[Pi ]

Up to Solutions to Test 4