Directional Derivative

Anything About Anything...
Post Reply
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Directional Derivative

Post by Lucifer »

Ok, here's the problem. Find the directional derivative of the function at the given point in the direction of the vector v.

f(x,y) = 1 + 2 x sqrt(y)
P(3,4)
v = < 4, -3 >











The answer in the book is 23/10.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Have you read the mathworld page on it? Might be something there. (Means squat to me :?.)
Image
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Well, the directional derivative of f(X) in the direction V at the point P is simply the regular derivative of g(t):=f(P+tV) at t=0. Capital letters being vectors.

I get 23/2 if I follow that. I may have made one or the other mistake, but definitely, I see no way of a prime factor of 5 entering the denominator. So I call the book's solution wrong :)

The other definition would be to take all the partial derivatives of f at the given point. Together they form a vector called the gradient of f at that point. Then you build the scalar product of the gradient and the given test vector. Well, actually, the gradient is a linear form and not a vector, but the actual calculations are the same.

My calculation:
g(t)=f(3+4t, 4-3t)=1+2(3+4t)sqrt(4-3t)
Product and chain rules give
g'(t)=8 sqrt(4-3t) + 2(3+4t) * (-3)/(2 sqrt(4-3t))
and at t=0, that's
g'(0)=8 sqrt(4) + 2*3*(-3)/(2*sqrt(4)) = 16 - 9/2 = 23/2.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Here's what I did. I took the gradient approach. If you convert the vector v into a unit vector, you can dot that with the gradient, which is what you were saying. :)

So, I get the gradient to be < 2 sqrt(y), x/sqrt(y) > . Went over that a few times, I'm pretty confident about it. :) (Unless I copied the problem wrong, but I went over that a few times because it is a mistake I make..)

Then the unit vector u is < 4/5, -3/5 >. |v| = sqrt( 4^2 + 3^2 ), which of course yields 5.

So the directional derivative then is:

2 sqrt(y) * 4/5 + x/sqrt(y) * (-3/5)

Plug in the point and I wind up with 13/5.

To check my method (which isn't the method the book tries to teach), I did the problems around it, and each of those I came up with the same answer the book gives. Now I'm looking at it again and wondering if I did the partial derivatives wrong, heh. Now it looks like I didn't bring a 2 down that I should have, which should double the y term in the dot product. Grrr... That gives me 2 for an answer. :(
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
pavelo
Average Program
Posts: 70
Joined: Sun Apr 23, 2006 4:05 pm

Post by pavelo »

z-man wrote:I see no way of a prime factor of 5 entering the denominator. So I call the book's solution wrong :)
well.... it can........ if you normalize the vector before doing the calculations........
but right now im looking at my lecture notes and they dont mention normalizing
though it kinda makes sense for the direction vector to be normalized
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Yes, apparently Lucifer's book wants you to NORMALIZE the vector V before you do the procedure described in my post. The norm (length) of your vector here is 5, that's where the extra factor comes from. In "real" math, you avoid normalization requirements, because not all vector spaces have the concept of the length of a vector.

Lucifer's gradient is right. The problem must be with the insertion of the point, I get:
2 sqrt(y) * 4/5 + x/sqrt(y) * (-3/5) =
2 sqrt(4) * 4/5 + 3/sqrt(4) * (-3/5) =
2 * 2 * 4/5 + 3*(-3)/(2*5) = 16/5 - 9/10 = 32/10 - 9/10 = 23/10.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Wait a minute, I did a substitution wrong. I just found a 10 in the denominator when I thought there shouldn't be one.

I'm satisfied with the partial y again, because you take the 1/2 out front and get 2/2, so x/sqrt(y) unless I'm badly mistaken.

So the substition should look like (bold indicating where I screwed up):

2 sqrt(4) * (4/5) + 3/sqrt(4) * (-3/5)
4 * 4/5 + 3/2(-3/5)
16/5 - 9/10
32/10 - 9/10 = 23/10

It at least agrees with the book. :)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Hey, this is even more unreadable than what I did earlier :)
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Hmm, the textbook includes "unit vector" in the definition of the directional derivative.
James Stewart wrote: The directional derivative of f at (x0, y0) in the direction of a unit vector u = <a,b> is:

<fancy calculus stuff omitted>

if this limit exists.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: Directional Derivative

Post by Jonathan »

Lucifer wrote:Find the directional derivative of the function at the given point in the direction of the vector v.
I'd say that direction is a normalized version.
ˌɑrməˈɡɛˌtrɑn
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

I'd say that the direction is the member of an oriented line bundle. That's fancy math speech for "the length of the vector giving the direction does not matter, v and 2 * v give the same direction. v and -v don't give the same direction." Obviously, you can't say anything about a directional derivative along a direction with that definition other than whether the function is increasing, decreasing or constant. Real math is really useful :)
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

Entirely correct, and a very general way to look at it. In the end it's probably just a matter of context/ambiguity.
ˌɑrməˈɡɛˌtrɑn
Post Reply