Skip to main content
Post Undeleted by rm -rf
Post Deleted by user36273
added 637 characters in body
Source Link
user36273
user36273

MinimalBy is an easy way.

yy[x_] = Sin[10 x^2] + 5 Cos[20 x];
d = Table[{x, yy[x]}, {x, 1, 5, 0.0001}];
{X, Y} = First@MinimalBy[d, Last]

{1.7278, -5.99996}

Edit

For a better overview one can do the same with a plot.

plot = Plot[yPlot[y[x], {x, 0, 5}, PlotPoints -> 500];

Determine the plot points.

p1 = Join @@ Cases[Normal@plot, Line[x1__] :> x1, Infinity];
{X, Y} = First@MinimalBy[p1, Last]
{1.72783, -5.99996}

Plot[yLength@p1
**8635**

Edit 2

plt = Plot[y[x], {x, 0, 5}, Mesh -> {{0}}, MeshFunctions -> {y'[#] &}, PlotPoints -> 500];
p2 = Cases[Normal[plt], Point[pt_] :> pt, Infinity];
{X, Y} = First@MinimalBy[p2, Last]
{1.72776, -5.99996}

Length@p2
**61**

To compare the number of points p1 and p2, I chose the same number of plot points. @J.M. 's hint to add Mesh->{{0}},MeshFunctions->{y'[#]&} in the plot greatly reduces the number of points in p2.

Plot[y[x], {x, 0, 5}, Mesh -> {{0}}, MeshFunctions -> {y'[#] &}, 
 MeshStyle -> PointSize[Medium], Epilog -> {Red, PointSize@Large, Point@{X, Y}}]

enter image description hereenter image description here

Thanks to @J.M. for pointing this out!

MinimalBy is an easy way.

y = Sin[10 x^2] + 5 Cos[20 x];
d = Table[{x, y}, {x, 1, 5, 0.0001}];
{X, Y} = First@MinimalBy[d, Last]

{1.7278, -5.99996}

Edit

For a better overview one can do the same with a plot.

plot = Plot[y, {x, 0, 5}, PlotPoints -> 500];

Determine the plot points.

p1 = Join @@ Cases[Normal@plot, Line[x1__] :> x1, Infinity];
{X, Y} = First@MinimalBy[p1, Last]
{1.72783, -5.99996}

Plot[y, {x, 0, 5}, Epilog -> {Red, PointSize@Large, Point@{X, Y}}]

enter image description here

MinimalBy is an easy way.

y[x_] = Sin[10 x^2] + 5 Cos[20 x];
d = Table[{x, y[x]}, {x, 1, 5, 0.0001}];
{X, Y} = First@MinimalBy[d, Last]

{1.7278, -5.99996}

Edit

For a better overview one can do the same with a plot.

plot = Plot[y[x], {x, 0, 5}, PlotPoints -> 500];

Determine the plot points.

p1 = Join @@ Cases[Normal@plot, Line[x1__] :> x1, Infinity];
{X, Y} = First@MinimalBy[p1, Last]
{1.72783, -5.99996}

Length@p1
**8635**

Edit 2

plt = Plot[y[x], {x, 0, 5}, Mesh -> {{0}}, MeshFunctions -> {y'[#] &}, PlotPoints -> 500];
p2 = Cases[Normal[plt], Point[pt_] :> pt, Infinity];
{X, Y} = First@MinimalBy[p2, Last]
{1.72776, -5.99996}

Length@p2
**61**

To compare the number of points p1 and p2, I chose the same number of plot points. @J.M. 's hint to add Mesh->{{0}},MeshFunctions->{y'[#]&} in the plot greatly reduces the number of points in p2.

Plot[y[x], {x, 0, 5}, Mesh -> {{0}}, MeshFunctions -> {y'[#] &}, 
 MeshStyle -> PointSize[Medium], Epilog -> {Red, PointSize@Large, Point@{X, Y}}]

enter image description here

Thanks to @J.M. for pointing this out!

added 443 characters in body
Source Link
user36273
user36273

MinimalBy is an easy way.

y[x_]y = Sin[10 x^2] + 5 Cos[20 x];
d = Table[{x, y[x]y}, {x, 1, 5, 0.0001}];
{X, Y} = First@MinimalBy[d, Last]

{1.7278, -5.99996}

Edit

For a better overview one can do the same with a plot.

plot = Plot[y, {x, 0, 5}, PlotPoints -> 500];

Determine the plot points.

p1 = Join @@ Cases[Normal@plot, Line[x1__] :> x1, Infinity];
{X, Y} = First@MinimalBy[p1, Last]
{1.72783, -5.99996}

Plot[y, {x, 0, 5}, Epilog -> {Red, PointSize@Large, Point@{X, Y}}]

enter image description here

MinimalBy is an easy way.

y[x_] = Sin[10 x^2] + 5 Cos[20 x];
d = Table[{x, y[x]}, {x, 1, 5, 0.0001}];
{X, Y} = First@MinimalBy[d, Last]

{1.7278, -5.99996}

MinimalBy is an easy way.

y = Sin[10 x^2] + 5 Cos[20 x];
d = Table[{x, y}, {x, 1, 5, 0.0001}];
{X, Y} = First@MinimalBy[d, Last]

{1.7278, -5.99996}

Edit

For a better overview one can do the same with a plot.

plot = Plot[y, {x, 0, 5}, PlotPoints -> 500];

Determine the plot points.

p1 = Join @@ Cases[Normal@plot, Line[x1__] :> x1, Infinity];
{X, Y} = First@MinimalBy[p1, Last]
{1.72783, -5.99996}

Plot[y, {x, 0, 5}, Epilog -> {Red, PointSize@Large, Point@{X, Y}}]

enter image description here

Source Link
user36273
user36273

MinimalBy is an easy way.

y[x_] = Sin[10 x^2] + 5 Cos[20 x];
d = Table[{x, y[x]}, {x, 1, 5, 0.0001}];
{X, Y} = First@MinimalBy[d, Last]

{1.7278, -5.99996}