preet
- 96
- 0
This isn't really a homework question, but may be similar to a typical example problem so I posted it here.
I want to find the max and min dot product of a 3d vector and all points in a sphere constrained by angles in spherical coordinates.
A point on the sphere can be expressed using spherical parameters (R is constant) as:
[itex]x=R*sin\theta*cos\phi[/itex]
[itex]y=R*sin\theta*sin\phi[/itex]
[itex]z=R*cos\theta[/itex]
The dot product between any point on the sphere and a vector [A,B,C] can be written as:
[itex]f(\theta,\phi) = A*R*sin\theta*cos\phi + B*R*sin\theta*sin\phi + R*cos\theta[/itex]
We can set some constraint [itex]\theta = \theta_A[/itex] on [itex]f[/itex] and then find the extrema to find the max and min.
From Wikipedia, I can set up Lagrange Multipliers with my function and the constraint using
[itex]\Lambda(x,y,\lambda) = f(x,y) + \lambda \cdot \Big(g(x,y)-c\Big),[/itex]
and solve
[itex]\nabla_{x,y,\lambda} \Lambda(x , y, \lambda)=0.[/itex]
The problem is I'm not sure how to set up the gradient. I know that the gradient has a slightly different definition in spherical coordinates. Which definition of the gradient should I be using here?
Homework Statement
I want to find the max and min dot product of a 3d vector and all points in a sphere constrained by angles in spherical coordinates.
Homework Equations
A point on the sphere can be expressed using spherical parameters (R is constant) as:
[itex]x=R*sin\theta*cos\phi[/itex]
[itex]y=R*sin\theta*sin\phi[/itex]
[itex]z=R*cos\theta[/itex]
The Attempt at a Solution
The dot product between any point on the sphere and a vector [A,B,C] can be written as:
[itex]f(\theta,\phi) = A*R*sin\theta*cos\phi + B*R*sin\theta*sin\phi + R*cos\theta[/itex]
We can set some constraint [itex]\theta = \theta_A[/itex] on [itex]f[/itex] and then find the extrema to find the max and min.
From Wikipedia, I can set up Lagrange Multipliers with my function and the constraint using
[itex]\Lambda(x,y,\lambda) = f(x,y) + \lambda \cdot \Big(g(x,y)-c\Big),[/itex]
and solve
[itex]\nabla_{x,y,\lambda} \Lambda(x , y, \lambda)=0.[/itex]
The problem is I'm not sure how to set up the gradient. I know that the gradient has a slightly different definition in spherical coordinates. Which definition of the gradient should I be using here?