(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 11.3' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[     12613,        319]
NotebookOptionsPosition[     12175,        302]
NotebookOutlinePosition[     12528,        318]
CellTagsIndexPosition[     12485,        315]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Derivata", " ", "prima", " ", "e", " ", "seconda", " ", "di", " ", "una", 
    " ", "cubica"}], "*)"}], "\[IndentingNewLine]", 
  RowBox[{"Manipulate", "[", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"sol", "=", 
      RowBox[{"Solve", "[", 
       RowBox[{
        RowBox[{"{", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{
            RowBox[{"a1", "*", 
             RowBox[{"p1", "[", 
              RowBox[{"[", "1", "]"}], "]"}]}], "+", 
            RowBox[{"a2", "*", 
             RowBox[{
              RowBox[{"p1", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "^", "2"}]}], "+", 
            RowBox[{"a3", "*", 
             RowBox[{
              RowBox[{"p1", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "^", "3"}]}]}], "\[Equal]", 
           RowBox[{"p1", "[", 
            RowBox[{"[", "2", "]"}], "]"}]}], ",", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{
            RowBox[{"a1", "*", 
             RowBox[{"p2", "[", 
              RowBox[{"[", "1", "]"}], "]"}]}], "+", 
            RowBox[{"a2", "*", 
             RowBox[{
              RowBox[{"p2", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "^", "2"}]}], "+", 
            RowBox[{"a3", "*", 
             RowBox[{
              RowBox[{"p2", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "^", "3"}]}]}], "\[Equal]", 
           RowBox[{"p2", "[", 
            RowBox[{"[", "2", "]"}], "]"}]}], ",", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{
            RowBox[{"a1", "*", 
             RowBox[{"p3", "[", 
              RowBox[{"[", "1", "]"}], "]"}]}], "+", 
            RowBox[{"a2", "*", 
             RowBox[{
              RowBox[{"p3", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "^", "2"}]}], "+", 
            RowBox[{"a3", "*", 
             RowBox[{
              RowBox[{"p3", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "^", "3"}]}]}], "\[Equal]", 
           RowBox[{"p3", "[", 
            RowBox[{"[", "2", "]"}], "]"}]}]}], "}"}], ",", 
        "\[IndentingNewLine]", 
        RowBox[{"{", 
         RowBox[{"a1", ",", "a2", ",", "a3"}], "}"}], ",", "Reals"}], 
       "\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"f", "[", "x_", "]"}], ":=", 
      RowBox[{
       RowBox[{
        RowBox[{"sol", "[", 
         RowBox[{"[", 
          RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}], "*", "x"}], "+", 
       RowBox[{
        RowBox[{"sol", "[", 
         RowBox[{"[", 
          RowBox[{"1", ",", "2", ",", "2"}], "]"}], "]"}], "*", 
        RowBox[{"x", "^", "2"}]}], "+", 
       RowBox[{
        RowBox[{"sol", "[", 
         RowBox[{"[", 
          RowBox[{"1", ",", "3", ",", "2"}], "]"}], "]"}], "*", 
        RowBox[{"x", "^", "3"}]}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Plot", "[", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"f", "[", "x", "]"}], ",", 
         RowBox[{
          RowBox[{"f", "'"}], "[", "x", "]"}], ",", 
         RowBox[{
          RowBox[{"f", "''"}], "[", "x", "]"}]}], "}"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"{", 
        RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",", "\[IndentingNewLine]", 
       RowBox[{"AxesLabel", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{"x", ",", "y"}], "}"}]}], ",", 
       RowBox[{"AxesOrigin", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0"}], "}"}]}], ",", 
       RowBox[{"PlotRange", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"0", ",", "10"}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"-", "5"}], ",", "10"}], "}"}]}], "}"}]}], ",", 
       RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", 
       RowBox[{"PlotStyle", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{"Black", ",", 
          RowBox[{"{", 
           RowBox[{"Black", ",", "Dashed"}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"Black", ",", "Dotted"}], "}"}]}], "}"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"Epilog", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", "Black", "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"Point", "[", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"p1", "[", 
                RowBox[{"[", "1", "]"}], "]"}], ",", 
               RowBox[{"p1", "[", 
                RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "]"}], ",", 
            RowBox[{"Point", "[", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"p2", "[", 
                RowBox[{"[", "1", "]"}], "]"}], ",", 
               RowBox[{"p2", "[", 
                RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "]"}], ",", 
            RowBox[{"Point", "[", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"p3", "[", 
                RowBox[{"[", "1", "]"}], "]"}], ",", 
               RowBox[{"p3", "[", 
                RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "]"}]}], "}"}]}], 
         "}"}]}]}], "]"}]}], ",", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"p1", ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "3"}], "}"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"5", ",", "5"}], "}"}], ",", 
      RowBox[{"Appearance", "\[Rule]", "\"\<Labeled\>\""}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"p2", ",", 
        RowBox[{"{", 
         RowBox[{"3", ",", "3"}], "}"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"5", ",", "5"}], "}"}], ",", 
      RowBox[{"Appearance", "\[Rule]", "\"\<Labeled\>\""}]}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"p3", ",", 
        RowBox[{"{", 
         RowBox[{"5", ",", "4"}], "}"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"10", ",", "10"}], "}"}], ",", 
      RowBox[{"Appearance", "\[Rule]", "\"\<Labeled\>\""}]}], "}"}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->CompressedData["
1:eJxTTMoPSmViYGCQBGIQLVPXWfXk3WvHVRd+doPoOWfEJoDoy/rBE0F0WmbK
HBC9jz1iPohWcFu/FEQvt5u8DERnW5xbBaJf2FtsBNF7BLO4nwLphTc2CIFo
uWUTZUG0ktVUMK3NbqQBom0cZLVA9BEDO2cQ3RBSGgGiNxkejwfRaWzGSSA6
4OieNBB9mnkfmN73e182iC7TvgSm2eSfFoFoZv/kUhD9ImtRB4i+HSPYB6Kn
7FecDDbH8iKYvuOaMQtEr/ZbC6YfHnq9AkT/vCWyEkSXqMZsANFX5twC0/pv
bHaC6BU1k8H0I8u1+0D0k7SyQyBaY4/OeRAdI3XrMoj22nn4Foiev07jDoh+
d/v1D7B72Xb8BNGXv038B6L7wuPEngFpg4WiTp9A4fMhAUwDAN3S+60=
  
  "],ExpressionUUID->"7dbe9c64-f6cd-4f41-a0b5-08b3e9e73e4e"],

Cell[BoxData[
 TagBox[
  StyleBox[
   DynamicModuleBox[{$CellContext`p1$$ = {1, 3}, $CellContext`p2$$ = {3, 
    3}, $CellContext`p3$$ = {5, 4}, Typeset`show$$ = True, 
    Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", 
    Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = 
    "\"untitled\"", Typeset`specs$$ = {{{
       Hold[$CellContext`p1$$], {1, 3}}, {0, 0}, {5, 5}}, {{
       Hold[$CellContext`p2$$], {3, 3}}, {0, 0}, {5, 5}}, {{
       Hold[$CellContext`p3$$], {5, 4}}, {0, 0}, {10, 10}}}, 
    Typeset`size$$ = {720., {342., 354.}}, Typeset`update$$ = 0, 
    Typeset`initDone$$, Typeset`skipInitDone$$ = 
    True, $CellContext`p1$2214$$ = {0, 0}, $CellContext`p2$2215$$ = {0, 
    0}, $CellContext`p3$2216$$ = {0, 0}}, 
    DynamicBox[Manipulate`ManipulateBoxes[
     1, StandardForm, 
      "Variables" :> {$CellContext`p1$$ = {1, 3}, $CellContext`p2$$ = {3, 
         3}, $CellContext`p3$$ = {5, 4}}, "ControllerVariables" :> {
        Hold[$CellContext`p1$$, $CellContext`p1$2214$$, {0, 0}], 
        Hold[$CellContext`p2$$, $CellContext`p2$2215$$, {0, 0}], 
        Hold[$CellContext`p3$$, $CellContext`p3$2216$$, {0, 0}]}, 
      "OtherVariables" :> {
       Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, 
        Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, 
        Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$,
         Typeset`skipInitDone$$}, 
      "Body" :> ($CellContext`sol = 
        Solve[{$CellContext`a1 Part[$CellContext`p1$$, 1] + $CellContext`a2 
             Part[$CellContext`p1$$, 1]^2 + $CellContext`a3 
             Part[$CellContext`p1$$, 1]^3 == 
           Part[$CellContext`p1$$, 2], $CellContext`a1 
             Part[$CellContext`p2$$, 1] + $CellContext`a2 
             Part[$CellContext`p2$$, 1]^2 + $CellContext`a3 
             Part[$CellContext`p2$$, 1]^3 == 
           Part[$CellContext`p2$$, 2], $CellContext`a1 
             Part[$CellContext`p3$$, 1] + $CellContext`a2 
             Part[$CellContext`p3$$, 1]^2 + $CellContext`a3 
             Part[$CellContext`p3$$, 1]^3 == 
           Part[$CellContext`p3$$, 
             2]}, {$CellContext`a1, $CellContext`a2, $CellContext`a3}, 
          Reals]; $CellContext`f[
          Pattern[$CellContext`x, 
           Blank[]]] := 
        Part[$CellContext`sol, 1, 1, 2] $CellContext`x + 
         Part[$CellContext`sol, 1, 2, 2] $CellContext`x^2 + 
         Part[$CellContext`sol, 1, 3, 2] $CellContext`x^3; Plot[{
          $CellContext`f[$CellContext`x], 
          Derivative[1][$CellContext`f][$CellContext`x], 
          Derivative[2][$CellContext`f][$CellContext`x]}, {$CellContext`x, 0, 
          10}, AxesLabel -> {$CellContext`x, $CellContext`y}, 
         AxesOrigin -> {0, 0}, PlotRange -> {{0, 10}, {-5, 10}}, AspectRatio -> 
         1, PlotStyle -> {Black, {Black, Dashed}, {Black, Dotted}}, 
         Epilog -> {{Black}, {
            Point[{
              Part[$CellContext`p1$$, 1], 
              Part[$CellContext`p1$$, 2]}], 
            Point[{
              Part[$CellContext`p2$$, 1], 
              Part[$CellContext`p2$$, 2]}], 
            Point[{
              Part[$CellContext`p3$$, 1], 
              Part[$CellContext`p3$$, 2]}]}}]), 
      "Specifications" :> {{{$CellContext`p1$$, {1, 3}}, {0, 0}, {5, 5}, 
         Appearance -> "Labeled"}, {{$CellContext`p2$$, {3, 3}}, {0, 0}, {5, 
         5}, Appearance -> "Labeled"}, {{$CellContext`p3$$, {5, 4}}, {0, 0}, {
         10, 10}, Appearance -> "Labeled"}}, "Options" :> {}, 
      "DefaultOptions" :> {}],
     ImageSizeCache->{806., {697., 709.}},
     SingleEvaluation->True],
    Deinitialization:>None,
    DynamicModuleValues:>{},
    SynchronousInitialization->True,
    UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$},
    UnsavedVariables:>{Typeset`initDone$$},
    UntrackedVariables:>{Typeset`size$$}], "Manipulate",
   Deployed->True,
   StripOnInput->False],
  Manipulate`InterpretManipulate[1]]], "Output",
 CellChangeTimes->{{3.74912931657281*^9, 3.749129329870315*^9}, {
   3.749129412389262*^9, 3.7491294301172543`*^9}, 3.749129510489728*^9, 
   3.7491295451473083`*^9, 3.749129627162195*^9, 3.749129677139349*^9, {
   3.7491297216543903`*^9, 3.7491297482171*^9}, {3.74912987251188*^9, 
   3.74912988797431*^9}, {3.749129945516334*^9, 3.7491299546178627`*^9}, 
   3.749130051506711*^9, 3.749130239409601*^9, 3.749130298363666*^9, 
   3.749130373766612*^9, 3.749130436999316*^9, 3.749130505881955*^9, 
   3.7491553342077703`*^9},
 CellLabel->"Out[1]=",ExpressionUUID->"7aec849d-a0dd-4b6f-a757-7c73e4f71078"]
}, Open  ]]
},
WindowSize->{3200, 1689},
WindowMargins->{{0, Automatic}, {0, Automatic}},
Magnification->2.,
FrontEndVersion->"11.3 for Linux x86 (64-bit) (March 6, 2018)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 6970, 188, 863, "Input",ExpressionUUID->"7dbe9c64-f6cd-4f41-a0b5-08b3e9e73e4e"],
Cell[7553, 212, 4606, 87, 1473, "Output",ExpressionUUID->"7aec849d-a0dd-4b6f-a757-7c73e4f71078"]
}, Open  ]]
}
]
*)