Following the Gradient
By: Arieli Nurque Baez and Anjanay Narayan
Introduction
In calculous three or multivariable calculous the gradient is one of the most important
concepts. For any surface defined by a function that contains two variables, for example (𝑥, 𝑦),
the gradient vector will always point towards the direction of steepest ascent. By moving small
distances in the direction of the gradient, we can numerically approximate the path that climbs
the surface.
In this experiment, me Arieli Nurque Baez and my partner Anjanay Narayan,
experimented with the gradient method to find the path of quickest ascend for the function;
𝑧 = 10 − 𝑥 2 − 6𝑦 2 , as directed we began at the point (2,1), we used both hand calculations and
computational tools such as Excel and Desmos 3D. Through the calculations and graphs,
calculated the relationship between gradient vectors, optimization, and the geometry of the
surface became clear.
Tools
The tools we used in the project to create the tables, graphs, and visualizations includes
both Microsoft Excel and Desmos 3D. Microsoft Excel was used to create the points(𝑎2 , 𝑏2 )
through (𝑎𝑛 , 𝑏𝑛 ), as well as to perform calculations, and generate tables and two-dimensional
graphs. Desmos 3D was used to visualize the function, surfaces and the points from the graph in
three dimensions, making it easier to visualize the behavior of the gradient and the path of
steepest ascent.
Surface and Starting Point
The surface for this project is defined by the given equation,
𝑧 = 10 − 𝑥 2 − 6𝑦 2 ,
The equation represents a downward-opening elliptic-paraboloid with its maximum or the vertex
located at (0,0,10). The path of steepest ascent begins at the initial point (2,1,0), which lies on
the surface since substituting 𝑥 = 2 and 𝑦 = 1 into the equation. Substituting the point into the
equation gives 𝑧 = 10 − 22 − 6(1)2, which results in 𝑧 = 0.
The ∇𝐹
The gradient is a function with a vector value found by finding the first derivative in
terms of each variable.
𝑧 = 𝑓(𝑥, 𝑦) = 10 − 𝑥 2 − 6𝑦 2
The gradient of which would be x is the derivative with respect to x and y is the derivative with
respect to y.
∇𝑓 = (−2𝑥, −12𝑦)
To then find the directional derivative we plug in a point (2,1).
∇𝑓(2,1) = (−4, −12)
Manually generating points
To generate points (𝑎2 , 𝑏2 ) through (𝑎5 , 𝑏5 ), we used the following formulas,
𝑎𝑛 = 𝑎𝑛−1 + 0.02(𝑓𝑥 (𝑎1 , 𝑏1 ))
𝑏𝑛 = 𝑏𝑛−1 + 0.02(𝑓𝑦 (𝑎1 , 𝑏1 ))
Which gives the results;
𝑎𝑛
2
1.92
1.84
1.76
1.68
𝑏𝑛
𝑧𝑛
1
0.76
0.52
0.28
0.04
0
2.848
4.992
6.432
7.168
Table 1
The calculations were everything previously stated is found in image 1.
image 1
Formula for (𝑎𝑛 , 𝑏𝑛 )
To calculate the remaining points (𝑎5 , 𝑏5 ) through (𝑎30 , 𝑏30 ), we decided to use an excel
spreadsheet to automatically calculate 𝑎𝑛 , 𝑏𝑛 as well as 𝑧𝑛 . Since each point requires the point
before we used the same formula that we used for the handwritten calculations;
𝑎𝑛 = 𝑎𝑛−1 + 0.02(𝑓𝑥 (𝑎1 , 𝑏1 ))
𝑏𝑛 = 𝑏𝑛−1 + 0.02 (𝑓𝑦 (𝑎1 , 𝑏1 ))
The complete set of calculated coordinates is presented in Table 2, while the corresponding
graphical representation of the path is shown in Graph 1.
Graph 1
Graph 1 bellow is the result of the previous calculations it has all the points (𝑎1 , 𝑏1 )
through (𝑎30 , 𝑏30 ).
Graph 1
Tables
𝑎𝑛
𝑏𝑛
2
1.92
1.84
1.76
1.68
1.6
1.52
1.44
1.36
1.28
1.2
1.12
1.04
0.96
0.88
0.8
0.72
0.64
0.56
0.48
0.4
0.32
0.24
0.16
0.08
0
-0.08
-0.16
-0.24
-0.32
1
0.76
0.52
0.28
0.04
-0.2
-0.44
-0.68
-0.92
-1.16
-1.4
-1.64
-1.88
-2.12
-2.36
-2.6
-2.84
-3.08
-3.32
-3.56
-3.8
-4.04
-4.28
-4.52
-4.76
-5
-5.24
-5.48
-5.72
-5.96
𝑧𝑛
0
2.848
4.992
6.432
7.168
7.2
6.528
5.152
3.072
0.288
-3.2
-7.392
-12.288
-17.888
-24.192
-31.2
-38.912
-47.328
-56.448
-66.272
-76.8
-88.032
-99.968
-112.608
-125.952
-140
-154.752
-170.208
-186.368
-203.232
Table 2
The previous table shows all thirty points given by the formulas,
𝑎𝑛 = 𝑎𝑛−1 + 0.02(𝑓𝑥 (𝑎1 , 𝑏1 ))
𝑏𝑛 = 𝑏𝑛−1 + 0.02 (𝑓𝑦 (𝑎1 , 𝑏1 ))
𝑓𝑥
𝑓𝑦
-4
-3.84
-3.68
-3.52
-3.36
-3.2
-3.04
-2.88
-2.72
-2.56
-2.4
-2.24
-2.08
-1.92
-1.76
-1.6
-1.44
-1.28
-1.12
-0.96
-0.8
-0.64
-0.48
-0.32
-0.16
0
0.16
0.32
0.48
0.64
-12
-9.12
-6.24
-3.36
-0.48
2.4
5.28
8.16
11.04
13.92
16.8
19.68
22.56
25.44
28.32
31.2
34.08
36.96
39.84
42.72
45.6
48.48
51.36
54.24
57.12
60
62.88
65.76
68.64
71.52
Table 3
The previous table demonstrate the values of the values of the directional derivative for at point
(𝑎𝑛 , 𝑏𝑛 ). These values demonstrate the rate of change of the function in the direction of the
gradient at each point
Graph 2
Graph 2
The graph above illustrates the three-dimensional surface defined by the equation
𝑧 = 10 − 𝑥 2 − 6𝑦 2 ,
which is shown in red.
On the surface the calculated points (𝑎1 , 𝑏1 ) through (𝑎30 , 𝑏30 ), are displayed in blue.
The points, trace the path of steepest ascent, showing the direction in which the function
increases most rapidly. Each new point is obtained by moving a small distance in the direction of
the gradient vector, causing the path to progress toward the maximum value of the surface.
Conclusion
This project has shown us how the gradient can be used to approximate the path of
steepest ascent on a three-dimensional surface with a numerical approach. By calculating the
gradient vector, generating successive points by hand, as well as extending the process with
Excel, we were able to model the movement from an initial point toward higher values of the
function. Plotting these points in Desmos 3D provided a clear visualization of both the path on
the xy-plane and the corresponding path on the surface, reinforcing the geometric meaning of the
gradient.