Find two angles where the directional derivative is 1 at p0

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.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top