Is this use of the grad function correct?

In summary, the conversation discusses the topic of vector calculus and the relationship between temperature and distance from a heat source. The speaker presents their own question and model for how temperature varies as distance increases, and requests verification of their solution. A correction is made regarding the differentiation and the importance of the negative gradient is explained. The gradient indicates the direction of greatest increase, which in this case is away from the heat source, and the negative sign reflects this.
  • #1
CraigH
222
1
Hi,
I am currently studying vector calculus, and to try and understand it I have created a question for myself, and it would be greatly appreciated if someone could verify that I have answered my question correctly, and I have done everything right.

Okay here it is; Point Q in the room is a heat source, how does the temperature vary as you move away from the origin (0,0,0)

http://img571.imageshack.us/img571/4250/gascube.png
http://imageshack.us/a/img841/4250/gascube.png

.The further away from point Q you are the less heat there is. This can be modeled by:

[itex] dt = \nabla t .dr[/itex]

.(dt) is a scalar, it is a change in temperature
.(dr) is a vector, it is a change in distance of x, y and z [itex](dr=dx\hat{x} +dy\hat{y} +dz\hat{z} )[/itex]
.(del t) is a vector, it is the amount t changes for x, y, and z, for a change in distance of x,y,and z

For the purposes of this example I am going to say that the heat at any point equals 1 divided by the square of the distance from q.

In the x direction
[itex] t = \frac{1}{(xq-x)^{2}}[/itex]

In the y direction
[itex] t = \frac{1}{(yq-y)^{2}}[/itex]

In the z direction
[itex] t = \frac{1}{(zq-z)^{2}}[/itex]

Where (xq,yq,zq)=(0,2.5,2.5) And (x,y,z) is the point you are at

So, [itex] \frac{dt}{dx} = 2(xq-x)^{-1}, \frac{dt}{dy} = 2(yq-y)^{-1}, \frac{dt}{dz} = 2(zq-z)^{-1}[/itex]

And the final answer is:

[itex] dt =(2(xq-x)^{-1}\hat{x} + 2(yq-y)^{-1}\hat{y} + 2(zq-z)^{-1}\hat{z}) . dr[/itex]

Is this correct?

Thank you
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
The gradient points in the direction of greatest increase. Since temperature is decreasing, you will want to take the negative gradient of your function. You also differentiated incorrectly. The derivative of x^(-2) is not 2^(-1). It's -2^(-3). Remember: d/dx(x^n) = nx^(n-1).
 
  • #3
Ah yes I can see I have differentiated incorrectly, although I think it would be 2(xq-x)^-3 and not -2(xq-x)^-3 because of the chain rule:
derivative of (xq-x) with repect to x = -1, so the whole thing will be multiplied by -1.

And can you explain exactly what I did wrong apart from this, I do not really understand why I should have to take the negative gradient, or what this actually even means.

When you say:
Mmm_Pasta said:
The gradient points in the direction of greatest increase

I've always thought that this just meant that if you plot the gradient vector it would point in the direction of greatest increase, but that was just a property of the gradient function, and the true reason you would use the gradient function is to see how much change one variable would change (dt) as three other variables are changing (dr)
[itex]dt = \nabla .dr[/itex]
 
  • #4
I totally missed that -x part. Thanks!

The fact that the gradient points in the direction of greatest increase is the reasons for the negative sign in your case. The temperature is decreasing as you go away from the source. Without this negative sign, the resulting vector field would be pointing away from the source which implies that temperature is increasing.

By multiplying the gradient by -1, the resulting vector field would be pointing towards the source which means that temperature increases towards the source. Gradients are not only used for seeing *how much* a variable changes, but we are also interested in *which direction* the greatest increase/decrease occurs (for other directions we use directional derivatives). In your case, you specified that temperature drops away from the source.

It's a subtle point, but it's important.
 
  • #5
for your question and for sharing your work with us. From a mathematical standpoint, your use of the gradient function is correct. The gradient of a scalar function, such as temperature, is a vector that represents the rate of change of the function in each direction. In this case, the gradient of temperature is showing how the temperature changes as you move in the x, y, and z directions away from point Q.

However, as a scientist, it is important to also consider the physical implications of your calculations. In this case, your model assumes that the heat at any point equals 1 divided by the square of the distance from Q. While this may be a valid assumption for some systems, it may not accurately represent the behavior of all heat sources. It is important to validate your model with experimental data or to consider other factors that may affect the temperature distribution in the room.

Overall, your use of the gradient function is correct, but it is important to also critically evaluate the assumptions and implications of your model in order to make accurate and meaningful conclusions. Keep up the good work in your studies of vector calculus!
 

Related to Is this use of the grad function correct?

1. How do I know if I am using the grad function correctly?

The grad function is used to calculate the rate of change of a variable in a function. To ensure correct usage, make sure you are taking the partial derivative of the function with respect to the desired variable and that the resulting expression is simplified.

2. Can I use the grad function for any type of function?

The grad function is typically used for multivariable functions, but it can also be used for single variable functions. Just remember to take the partial derivative with respect to the variable in question.

3. Is the grad function the same as the derivative?

The grad function and the derivative are similar, but they are not exactly the same. The derivative is used to find the slope of a function at a specific point, while the grad function is used to find the rate of change of a function with respect to a variable.

4. Can I use the grad function to find the maximum or minimum of a function?

No, the grad function does not directly provide information about the maximum or minimum of a function. It is used to find the direction in which the function is changing the fastest, but additional calculations are needed to determine the maximum or minimum.

5. Are there any common mistakes to avoid when using the grad function?

One common mistake is forgetting to take the partial derivative of the function. Another mistake is not simplifying the expression after taking the partial derivative. It is also important to make sure you are taking the derivative with respect to the correct variable.

Similar threads

Replies
3
Views
627
Replies
1
Views
666
  • Classical Physics
Replies
0
Views
309
  • Classical Physics
Replies
6
Views
795
  • Classical Physics
Replies
2
Views
1K
  • Classical Physics
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
10
Views
350
Replies
1
Views
592
Replies
1
Views
181
Replies
33
Views
2K
Back
Top