# Homework Help: Application of gradient vector in 3D

1. Dec 18, 2012

### CAF123

1. The problem statement, all variables and given/known data
The temperature $T$ in a region of Cartesian $(x,y,z)-$ space is given by $$T(x,y,z) = (4 + 3x^2 + 2y^2 + z^2)^{10},$$ and a fly is intially at the point $(-5,6,7)$. Find a vector parametric representation for the curve which the fly should move in order to ensure that the temperature it experiences decreases as rapidly as possible.

3. The attempt at a solution

I have done a 2D analogue of this problem, however, it only asked for the curve in rectangular coordinates and not a vector parametrisation. Furthermore, I was able to get that curve by computing dy/dx which I can't do here.

So, what I have done so far is compute the gradient vector, $\underline{\nabla}T$ and took the negative of this because we want the vector to be pointing in the direction of decreasing values of $T$. I don't really know where to go from here. I am considering using the Implicit Function Theorem to attain $$\frac{\partial T}{\partial x}, \frac{\partial T}{\partial y}, \frac{\partial T}{\partial z}.$$ Is this good? If I do that, then I would just integrate these three expressions. Any ideas? Many thanks

2. Dec 18, 2012

### Vargo

You are looking for a curve of the form x(t), y(t), z(t). And you want its time derivative to be proportional to -grad T, evaluated at x(t),y(t),z(t). This is a system of ordinary differential equations for three unknown functions. The key here is that the velocity does not have to be the negative gradient, it only needs to be proportional to it. You can use that to make the differential equations very easy to solve.

3. Dec 18, 2012

### CAF123

So the velocity is in the same direction as the negative gradient vector. So I have: $$\frac{dx}{dt} = k(\underline{T} \cdot \hat{x}), k \,\in \,\mathbb{R}$$ and similar expressions for y and z?

4. Dec 18, 2012

### Vargo

Not quite. The factor k need not be a constant scalar. The only requirement is that for all t, the velocity vector is parallel to the negative gradient. The positive scalar k could (and should if you want a simple solution) vary with time.

Also, I am not familiar with the underline notation, but I assume it means negative gradient.

If you have a system of ODE such as
$\frac{d\vec{r}}{dt} = F(\vec{r})$
where F(r) is a vector field, then the solution curves are not changed if you multiply F by a scalar function. The parametrizations change, but the image curves do not. In other words, the velocity with which the curve is traversed changes, but the curve itself does not change. The reason is that the curves have to be everywhere tangent to the vector field. That requirement in itself determines the curves and is unchanged by multiplying F by a scalar field as long as the scalar field (function) is never 0. If your scalar field is negative everywhere, it reverses the direction of the curves, but still gives you the same actual curves.

Last edited: Dec 18, 2012
5. Dec 18, 2012

### CAF123

Ok, so something like: $$\frac{dx}{dt} = k(t)(-\underline{\nabla}T \cdot \hat{x})$$
I made an error on notation in the previous post. It is fixed now.

6. Dec 18, 2012

### Vargo

Yes, something like that. Saying k depends on time might have been misleading on my part though. It would have been better to say it depends on time through its dependence on position. k = k(x(t),y(t),z(t)). So really, your k is a function of position.

7. Dec 18, 2012

### CAF123

I suppose this makes sense - as the curve is traced out, the velocity may change in magnitude. However, the resulting differential eqn looks messy: $$\frac{dx}{dt} = - k(x(t))(10(4+3x^2+2y^2+z^2)^{9} \cdot 6x)$$ Should I do this by separation of variables?

8. Dec 18, 2012

### Vargo

No,

$\frac{dx}{dt} = - k(x,y,z)*20(4+3x^2+2y^2+z^2)^9*3x$

k depends on all three variables x,y,z (which in turn all depend on t). I am suppressing the dependence on t in the right hand side to make it more readable. Now write down the corresponding equations for y' and z', and then find a function k(x,y,z) that is the most convenient possible choice for making all three equations simpler.

Essentially, we are replacing -grad T with -k(x,y,z)grad T in order to make the vector field simpler.

9. Dec 18, 2012

### CAF123

$$\frac{dy}{dt} = - k(x,y,z)*20(4+3x^2+2y^2+z^2)^9*2y$$ and $$\frac{dz}{dt} = - k(x,y,z)*20(4+3x^2+2y^2+z^2)^9*z$$ I am not sure what you mean by finding a function k(x,y,z) to make the vector field simpler. By introducing this k, how does that simplify things?
Thanks.

10. Dec 18, 2012

### Vargo

What I mean is choose a function k(x,y,z) that simplifies the expression. Any choice (as long as it is never 0) will not affect the integral curves. So you are free to substitute anything you like for k(x,y,z). For example, you could try
$k(x,y,z) = 1+|x|^5\cos(y)+z^4.$
but that would be a poor choice because it would only make your equations more complicated.

11. Dec 18, 2012

### CAF123

Ok, so I could have something like k(x,y,z) = xyz or k(x,y,z) = 1? As long as it's some scalar (function). Or what about $k(x,y,z) = (4 + 3x^2 + 2y^2 + z^2)^{-9}?$

12. Dec 18, 2012

### Vargo

Now you're catching on.

13. Dec 18, 2012

### CAF123

By doing the integration, I got $x = (Ae^t)^{1/60}, y= (Be^t)^{1/40}, z = (Ce^t)^{1/20}$?. So $\underline{r} = x \hat{i} + y\hat{j} + z \hat{k}$

14. Dec 18, 2012

### Vargo

Looks close. But you lost a minus sign somewhere. Your solutions should decay. Also, you have an initial value of (-5,6,7), so you can solve for A,B,C. You could simplify this more by including a factor of 1/20 in your function k.

15. Dec 18, 2012

### CAF123

In the end, I have $$\underline{r} = 7e^{-2t}\hat{i} + 6e^{-3t}\hat{j} -5e^{-t}\hat{k}$$