Understanding gradient concept

  • Thread starter Thread starter PainterGuy
  • Start date Start date
  • Tags Tags
    Concept Gradient
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 2K views
PainterGuy
Messages
938
Reaction score
73
<Moderator's note: Moved from a technical forum and thus no template.>

Hi

I was trying to understand the concept of gradient. I'm using Thomas's Calculus 12th Ed.

Please have a look here. Using the Definition 1, the answer came to be 3.54.

Then, I tried to attempt the same problem using Theorem 1 shown here. My attempt is shown below and the answer is 4.123. For some reason there are few mistakes in my code. For clarity you can refer to this image too.

I'm getting different answers using Definition 1 and Theorem 1. In my opinion, the answers should have been the same. Could you please guide me? Thank you.

##f(x,y)=z=x^{2}+(x\cdot y)##

##\frac{\partial z}{\partial x}=2x+y##

##\frac{\partial z}{\partial y}=x##

##\nabla f=\frac{\partial z}{\partial x}i+\frac{\partial z}{\partial y}j##

##\nabla f=\left( 2x+y\right) i+\left( x\right) j##

At point ##P_{0}=(1,2)##

##\nabla f=\left( 2x+y\right) i+\left( x\right) j=\left[ 2(1)+2\right] i+j=4i+j##

##\left( \frac{df}{ds}\right) _{u,P_{0}}=\left( \nabla f\right) _{P_{0}}\cdot u =\left\Vert \nabla f\right\Vert \left\Vert u\right\Vert \cos \theta ##

Unit vector in the direction ##4i+j##:

##\frac{4i}{4.123}+\frac{j}{4.123}=0.97i+0.243j##

##\left\Vert \nabla f\right\Vert \left\Vert u\right\Vert \cos \theta =0.97(4)+0.243(1)=3.88+0.243=4.123##

##\left( 4i+j\right) \left( \frac{1}{\root{2}\of{2}}i+\frac{1}{\root{2}\of{2}}j\right) =2.83+0.707=3.54##
 

Attachments

  • grad11.jpg
    grad11.jpg
    32.5 KB · Views: 768
  • grad22.jpg
    grad22.jpg
    14.4 KB · Views: 656
  • grad33.jpg
    grad33.jpg
    25.4 KB · Views: 676
Last edited by a moderator:
Physics news on Phys.org
Thank you.

There is only error in my code and that is \QTRbfu. I was just trying to boldface unit vector u. I also attached a copy of my code in a picture form so that there is no confusion. Please check the attachment grad33.

LCKurtz said:
why are you making a unit vector out of 4i + j? The unit vector u is made from i + j.

According to Theorem 9 the unit vector should be in the direction of ∇f and ∇f=4i + j.

Orodruin said:
Why are you surprised that you get different directional derivatives when using different directions?

I think that I understand it now. Definition 1 is for a directional derivative but Theorem 9 is particularly about gradient always points in the direction of maximum increase. The unit vector 1/√2 i + 1/√2 j does not point in the direction of maximum increase or in the direction of 4i + j. Please let me know that if I'm wrong.

Thanks a lot for your help.
 
PainterGuy said:
The unit vector 1/√2 i + 1/√2 j does not point in the direction of maximum increase or in the direction of 4i + j.
There is nothing in the theorem you quote that restricts the derivative to the maximal increase. It is a theorem about the relation between the directional derivative in an arbitrary direction and the gradient.
 
Thank you. I might have misinterpreted it. But to get maximum increase, you need a unit vector in the direction of 4i+j because it gives you cos(theta)=0.

I was thinking that Definition 1 and Theorem 9 stand for the same thing. I think that they do mean the same thing. Theorem 9 will give you a maximum value only if unit vector is the direction of nabla(f).