1. Oct 6, 2009

### Yitzach

1. The problem statement, all variables and given/known data
$$\vec{E}=k(y^2\hat{x}+(2xy+z^2)\hat{y}+2yz\hat{z})$$
Here k is a constant with the appropriate units. Find the potential, using the origin as you reference point. Check our answer by computing $$\nabla V$$. [Hint: You must select a specific path to integrate along. It doesn't matter what path you choose, since the answer is path-independent, but you simply cannot integrate unless you have a particular path in mind.]
No final position is provided.

I came up with a V-field that satisfies the gradient condition but the hint was moderately unhelpful. I would like help to figure out what happened so I can avoid the wrong and follow the right on the exam.

I am so glad that constant multipliers just constant multiply the answer after both integration and derivation.

2. Relevant equations
$$V(\vec{r})= -\int^{\vec{r}}_{\vec{0}}\vec{E}\cdot d\vec{l}$$
$$\vec{E}= -\nabla V$$

3. The attempt at a solution
Attempt 1:
$$\vec{r}=<t,t,t> 0\leq t\leq1$$
$$d\vec{l}=d\vec{r}=<dt,dt,dt>$$
$$V=-\int^{1}_{0}<t^2,2t^2+t^2,2t^2>\cdot<dt,dt,dt>$$
$$V=-\int^{1}_{0}(t^2+2t^2+t^2+2t^2)dt$$
$$V=-\int^{1}_{0}(6t^2)dt$$
$$V=-(2t^3)|^{1}_{0}$$
$$V=-2$$
That is not the answer. But does provide the potential difference between the origin and the point <1,1,1>

Attempt 2:
$$V(\vec{r}(t))= -\int^{\vec{r}(1)}_{\vec{r}(0)}\vec{E}\cdot d\vec{l}$$
$$\vec{E}=<y^2,2xy+z^2,2yz>$$
$$\vec{r}=<t,t,t>$$
$$d\vec{l}=d\vec{r}=<dx,dy,dz>$$
$$V(\vec{r}(t))= -\int^{\vec{r}(1)}_{\vec{r}(0)}<y^2,2xy+z^2,2yz>\cdot<dx,dy,dz>$$
$$V(\vec{r}(t))= -\int^{\vec{r}(1)}_{\vec{r}(0)}y^2dx+(2xy+z^2)dy+2yzdz$$
$$V(\vec{r}(t))= -(xy^2+xy^2+yz^2+yz^2)|^{\vec{r}(1)}_{\vec{r}(0)}$$
$$V(\vec{r}(t))= -(1+1+1+1)= -4$$ That's not right, back up one line.
$$V(\vec{r}(t))= -(2xy^2+2yz^2)$$ This is almost right, it is off by a constant multiplier of 2.

$$-\nabla V=-\nabla(-2xy^2-2yz^2)=2y^2\hat{x}+(4xy+2z^2)\hat{y}+4xz\hat{z}$$

$$V= -(xy^2+yz^2)k+c$$ This is my final answer

You may have noted that I dropped the constant k through out the entire attempt. That is why I am happy that the constant multiplier multiplies the answer on of integrals and derivatives by the same factor.
The question now is were did the two come from and how can it be avoided? Why did the book say pick a specific path when entering the path into both integrals provided a constant answer? Wouldn't that produce the potential difference between two specific points using and E-field instead of the V-field as apparently requested?

2. Oct 6, 2009

### NruJaC

I'm not sure why you're integrating from r(0) to r(1). The problem wants you to integrate from 0 to r, where r = <x,y,z>. Easiest way to accomplish this is to look at each direction of the E-field one at a time. Integrate that piece with respect to its direction. Then compare the three results to see what pieces overlap, and what's unique. So it all together, keeping in mind that overlaps should only be added once. So all that leaves is the integration constant, C. To find that, set the function equal to 0 at (0,0,0) and sort it out appropriately.

3. Oct 6, 2009

### Yitzach

The r(0) to r(1) is because r(t)=<t,t,t> which will take me from the the origin to the point (1,1,1). I see the error I made. Will attempt the correct solution later.

4. Oct 6, 2009

### Yitzach

Attempt 3:
$$-(y^2dx+(2xy+z^2)dy+2yzdz)$$
$$\int(2xy+z^2)dy=xy^2+yz^2+g(x,z)$$
$$\frac{d}{dx}(xy^2+yz^2+g(x,z))=y^2$$
$$\frac{d}{dz}(xy^2+yz^2+h(z))=2yz$$
$$V=k(-xy^2-yz^2)+C$$
$$-\nabla V=y^2\hat{x}+(2xy+z^2)\hat{y}+2yz\hat{z}$$
All is well.