Find a point further up on the steepest slope line in 3 dimensions?

174 Views Asked by At

I can find the coordinates of point B on the slope line in 2 dimensions. How do I find a similar point on the steepest tangent line in 3 dimensions?

Starting with a point A with coordinates $\left(x_0,f(x_0)\right)$ that lies on a function f I can find an other point B.

B lies on the tangent line at A. $$ \left(x_0+ h, f(x_0)+h\frac{df}{dx} \right)$$

enter image description here

What is the 3 dimensional analogue of this?

I suspect it is something similar to B3 below:

$$A_3\rightarrow\left(x_0,y_0,f(x_0,y_0)\right)$$ $$B_3\rightarrow\left(x_0+h,y_0+g,f(x_0,y_0)+h \frac{\partial f}{\partial x}+g\frac{\partial f}{\partial y}\right)$$

As an example I used the function $$f_3(x,y)=\sin(x)\cos(y)$$

The line segment between the two points should be perpendicular to the contours. But my incorrect B lands to the left of where it should be for A=$\left(0,0,f_3(0,0) \right)$ enter image description here

enter image description here

1

There are 1 best solutions below

2
On

Gradient Ascent computes the correct direction of steepest ascent.

$$A\rightarrow B$$ $$\left(x_0,y_0,f\left(x_0,y_0\right)\right)\rightarrow \left(x_0+h\frac{\partial f}{\partial x},y_0+h\frac{\partial f}{\partial y},f\left(x_0+h\frac{\partial f}{\partial x},y_0+h\frac{\partial f}{\partial y}\right)\right)$$ $$X\rightarrow h\nabla X$$

enter image description here


Gradient Ascent doesn't give you another point on the same line.

Instead it gives you another point in the correct direction but below the line on the surface of $f$.

Below is a modified gradient ascent that gives you another point B on the steepest tangent line. Unfortunate it varies its position on the tangent line as a function of the slope.

$$\left(x_0,y_0,f\left(x_0,y_0\right)\right)\rightarrow \left(x_0+h\frac{\partial f}{\partial x},y_0+h\frac{\partial f}{\partial y},f\left(x_0\right)+h\frac{\partial f}{\partial x}\frac{\partial f}{\partial x}+h\frac{\partial f}{\partial y}\frac{\partial f}{\partial y}\right)$$

enter image description here