Here is the graph of 10x^3 + 10x^2 - 10x - 5y^3 + 100y = 5
. How can I find its points of inflection or those parts that the trend of the graph bends or sways?
Reference:
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityHere is the graph of 10x^3 + 10x^2 - 10x - 5y^3 + 100y = 5
. How can I find its points of inflection or those parts that the trend of the graph bends or sways?
Reference:
f = 10 x^3 + 10 x^2 - 10 x - 5 y^3 + 100 y - 5;
EDIT: Simplified calculation of points based on comment by mikuszefski
(pts1 = {x, y} /. Solve[D[f, y] == 0 && f == 0, {x, y}, Reals] //
Simplify) // N
(* {{-3.08289, 2.58199}, {2.42487, -2.58199}} *)
(pts2 = {x, y} /. Solve[D[f, x] == 0 && f == 0, {x, y}, Reals] //
Simplify) // N
(* {{-1., -4.44692}, {-1., -0.0500063}, {-1.,
4.49693}, {0.333333, -4.50601}, {0.333333, 0.0685346}, {0.333333,
4.43747}} *)
Show[
ContourPlot[f, {x, -8, 8}, {y, -10, 10}, Contours -> {0},
ContourShading -> None],
Graphics[{AbsolutePointSize[6],
Red, Point[pts1],
Blue, Point[pts2]}]]
I assume an inflection point has zero curvature. Here is my attempt:
eq1 = 10*x^3 + 10*x^2 - 10*x - 5*y^3 + 100*y == 5;
soln1 = {ToRules[Reduce[eq1, y]]};
eq2 = FullSimplify[ArcCurvature[{x, y /. soln1[[#]]}, x, "Cartesian"]] == 0 & /@ Range@Length@soln1; (* this may take a while *)
soln2 = NSolve[#, x, Reals] & /@ eq2 // Flatten[#, 1] &
pts = {x, y} /. soln1 /. soln2[[#]] & /@ Range@3 // Flatten[#, 1] &
{{-0.343223, -4.4761}, {-0.343223, 0.00794074}, {-0.343223, 4.46816}, {-0.333251, -4.47676}, {-0.333251, 0.00927029}, {-0.333251, 4.46749}, {-0.323341, -4.47742}, {-0.323341, 0.0105916}, {-0.323341, 4.46683}}
Inflection points seem to be clustered together.
ContourPlot[Evaluate[eq1], {x, -8, 8}, {y, -10, 10}, Epilog -> {Red, PointSize[0.04], Point[pts]}, GridLines -> Automatic]
pts = ({x, y} /. soln1[[#]] /. soln2[[#]]) & /@ Range@3
(that's why the extra points)
$\endgroup$
Feb 17, 2017 at 22:06
Finding points of vanishing curvature on implicit curve:
f[x_, y_] := -5 - 10 x + 10 x^2 + 10 x^3 + 100 y - 5 y^3
h = D[f[x, y], {{x, y}, 2}];
a = D[f[x, y], {{y, x}}] {1, -1};
k[u_, v_] :=
Expand[a.h.a]/(D[f[x, y], {{x, y}}].D[f[x, y], {{x, y}}])^(3/
2) /. {x -> u, y -> v}
p = {u, v} /. NSolve[k[u, v] == 0 && f[u, v] == 0, {u, v}, Reals]
ContourPlot[f[x, y], {x, -10, 10}, {y, -10, 10}, Contours -> {{0.}},
ContourShading -> None, Epilog -> {Red, PointSize[0.02], Point[p]}]