Homework Help: Two part question vectors

1. Jan 5, 2009

terryfields

consider the vector field q=yzcos(xy)i+xzcos(xy)j+(sin(xy)+2z)k

verify that x q=0 and concequently determine a function f(x,y,z) such that q=f

now i have completed the first part by using the determinant and multiplying out, it is quite obvious that the whole thing equals zero, however i dont know how to do the second part "concequently determine a function f(x,y,z) such that q=f"

my first question is does f simply mean the dot product when there is no dot there? i assume it does

and my second question is how do i approach this question? thanks

2. Jan 5, 2009

tiny-tim

Hi terryfields!

No, f is the gradient …

for an ordinary function f(x) of a vector x, f is the gradient vector (∂f/∂x1, … ,∂f/∂xn)

And if x q = 0, then there must be an f with q = f.

(and basically you find f by integrating each component of q, and using a little common-sense for the "constants"! )

3. Jan 5, 2009

terryfields

ah ok, so do i just need to integrate each term in respect to x or in respect to x,y and z?

4. Jan 5, 2009

tiny-tim

The i term with respect to x, the j term with respect to y, and the k term with respect to z.

5. Jan 5, 2009

terryfields

ok, so by my calculations i would get (zsin(xy))i+(zsin(xy))j+(zsin(xy)+z2)k i assume this is how it's writen? as i now assume i need to do ∇ x f = 0 to find my constants?

6. Jan 5, 2009

HallsofIvy

And, as tiny tim said, "using a little common-sense for the "constants"!" The reason he put "constants" in quotes is because the partial derivative with respect to one variable treats the other variables as constants- and you have to consider that in taking an "ant-derivative".

For example, if the v were the vector $2xy\vec{i}+ (x^2+ z)\vec{j}+ (1+ y)\vec{k}$, then you must have $\partial f/\partial x= 2xy$, $\partial f/\partial y= x^2+ z$, and $\partial f/\partial z= 1+ y$. Integrating $\partial f/\partial x= 2xy$ gives $f= x^2y+ \phi(y,z)$ where $\phi$ can be any function of y and z since its derivative, with respect to x, is 0. If we differentiate that with respect to y, we get $\partial f/\partial y= x^2+ \partial \phi/\partial y= x^2+ z$ or $\partial \phi/\partial y= z$. (Notice how the "$x^2$" cancelled- that HAS to happen because $\phi$ is a function of y and z only. That's why not every function is a "gradient".)

Integrating $\partial\ph/\partial y= z$ gives us $\phi(y,z)= yz+ \psi(z)$. Again, the "constant" of integration may be a function of z. That means that we now have $f(x,y,z)= x^2y+ yz+ \psi(z)$ and differentiating that with respect to z, $\partial f/\partial z= y+ d\psi/dz= 1+ y$ and the "y" term cancels leaving $d\psi/dz= 1$. (That is an ordinary derivative because $\psi$ is a function of z only.) Integrating that, $\psi(z)= z+ C$ where now the "constant" of integration is now really a constant.

That gives $f(x,y,z)= x^2y+ yz+ z+ C$ and you can check that [itex]\nabla (x^2y+ yz+ z)= 2xy\vec{i}+ (x^2+ z)\vec{j}+ (y+1)\vec{k} for any constant C.

7. Jan 5, 2009

terryfields

i think i understand

so when we get zsin(xy)i +zsin(xy)j+z2 from integrating we have to check what we would get from differentiating this?

in this case the i term and j term dont need constants because they would differentiate right back to what they were integrated from? however for the k term we do because if we differentiate z2 we just get 2z not 2z+ sin(xy)
so we need to add on a term that will differentiate with respects to z to get sin(xy) namely zsin(xy)?

giving our full answer to be zsin(xy)i+zsin(xy)j+z2+zsin(xy)

8. Jan 5, 2009

tiny-tim

Nooo … f is an ordinary function, not a vector …

when you integrate, you're aiming to get the same function f, each of the three times …

that's where the "constants" come in …

how can you combine zsin(xy) and z2 to get a single f that fits?

9. Jan 5, 2009

terryfields

f=z2 +zsin(xy)?? is there a method to do this by or is it just inspection to find it?

10. Jan 5, 2009

tiny-tim

That's right!

(and the method is what you just did …

didn't you like it? )