The shortest distance (gradients)

  • Thread starter Thread starter Poetria
  • Start date Start date
  • Tags Tags
    Shortest distance
Click For Summary
SUMMARY

The discussion centers on the optimization problem involving a function defined on a circle with a radius of 0.1, centered at (1,1). The participants analyze the gradient and tangent slopes, arriving at approximate and exact function values of -0.55 and -0.998, respectively. They utilize Wolfram Alpha to confirm a maximum value of -0.572885 at the point (0.914235, 1.05142). The conversation highlights the importance of understanding gradients in relation to optimization problems.

PREREQUISITES
  • Understanding of gradient vectors and their significance in optimization.
  • Familiarity with polar coordinates and their application in optimization problems.
  • Knowledge of basic calculus, particularly derivatives and slopes of functions.
  • Experience with computational tools like Wolfram Alpha for solving mathematical problems.
NEXT STEPS
  • Study the properties of gradients in optimization problems.
  • Learn how to convert Cartesian coordinates to polar coordinates for optimization.
  • Explore advanced calculus techniques for maximizing functions under constraints.
  • Investigate the use of computational tools for solving complex mathematical problems.
USEFUL FOR

Mathematicians, students studying calculus and optimization, and anyone interested in applying gradient analysis to solve real-world problems.

Poetria
Messages
267
Reaction score
42
Homework Statement
Function: ##f(x,y)=y^2-x^3-x##
How can we move from the point (1,1) by a distance of 0.1 by increasing f as much as possible?
What is ##(\Delta x, \Delta y)##
Relevant Equations
$$-4*\Delta x + 2*\Delta y = (-4,2) \cdot (\Delta x, \Delta y)$$

(-4,2) is ##\nabla f(1,1)##
I got:
$$(\frac {1} {\sqrt \frac {5}{0.01}}, \frac {2} {\sqrt \frac {5} {0.01}})$$

The approximate value of the function = -0.55
The exact value of the function = -0.998

Well, the vector and the exact values of the function aren't correct but I don't know why. Any hint?
 
Physics news on Phys.org
The candidates points are on the circle
x=1+r\cos\theta
y=1+r\sin\theta
where r=0.1. Take a look at ##f(x,y)=f(\theta)## to check your result.
 
Last edited:
  • Like
Likes   Reactions: Poetria and Delta2
anuttarasammyak said:
The candidates points are on the circle
x=1+r\cos\theta
y=1+r\sin\theta
where r=0.1. Take a look at ##f(x,y)=f(\theta)## to check your result.
Sorry for the mistake in the title. It should be 'gradient' of course.

Well, how to check it?
I have drawn a tangent computed from the gradient [-4,2].
Slope of the tangent = 2
y=2x
And I have analysed the interception points with the circle: x^2 + y^2 = 0.1

I got the result: ##(\frac {1} {(5*\sqrt{2}}), (\frac {\sqrt{2}} {5})##
The value of the function would be: -0.982828 (slightly different).
 
To my best knowledge the slope of the vector (-4,2) is ##\frac{2}{-4}=-\frac{1}{2}## while the circle in this problem is centered at (1,1) so it has equation $$(x-1)^2+(y-1)^2=0.1^2=0.01$$
 
  • Love
Likes   Reactions: Poetria
But I thought about a normal to the gradient (-4,2).
I.e. slope of (2,4) = 4/2
 
Poetria said:
But I thought about a normal to the gradient (-4,2).
I.e. slope of (2,4) = 4/2
Why normal to gradient?
As far as I know the direction of greatest increase is the direction of the gradient...

But even so, I think this problem doesn't relate to gradient, it seems like an optimization problem to me with optimization function the given function and domain the circle centered at (1,1) and radius 0.1, so I feel one should proceed like post #2 suggests.
 
  • Like
Likes   Reactions: Poetria
Poetria said:
The approximate value of the function = -0.55
The exact value of the function = -0.998
From #2 I got a result below. Your check is highly appreciated.
[EDIT]
I withdraw my calculation for your homework.
 
Last edited:
  • Like
Likes   Reactions: Poetria and Delta2
I did the following in wolfram, that is setting the maximization problem without converting to polar coordinates:
https://www.wolframalpha.com/input/?i=max+y^2-x^3-x,+(x-1)^2+(y-1)^2=0.1^2
Wolfram reports a maximum of -0.572885 at ##(x,y)=(0.914235,1.05142)##, I think this is in perfect agreement with post #2 and #7 where maximization is done in polar coordinates.
 
  • Like
Likes   Reactions: Poetria and anuttarasammyak
Ok, my path is wrong then. :(

(cos(1.10715)*0.1)^2+(sin(1.10715)*0.1)^2=0.01 :(

I have to digest it.
 
Last edited:
  • #10
Your (-4,2) ##\theta## =2 ##\pi##-arctan 1/2 = 2.67635
Calculation in #7 ##\theta##= 2.60152
I see they are not so much different. Your way of taking orientation of gradient is right and exact for infinitesimal displacement. r=0.1 is small but finite. So your answer should be regarded as the first approximation, but I think your teacher evaluate your answer.
 
Last edited:
  • Like
Likes   Reactions: Poetria and Delta2

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 13 ·
Replies
13
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
6K
Replies
4
Views
2K