0
$\begingroup$

I had to redo the problem because there was a mistake. With the given function from a previous problem, I was solving link, I found that the parabola created a trajectory on the graph, ie another parabola.

I'm trying to create a plot where I collect the coordinate points of Min. value for 21 values of parameter a (from -7 to 7), and find a,b, and c such that the points are on the curve of the quadratic equation $ax^2+bx+c=y$. The plot looks something like this

enter image description here

The curve of $ax^2 + b+x +c=y$ goes through all the minimum points for the curves created

$\endgroup$
2
$\begingroup$

I am not sure if I understood the question correctly. Does this solve your question?

Table[{Plot[x^2-2*(a-2)*x+a-2,{x,-20,20}],{a-2,-6+5 a-a^2}},{a,Range[-7,7,14/20]}];
Show[Flatten[{%[[All,1]],Plot[x-x^2,{x,-20,20},PlotStyle->Red],ListPlot[%[[All,2]]]}]]
-6+5 a-a^2/.a->x+2//Expand

Parabolas

I used the code from https://mathematica.stackexchange.com/a/231665/42436 to generate the parabolas and from the formula for the minima {a-2,-6+5 a-a^2} one can directly compute the parabola on which all minima are found: $$x-x^2=y\\ a x^2+b x+c=y\quad\text{with}\quad \{a=-1,b=1,c=0\}$$

$\endgroup$
3
  • $\begingroup$ How can I find the coordinates using Solve command? $\endgroup$ – computer891 Oct 19 '20 at 21:15
  • $\begingroup$ What coordinates? $\endgroup$ – N0va Oct 19 '20 at 21:18
  • $\begingroup$ nevermind, it was found using table command. $\endgroup$ – computer891 Oct 19 '20 at 21:58
2
$\begingroup$

To get the trajectory equation about the minimum, we can do as below.

f[x_, a_] := x^2 - 2*(a - 2)*x + a - 2;
min = Minimize[f[x, a], x];
Eliminate[{x, y} == ({x, y} /. Last@min /. y -> First@min), a]

-y == -x + x^2

To plot the minimum points, here we also use Mesh.

Clear["`*"];
f[x_, a_] := x^2 - 2*(a - 2)*x + a - 2;
curves = Plot[Table[f[x, a], {a, -7, 7, 14/20}], {x, -20, 20}, 
   PlotStyle -> {Thickness[Small], Cyan}];
min = Minimize[f[x, a], x];
trajectory = 
  ParametricPlot[{x, y} /. Last@min /. y -> First@min, {a, -9, 9}, 
   MeshFunctions -> Function[{x, y, a}, a], 
   Mesh -> {Range[-7, 7, 14/20]}, 
   MeshStyle -> {PointSize[Medium], Red}, PlotStyle -> Yellow];
Show[curves, trajectory]

Another way is Show the minimum points by Graphics

points = Graphics[{Red, 
    Table[Point[{x, y} /. Last@min /. y -> First@min], {a, -7, 7, 
      14/20}]}];

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.