As we already know, there exists a formula to find the distance of a point of a line, namely $\frac{|Ax_1 + By_1 + C|}{\sqrt{A^2+B^2}}$. Is it possible to find a formula for the distance of a point from a polynomial function, or even better, the distance of a point from any given f(x) where f(x) can be polynomial, exponential, trigonometrical, piecewise etc.? The formula doesn't have to be generalized for all f(x), there can be different formulas for sinusoidal and polynomial f(x) here. I've been stuck on this for a month now...
Also, this is just a personal doubt, not something I was asked in school or anything.
#Distances in analytical geometry
1 messages · Page 1 of 1 (latest)
No Lifer?
This is crazy hard problem to solve in general
well
But one can approach it by considering it as an optimization problem.
I was stuck at it for a month
and still am nowhere
I have a vague idea for quadratics, but that's basically it
It's why i put it in discussion, not like help uni or someth
I don't think an answer to this actually exists yet
You know distance function to certain point right
This is basically about mininization problem of that.
Line thing?
That is not so useful
Yea
it helps in creating parabolas, that's all
So basically, parametrize the curve
This reminds me of like certain metrics in probability like the mahalobonis distance but WAYY more general
hmmm
there has to be an exact func though
sinusoidal seems the easiest
let's try that one first
Is this not involving alg geo??
Thankfully I think algebraic geometry is not needed here
but seriously, if rizzly somehow solves this and convinces the riddle team to post this as a riddle
nah
This is too computation-heavy to become a riddle, sadly
@static sonnet Can you solve this
hmmm
I have an idea for sinusoidal wave
we need an f(x) that locates a certain point
draw line
do intersection
more nonsense
tada
the period is key
alr
I'll focus on my half-yearly exams
then this
It seems super complication most likely unsolvable unless you have some constraints on the type of surfaces ig
oof
for sin in general i believe this produces a transcendental equation
transcendental?
I think you can do it, but using infinite polynomials
Transcedental equation are equations that are insanely insanely hard to solve in the best case scenario. I heard that they are usually impossible to solve with algebra and approximations using computers are the only way
Like for example: x*e^x = 1
Or sin(x+ sin(x)) = 0.3333
Or something crazy like that
Don't take what I say as factual, this is what I think it is. The first and only time I heard about these things was in a Numberphile video about the Goat problem or somrething like that
@silent gyro These kinds of very general questions are hard. I also thought of a similar question: Given any 2 2D shapes(convex or concave) with their respective areas given, how can you calculate the sum of their areas? (There are cases that they might overlap and how they overlqp change the area sum and it also depends on the exact shapes)
I think general problems like ours are just so general that only special cases are solvable in a humane sense
Just how @final sky said above
Oh, another example I've seen in a blackpenredpen video was: sin(x)^cos(x) = 1
well you just calculate the area of intersection
Well yeah but what about general shapes
Like if you were given an iregular pentagon intersecting at a weird angle with just a part of an ellipse
this can be calculated elementarily
there are formulas for area of an ellipse, area of a sector of an ellipse is just the scaled area of the corresponding sector of the circle, and the pentagon can be dealt with using triangles
intersection points can be found easily as well, just plug the line equation into the ellipse
Good luck

that is not a pentagon
Well the problem is about general shapes
and yeah my method will solve that it's just difficult
as opposed to something like sin(x)cos(2x) + cos(3x-sin(4x)) = 1.1 which probably has no way to solve
Actually, about this topic, how do we know that these kinds of equations are not solvable?
Like are there actual proofs showing that they are impossible?
i think so, yes
maybe you can do that if you want the perimeter of the shape
Wdym "if you want the perimeter of the shape"? @static sonnet
no approximation needed for area i mean
Oh you can compute that area directly?
Thinking about it, I guess it is just some integration
this is what i think
Woah
It can always be solved, but the calculation varies depending on the shape and the measurements must be given.
I see
I think I heard about Pick's theorem or something like that
Guess that only works when the vertices of points lie only on integer coordonates points
we can sort the functions out and work on it
me and @final sky will help
Well
hmmm
I say create parametric form of the function
And then optimize the distance using distance formula
I don't have any idea where to start with this though
I think derivatives will be required though
What i am saying is a rathwr generalized technique
Depends
hmmm
That would be our last resort if inequalities dont work
I think a sinusoidal wave would be easier to start with
oh
inequalities?
how would those help here?
am-gm
oh
Cauchy
the typical inequality
Help us to predict range directly
ah
Without having us to calculate at what point its minimum
Basically
- paramatrize the function
- write generalized distance formula
- optimize it using derivatives/inequalities
Thats what you need to go
parametrize the function
how would we go ahead with that though...
sorry if I'm acting stupid here
Well even i dont really on that part to be honest
Parametric equations get you the locus of a point on the curve using a single variable
Thus they are very helpful here
hmmm
what are you guys talking about
But you would need to learn how to actually paramatrize equations
something I don't know
oof
the topic of discussion
Or
Shortest distance from a point to any f(x)
Shortest distance of a point to any curve
any f(x), but sure
sinusoidal wouldn't count as a curve right?
It could be called an infinite polynomial
but
idk
lets try finding the distance from (1,1) to cos(x)
we would like the line through 1,1 that hits cos(x) perpendicular to it
so a(x-1) + 1 = cos(x) where -sin(x) = -1/a
x = arccsc(a)
we want a(arccsc(a)-1) + 1 = cos(arccsc(a))
and now there is an issue
maybe we can replace cos(arccsc(a)) with sqrt(a^2-1)/a but still going to have a problem
well
derivatives
hmmm
-sin(x) at x should be perpendicular to the line with points cos(x) and 1,1
wow
A tangent whose normal passes through the point
cos(x) has a very cool set of normal lines iirc
$\frac{1}{\sin{x}} = \frac{|1-\cos{x}|}{|1-x|}$
Martian Attack Helicopter
Fuck all that logic and stuff
((1 - cos(x))^2 + (1-x)^2)^(1/2)
Minimize the abivw
And its done
Prolly
$|1-x| = \sin{x}|1-\cos{x}|$
Martian Attack Helicopter
@static sonnet am i right ?
$((1 - cos(x))^2 + (1-x)^2)^{1/2}$
Martian Attack Helicopter
here they are
no
hmmm
it didn't find an exact solution which is my point
why not
We have x now
you have x approximately
$1 + x^2 - 2x = \sin^{2}{x}(1 + \cos^{2}{x} - 2\cos{x})$
Martian Attack Helicopter
,w minimize 1+x^2-2x=sin^2(x)*(1+cos^2(x)-2cos(x))
I assure you that
Wolfram Alpha doesn't understand your query!
Perhaps try rephrasing your question?
Click here to refine your query online
wow
,w calculate (0.789781,cos(0.789781)
eyy look at that it can get exact forms oh wait no
what do you mean
what have I done
but
The perpendicular thing
I never thought about that
wait
the differential of an f(x) returns a func that returns the gradient of the original func at a certain point
the derivative, yes
yep
and we want this function to return someth perpendicular
ok
if a line has slope m
a line perpendicular to it has slope -1/m
for let's say, cos(x)
and point, 1,1
Its not always true
wait what
Look at that
You need to select shortest one now
Perpendicular isnt the only condition
the shortest one will always be a perpendicular one if f(x) satisfies some sort of smoothness condition, though
(also, krypton, there is a unique one that goes through (1,1))
.
Only 1 ?
there would be more if it was higher up in the region of double density
I thought so but you posted that graph bruh
Like (0,190 ?
I think
yeah that probably has multiple
i don't remember if i was successful in determining the exact area in which there is only 1 solution
does every point have atleast 1 line
I will try it
Or we can try it
And verify later between us
@static sonnet deal ?
yes
visually
it looks like they do
yeah it does
I was trying to think of edge cases
Point on the curve ones
Would they have a normal to its own curve except their own ?
@static sonnet wanna fully calculate this ?
Not rn
But like whenever each of us have time
if you draw the normals as x moves from π to 3π/2 you get one segment of the hyperbola-looking curves
then minimizing the y value it becomes transcendental so probably no
might be a parametric but i don't think even that can happen
I will find this
Let you know if i get anything
Anywats
Good night @static sonnet
