In[3]:=
f[x_,y_,z_] := x Log[y] + z Log[x]
In[4]:=
{ D[x Log[y] + z Log[x],x],
D[x Log[y] + z Log[x],y],
D[x Log[y] + z Log[x],z]}
Out[4]
The set on which this is defined is the set of all {x,y,z} such that x
In[5]:=
Out[5]=
Alternatively, we could set up a line integral. The straight line can be
In[6]:=
In[7]:=
The time t will go from 0 to 1. We take the dot product of F with the
In[8]:=
Out[8]=
In[9]:=
Out[9]=
What a coincidence, the same number!
Up to Test 3 solutions
and y are positive. This is an open set (the set get arbitrarily close to where x = 0
or
y = 0, but does not include these boundary points. It is also connected,
c) Calculate the integral of grad f dotted with dx along the straight line
from (1,1,1) to (1,2,1).
Solution. The easy way to do this is to know that the integral equals f(1,2,1)
- f(1,1,1):
f[1,2,1] - f[1,1,1]
Log[2]
parametrized as
Clear[x,y,z]
x[t_] := 1
y[t_] := 1 + t
z[t_] := 1
velocity:
{ D[x Log[y] + z Log[x],x],
D[x Log[y] + z Log[x],y],
D[x Log[y] + z Log[x],z]}.{x'[t],y'[t],z'[t]} \
/. {x -> 1,y -> 1+t, z -> 1}
1
-----
1 + t
Integrate[%, {t,0,1}]
Log[2]