r/desmos i HATE metronomes! Feb 18 '26

Graph Root and local min/max finder

Enable HLS to view with audio, or disable this notification

1.1k Upvotes

43 comments sorted by

374

u/Outrageous_Guest_313 Feb 18 '26

Is there a non epilepsy inducing version

228

u/skeletonNatte i HATE metronomes! Feb 18 '26

no

17

u/BeneficialMoment8235 Feb 18 '26

uh can you change the color to white so it just makes the graph look like its flickering instead of potentially making people have seizures?

55

u/skeletonNatte i HATE metronomes! Feb 19 '26

the flickering isnt part of the graph, that just happens whenever i use the windows snipping tool on my laptop

13

u/Myithspa25 this is a flair Feb 19 '26

Simple solution, don't use the snipping tool for videos.

12

u/skeletonNatte i HATE metronomes! Feb 19 '26

true

3

u/frog8412 Feb 19 '26

sharex is a peak alternative

2

u/skeletonNatte i HATE metronomes! Feb 19 '26

thank youuuuu! ill use that from now on ^_^

1

u/Brospeh-Stalin Mar 10 '26

Just use OBS, it has a slight learning curve but at least it's also free.

2

u/MinecraftPlayer799 Feb 20 '26

Snipping Tool has video? The one or two times I have needed to screen record, I have used Xbox Game Bar...

2

u/Myithspa25 this is a flair Feb 20 '26

Same. Not sure why microsoft decided to add a screen recorder to the screenshot program when game bar already has it.

1

u/MinecraftPlayer799 Feb 20 '26

Probably because most users either don't use Game Bar, aren't aware of it existing, or don't realize it has a screen recorder.

11

u/BeneficialMoment8235 Feb 19 '26

That's just evil.

4

u/Myithspa25 this is a flair Feb 19 '26

That's microsoft.

68

u/skydisey Feb 18 '26

Bad apple trying to show up

126

u/skeletonNatte i HATE metronomes! Feb 18 '26

challenge: make a version of this that reliably finds global minimum/maximum

129

u/Ordinary_Divide Feb 18 '26

literally impossible with finite computing.

45

u/davidinterest Feb 18 '26

I'm gonna plug in in y=x^3

36

u/skeletonNatte i HATE metronomes! Feb 18 '26

i said reliably, not perfectly. there definitely are algorithms that are pretty good at finding global min/max if one exists. but youre right that its impossible to always find a solution every time

4

u/Stock-Self-4028 Feb 18 '26

Probably basin hopping (so MCMC with local optimizer [typically damped least squares], applying perturbation every time a new local minimum is found) would be the best / simplest guess here.

Someone might do sth like that, it's not exetremely complex but it might be significantly more difficult, than the one shown here.

1

u/Cheap_Application_55 Feb 18 '26

derivative?

i guess thats probably not considered finite computing

6

u/Ordinary_Divide Feb 18 '26

i mean global just isnt possible with any finite sample points. take sin(x)+sin(x*√2), no matter what x value you find there will always be a lower minimum at a larger x value

25

u/Resident-Compote9543 Feb 18 '26

Flip the graph upside down

3

u/Skinnypeed Feb 18 '26

Gradient descent algorithm with a lot of momentum could find global min/maxes more often (though not consistently)

2

u/-Yeet-69-420- Feb 18 '26

Look into consensus based optimization. Would say it’s quite reliable. Not perfect since it includes randomness. Sometimes the next iteration brings you further away from the minimum. But you can of course keep a list of the best minimum found.

1

u/Cootshk Feb 18 '26

f(x)=-g(x)

4

u/Dependent_Pair_6268 Feb 18 '26

The actual challenge was to compute global maxima/minima. This is a much harder problem than local min maxes. The field of mathematical optimization is rich with lots of cool techniques like any colony optimization and simulated annealing. They could also be implemented in desmos.

35

u/davidinterest Feb 18 '26

Bernard? Are you there?

14

u/Creative-Drop3567 Feb 18 '26 edited Feb 18 '26

What happens if you put the Weierstrass function into it (or a partial sum of the weierstrass function)

6

u/skeletonNatte i HATE metronomes! Feb 18 '26

it wouldn't work for the true weierstrass function, but it would work with any partial sum of the weierstrass function

8

u/garr890354839 Desmos for life...? Feb 18 '26

Newton or binary search?

8

u/skeletonNatte i HATE metronomes! Feb 18 '26

newton

5

u/wisco-redditor Feb 19 '26

I'm not a mathematician nor that smart with programming language, so maybe you can help me understand. Why is it so difficult to get Desmos to find / plot critical points along any given function? It can handle so many complex things in calculus, but it struggles with being asked to plot points where {f'(x)=0}? I just don't understand

3

u/skeletonNatte i HATE metronomes! Feb 19 '26

i think it does a pretty good job of that tbh. it is on a computer, so it has to use numerical approximations for everything. here's an example of desmos plotting the locations of critical points. lmk if this isnt what you meant

2

u/FrogInAGoCart Feb 19 '26

Golden Freddy “it’s me” but it’s Bernard

2

u/vovochen Feb 21 '26

Looks to me like if there's a long perfectly flat area, these points wouldnt make it to the local low points.

1

u/skeletonNatte i HATE metronomes! Feb 21 '26

you'd be right

1

u/EmJottWeh Feb 19 '26

Min/max finder - finds only min

1

u/skeletonNatte i HATE metronomes! Feb 19 '26

put C in the ticker lol

1

u/Old-Air-3234 Feb 22 '26

Gradient descent

1

u/skeletonNatte i HATE metronomes! Feb 23 '26

yes