# Directional Derivatives vs. Partial Derivatives

• Buri
In summary, the directional derivative of a function is the derivative of f with respect to the direction that makes an angle with the x-axis.
Buri
I have a question about these two. I have a direction derivative at a in the direction of u defined as:

f'(a;u) = lim [t -> 0] (1/t)[f(a + tu) - f(a)]

And the partial derivative to be defined as the directional derivative in the direction of u = e_i.

My text, Analysis on Manifolds by Munkres, says that the directional derivative exists if the limit exists which I understand to mean that the right and left handed limits exists and are equal to each other. However, I asked here earlier about f(x,y) = |x| + |y| and was told the directional derivatives definition is t+ -> 0, so in fact the directional derivatives of f(x,y) do exist! But with even tweaking my definition to t+ then my partial derivatives get messed up because apparently I have to check those for t+ and t- and must equal each other.

So I'm really really confused. Can someone help me out on this? I would think that Munkres would define them correctly, so I'm probably not understanding something. Any help?

I don't know what you mean by "t+-> 0".

To find the directional derivative of f(x,y), in the direction that makes angle $\theta$ with the x-axis, you can use the unit vector $cos(\theta)\vec{i}+ sin(\theta)\vec{j}$.

In particular, for f(x,y)= |x|+ |y|, at (0, 0) we have
$$D_\theta f(0, 0)= \lim_{t\to 0}\frac{f(tcos(\theta), tsin(\theta)}{t}$$
$$= \lim_{t\to 0}\frac{|t||cos(\theta)|+ |t||sin(\theta)|}{t}= (cos(\theta)+ sin(\theta)\lim_{t\to 0}\frac{2|t||}{t}$$
and that is clearly going to give different results for t approaching 0 from above or below.

By t+ -> 0 I mean the limit from the right - so approaching through positive values.

So does this mean the limit doesn't exist then? Because I was told on here (and also checked wiki) that I'm only supposed to consider t going to 0 from positive values in directional derivatives, but for partial derivatives I must evaluate the limit for t going to 0 from positive values and negative values. I'm not exactly sure which one now? You seem to be checking left and right derivatives, which is what I initially had done. And I had the the directional deriviatves didn't exist as a result. So which is correct now? I also checked with someone else about this and they had that the directional derivatives did exist for the function we're considering, but the confusion is all a matter of definiton.

Buri said:
By t+ -> 0 I mean the limit from the right - so approaching through positive values.

So does this mean the limit doesn't exist then? Because I was told on here (and also checked wiki) that I'm only supposed to consider t going to 0 from positive values in directional derivatives, but for partial derivatives I must evaluate the limit for t going to 0 from positive values and negative values.
Could you give spefics? No, directional derivatives are NOT "from positive values", unless you are talking about a function, such as ln(x) which is not defined for x< 0 and so only has one sided limits.

I'm not exactly sure which one now? You seem to be checking left and right derivatives, which is what I initially had done. And I had the the directional deriviatves didn't exist as a result. So which is correct now? I also checked with someone else about this and they had that the directional derivatives did exist for the function we're considering, but the confusion is all a matter of definiton.

Well the example you considered:

f(x,y) = |x| + |y|

I had initially thought that the directional derivatives did not exist since the left and right limits weren't equal. But only taking the limit for t > 0 then they do. A user on here said they did exist (he was taking t through positive values). So I got all confused.

So I guess we're supposed to alter the definition depending on the function we're trying to find the directional derivatives for?

Perhaps you are thinking of this case:
Approaching (x, y) from the direction that makes angle $\theta$ with the x- axis,
$$D_\theta(f)= \lim_{r\to 0}\frac{f(x+ rcos(\theta), y+ rsin(\theta))- f(x, y)}{r}$$

There r goes to 0 from above because r, a distance, is always positive. But as long as the function is differentiable at (x, y), that will give the same result, with reversed sign, as approaching along angle $2\pi+ \theta$ which is exactly the same as reversing the sign on r.

Sorry its been a while, I've been rather busy with midterms. So I suppose also (contraspositive) that if not all directional derivatives exist at a point then the function is not differentiable at the point right?

Btw, geometrically what is the directional derivative of a function f: R -> R? Is it like the slope of a messed up tangnet? That's what it seems like..

It's probably a matter of definition whether to take the limit from both sides or just one side, but I don't think the latter is standard. Could you post a link to that thread you referred to?

And you are right, if f is differentiable at some point (by which I mean the 'total derivative' exists at that point), then the dir. der. at that point in all directions exist. However, the converse does not hold: if at some point f is directionally differentiable in all directions, it need not follow that f is differentiable at that point. An example:

$$f:\mathbb{R}^2\to \mathbb{R}^2$$
$$f(x,y):=\begin{cases}\frac{xy^2}{x^2+y^4}\text{ if }(x,y)\neq (0,0) \\ 0\text{ if }(x,y)= (0,0) \end{cases}.$$
Exercise: check my statement, in particular show that the dir. der. of f at (0,0) in every direction exists, while f is not differentiable at (0,0).

@your last point: the dir.der. of a function f:R\to R is the same as the ordinary derivative, since R has only one 'direction': it's a 1-dimensional vector space.

Last edited:
Landau said:
It's probably a matter of definition whether to take the limit from both sides or just one side, but I don't think the latter is standard. Could you post a link to that thread you referred to?

Here they are:

Landau said:
@your last point: the dir.der. of a function f:R\to R is the same as the ordinary derivative, since R has only one 'direction': it's a 1-dimensional vector space.

But I could take scalar multiples of the directional vector, couldn't I? And this would distort it a bit, right?

Also I notice everyone whose helped me uses polar coordinates or does directional derivatives with angles. Why is this? See my definition of a directional derivative at a in the direction of u is:

D_u f(a) = lim[t → 0] 1/t[f(a + tu) - f(a)]

On a problem set I handed in a while back (and got back already) I had to show the following function was not differentiable at 0 but all directional derivatives exist at 0:

Let f(x,y) = √|xy| if x ≥ 0 OR -√|xy| if x < 0

So if I let v = (h,k) I have:

D_v f(a) = lim[t → 0] 1/t[f(t(h,k) - f(a)]

But now it gets a bit confusing, because of all the cases.

For h ≥ 0 I have:

D_v f(a) = lim[t → 0] √|(th)(tk)|/t = lim[t → 0] |t|√|hk|/t

See, but how do I really know that f(t(h,k)) = √|(th)(tk)| ? Because when I take the left and right limits t > 0 or t < 0 so it would change the value of the function since the first coordinate could turn out to be greater than zero and less than zero. So would I end up with 4 cases instead? Like below:

Case 1: t > 0 and h ≥ 0

D_v f(a) = lim[t → 0] √|(th)(tk)|/t = lim[t → 0] |t|√|hk|/t = lim[t → 0] t√|hk|/t = |hk|

Case 2: t < 0 and h ≥ 0

D_v f(a) = lim[t → 0] -√|(th)(tk)|/t = lim[t → 0] -|t|√|hk|/t = lim[t → 0] -(-t)√|hk|/t = √|hk|

So for h ≥ 0 the limit exists.

Case 3: t > 0 and h < 0

D_v f(a) = lim[t → 0] -√|(th)(tk)|/t = lim[t → 0] -|t|√|hk|/t = lim[t → 0] -t√|hk|/t = -√|hk|

Case 4: t < 0 and h < 0

D_v f(a) = lim[t → 0]√|(th)(tk)|/t = lim[t → 0]|t|√|hk|/t = lim[t → 0] -t√|hk|/t = -√|hk|

So the limit exists for h < 0.

However, the right and left limits don't equal each other. So the limit shouldn't exist right? But apparently they do. My TA happened to mark this question and I sneakily (I lost a mark on it because of it lol) removed the negative on the last one so the left and right should be equal, but then he inserted the ± into it. But wouldn't that mean the limit doesn't exist? I asked him about it, but he didn't seem to understand my confusion. So help would be amazing.

Last edited:
Wait a second. They do exist. I've broken up the cases for v = (h,k) for h ≥ 0 and h < 0, but when I do the limits they (the cases for h ≥ 0 and h < 0) don't need to be equal since these aren't the left and right limits. So D_v f(a) = ±√|hk|, that's why when my TA inserted the ± it wasn't contradicting that the directional derivatives indeed do exist. I'm correct, right?

Last edited:
Buri said:
Wait a second. They do exist. I've broken up the cases for v = (h,k) for h ≥ 0 and h < 0, but when I do the limits they (the cases for h ≥ 0 and h < 0) don't need to be equal since these aren't the left and right limits. So D_v f(a) = ±√|hk|, that's why when my TA inserted the ± it wasn't contradicting that the directional derivatives indeed do exist. I'm correct, right?
Yes, of course. For each FIXED direction v=(h,k) you have to compute the limit. The case h>=0 and h<0 give you different directions, totally independent.

By the way, I see why some would only talk about the limit for t>0: we are taking the derivative at a in the direction of v, so informally "we start at a and move infinitesimally towards v". If t<0 then "we start at a and move towards -v", so to speak.

In one of the threads you linked to, I have explained some things about the total derivative and the directional derivative. Please have a look :)

Last edited:

## 1. What is the difference between directional derivatives and partial derivatives?

The main difference between these two types of derivatives is the direction in which they are taken. Directional derivatives measure the rate of change of a function in a specific direction, while partial derivatives measure the rate of change in a specific variable.

## 2. When would you use directional derivatives instead of partial derivatives?

Directional derivatives are useful when you need to find the rate of change of a function in a specific direction, such as finding the steepest slope or the direction of maximum increase. This is especially important in fields such as physics and engineering.

## 3. How do you calculate a directional derivative?

To calculate a directional derivative, you need to take the dot product of the gradient vector and a unit vector in the desired direction. This can be expressed mathematically as Duf(x,y) = ∇f(x,y)•u, where ∇f(x,y) is the gradient vector and u is the unit vector in the desired direction.

## 4. Can directional derivatives be negative?

Yes, directional derivatives can be either positive, negative, or zero. A positive value indicates an increase in the function in the specified direction, a negative value indicates a decrease, and a value of zero indicates no change in that direction.

## 5. Are partial derivatives and directional derivatives related?

Yes, partial derivatives and directional derivatives are related through the concept of the gradient. The gradient is a vector that consists of all the partial derivatives of a multivariable function, and it points in the direction of maximum increase. Taking the dot product of the gradient with a unit vector in a specific direction gives the directional derivative in that direction.

• Calculus
Replies
1
Views
687
• Calculus
Replies
6
Views
2K
• Calculus
Replies
9
Views
1K
• Calculus
Replies
2
Views
2K
• Calculus
Replies
4
Views
2K
• Calculus
Replies
3
Views
3K
• Calculus
Replies
3
Views
1K
• Calculus
Replies
1
Views
1K
• Calculus
Replies
3
Views
2K
• Calculus
Replies
5
Views
2K