Find two angles where the directional derivative is 1 at p0

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
eple
Messages
2
Reaction score
0
1.

Given a function f(x,y) at (x0,y0). Find the two angles the directional derivative makes with the x-axis, where the directional derivative is 1. The angles lie in (-pi,pi].

2.


f(x,y) = sec(pi/14)*sqrt(x^2 + y^2)
p0 = (6,6)

3.

I use the relation D_u = grad(f) * u, where u is the elementary vector <cos(theta),sin(theta)>.

grad(f) at (6,6) is <sec(pi/14)/sqrt(2), sec(pi/14)/sqrt(2)>

Using these we have D_u = 1 = sec(pi/14)/sqrt(2)*(cos(theta) + sin(theta))

Rearranging:

cos(theta) + sin(theta) = sqrt(2) * cos(pi/14)

Isolating theta on LHS by using a relevant angle formula:

sqrt(2)*cos(theta - gamma) = sqrt(2) * cos(pi/14), where gamma = atan(1). Here, atan(1) can be pi/4 or -3*pi/4.

using cos^-1 on L- and RHS.

theta = pi/14 + gamma

Giving the answers:

theta1 = pi/14 + pi/4 = 9*pi/28
theta2 = pi/14 - 3*pi/4 = -19*pi/28

Somehow these angles are incorrect, but I am unable to locate my error in calculating them. Any help in guidance in the right direction will be greatly appreciated.
 
Physics news on Phys.org
eple said:
1.

Given a function f(x,y) at (x0,y0). Find the two angles the directional derivative makes with the x-axis, where the directional derivative is 1. The angles lie in (-pi,pi].

2.


f(x,y) = sec(pi/14)*sqrt(x^2 + y^2)
p0 = (6,6)

3.

I use the relation D_u = grad(f) * u, where u is the elementary vector <cos(theta),sin(theta)>.

grad(f) at (6,6) is <sec(pi/14)/sqrt(2), sec(pi/14)/sqrt(2)>

Using these we have D_u = 1 = sec(pi/14)/sqrt(2)*(cos(theta) + sin(theta))

Rearranging:

cos(theta) + sin(theta) = sqrt(2) * cos(pi/14)

Isolating theta on LHS by using a relevant angle formula:

sqrt(2)*cos(theta - gamma) = sqrt(2) * cos(pi/14), where gamma = atan(1). Here, atan(1) can be pi/4 or -3*pi/4.

using cos^-1 on L- and RHS.

theta = pi/14 + gamma

Giving the answers:

theta1 = pi/14 + pi/4 = 9*pi/28
theta2 = pi/14 - 3*pi/4 = -19*pi/28

Somehow these angles are incorrect, but I am unable to locate my error in calculating them. Any help in guidance in the right direction will be greatly appreciated.

9*pi/28 is corrrect. Things start getting sloppy in the trig part. sqrt(2)(cos(t)+sin(t))=cos(t+pi/4). The other angle for atan(t)=1 doesn't work. It gives negative signs on the sin and cos. And watch out when you use inverse cos. There's more than one angle on (-pi,pi) that has the same cos.