The shortest distance (gradients)

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

Homework Help Overview

The discussion revolves around a problem related to gradients and optimization within a circular constraint. Participants are analyzing the behavior of a function defined in a two-dimensional space, specifically focusing on points on a circle centered at (1,1) with a radius of 0.1.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants explore the relationship between gradients and tangent lines, questioning the correctness of their calculated values and slopes. Some discuss the implications of using polar coordinates for optimization, while others reflect on the nature of the problem as an optimization challenge rather than purely gradient-related.

Discussion Status

There is an ongoing exploration of different methods to approach the problem, including the use of Wolfram Alpha for maximization. Participants are sharing their calculations and results, with some expressing uncertainty about their methods and results. No consensus has been reached, but various perspectives on the problem are being examined.

Contextual Notes

Participants note potential errors in their calculations and the importance of understanding the relationship between gradients and optimization within the given constraints. The problem's setup and the definitions of the function and its domain are under scrutiny.

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
3K
  • · 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