1

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

Conor
  • 536
  • The problem is that in three dimensions there is not a single tangent line, but an infinite number of them. There's one tangent plane though, but you still have to specify a direction to go in. – rubik Jul 28 '16 at 11:29
  • I meant to say "steepest tangent line!" will edit the question now. thank you – Conor Jul 28 '16 at 11:29
  • 1
    If you do a websearch for "steepest ascent" l bet you'll find an answer. Then, you can come back here and post it. – Gerry Myerson Jul 28 '16 at 12:55

1 Answers1

1

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

Conor
  • 536