In[]:=
ClearAll
Out[]=
ClearAll
In[]:=
s=x/.Solve[ax^2+bx+c==0,x]
Out[]=

-b-
2
b
-4ac
2a
,
-b+
2
b
-4ac
2a

(*Itriedtoplotthesimplesolutionaboveinthreedifferentways:a)byaccessingthefirstelementofthelist(nextline)-thisdoesnotwork.Why?
◼
  • ​
  • In[]:=
    Manipulate[Plot[s[[1]],{a,1,4}],{b,1,5},{c,1,5}]
    Out[]=
    ​
    b
    c
    1.5
    2.0
    2.5
    3.0
    3.5
    4.0
    -1.0
    -0.5
    0.5
    1.0
    (*bycopyandpasteoftheresult->thisworks
    In[]:=
    ManipulatePlot
    -b-
    2
    b
    -4ac
    2a
    ,{a,1,4},{b,1,5},{c,1,5}
    Out[]=
    ​
    b
    c
    1.5
    2.0
    2.5
    3.0
    3.5
    4.0
    -3.0
    -2.5
    -2.0
    -1.5
    -1.0
    (*bytypingtheformulamanually->thisworksbut(forwhateverreason)deliversotherresults
    In[]:=
    Manipulate[Plot[(-b-Sqrt[b^2-4ac])/2a,{a,1,4}],{b,1,5},{c,1,5}]
    Out[]=
    ​
    b
    c
    1.5
    2.0
    2.5
    3.0
    3.5
    4.0
    -3.8
    -3.6
    -3.4
    -3.2
    -3.0
    (*canyouhelp?
    ​