(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 10134, 311] NotebookOptionsPosition[ 9718, 294] NotebookOutlinePosition[ 10062, 309] CellTagsIndexPosition[ 10019, 306] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[{ StyleBox[ RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", " ", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}], "+", "x"}]}], ";", " ", RowBox[{"a", "=", RowBox[{"-", "1"}]}], ";", " ", RowBox[{"b", "=", "1"}], ";", " ", "\"\\"", ";", " ", RowBox[{"c", "=", RowBox[{"-", "1"}]}], ";", " ", RowBox[{"d", "=", "1"}], ";", " ", "\"\\"", ";"}], FontColor->RGBColor[0, 0, 1]], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Df", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"D", "[", " ", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", " ", "x", ",", "x"}], "]"}], " ", "*", RowBox[{"D", "[", " ", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", " ", "y", ",", "y"}], "]"}]}], " ", "-", " ", RowBox[{ RowBox[{"(", RowBox[{"D", "[", " ", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", " ", "x", ",", "y"}], "]"}], ")"}], "^", "2"}]}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", StyleBox[ RowBox[{"Solve", "[", " ", RowBox[{ RowBox[{ StyleBox["{", FontColor->GrayLevel[0]], RowBox[{ RowBox[{ RowBox[{"D", "[", " ", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", " ", "x"}], "]"}], " ", "\[Equal]", "0"}], " ", ",", " ", RowBox[{ RowBox[{"D", "[", " ", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", " ", "y"}], "]"}], " ", "\[Equal]", "0"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], " ", "]"}], FontColor->GrayLevel[0]], "\n", RowBox[{ RowBox[{"Df", "[", RowBox[{"x", ",", "y"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "1"}], "/", "2"}]}], ",", RowBox[{"y", "\[Rule]", "0"}]}], "}"}]}], "\n", RowBox[{ RowBox[{"D", "[", " ", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", " ", "x", ",", "x"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "1"}], "/", "2"}]}], ",", RowBox[{"y", "\[Rule]", "0"}]}], "}"}]}]}], "Input", CellChangeTimes->{ 3.470181325703125*^9, {3.470181402125*^9, 3.470181440953125*^9}, 3.471214314859375*^9}], Cell[BoxData[{ RowBox[{"M", "=", RowBox[{"Maximize", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{ RowBox[{"a", "\[LessEqual]", "x", "\[LessEqual]", "b"}], "&&", RowBox[{"c", "\[LessEqual]", "y", "\[LessEqual]", "d"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}], "\n", RowBox[{"NMaximize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{ RowBox[{"a", "\[LessEqual]", "x", "\[LessEqual]", "b"}], "&&", RowBox[{"c", "\[LessEqual]", "y", "\[LessEqual]", "d"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "=", RowBox[{ RowBox[{ RowBox[{"M", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ";", RowBox[{"B", "=", RowBox[{ RowBox[{ RowBox[{"M", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ";"}]}], "Input", CellChangeTimes->{ 3.470181325703125*^9, {3.470181402125*^9, 3.470181440953125*^9}, { 3.471214314859375*^9, 3.47121431821875*^9}}], Cell[BoxData[{ RowBox[{"m", "=", RowBox[{"Minimize", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{ RowBox[{"a", "\[LessEqual]", "x", "\[LessEqual]", "b"}], "&&", RowBox[{"c", "\[LessEqual]", "y", "\[LessEqual]", "d"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}], "\n", RowBox[{ RowBox[{"G", "=", RowBox[{ RowBox[{ RowBox[{"m", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ";", RowBox[{"F", "=", RowBox[{ RowBox[{ RowBox[{"m", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ";"}], "\n", RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{ 3.470181325703125*^9, {3.470181402125*^9, 3.470181440953125*^9}, { 3.471214314859375*^9, 3.47121432565625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Surf", "=", RowBox[{"Plot3D", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "a", ",", "b"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "c", ",", "d"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"Surf", ",", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.03`", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"A", ",", "B", ",", RowBox[{"f", "[", RowBox[{"A", ",", "B"}], "]"}]}], "}"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"PointSize", "[", "0.03`", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"G", ",", "F", ",", RowBox[{"f", "[", RowBox[{"G", ",", "F"}], "]"}]}], "}"}], "]"}]}], "}"}], "]"}]}], "]"}]}], "Input", CellChangeTimes->{ 3.470181325703125*^9, {3.470181402125*^9, 3.470181440953125*^9}, { 3.471214314859375*^9, 3.47121432565625*^9}}], Cell[BoxData[{"\"\<14.8 #8\>\"", "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"Plot3D", "[", RowBox[{ RowBox[{ SuperscriptBox["x", "3"], "+", SuperscriptBox["y", "3"], "-", RowBox[{"3", "x"}], "-", RowBox[{"3", "y"}]}], ",", " ", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"Graphics3D", "[", RowBox[{"{", " ", RowBox[{ RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"PointSize", "[", "0.03", "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", " ", RowBox[{"{", RowBox[{"1", ",", "1", ",", RowBox[{"-", "4"}]}], "}"}], "}"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", " ", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", "0.03", "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}], ",", "4"}], "}"}], "}"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", " ", RowBox[{"{", RowBox[{"Green", ",", RowBox[{"PointSize", "[", "0.03", "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", " ", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], "}"}], "]"}]}], "}"}], ",", " ", "\[IndentingNewLine]", " ", RowBox[{"{", RowBox[{"Green", ",", RowBox[{"PointSize", "[", "0.03", "]"}], ",", " ", RowBox[{"Point", "[", RowBox[{"{", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", RowBox[{"-", "0"}]}], "}"}], "}"}], "]"}]}], "}"}]}], " ", "}"}], "]"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{ SuperscriptBox["x", "3"], "+", SuperscriptBox["y", "3"], "-", RowBox[{"3", "x"}], "-", RowBox[{"3", "y"}]}], ",", " ", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"Contours", "\[Rule]", "30"}]}], "]"}]}], "Input", CellChangeTimes->{{3.4701812355*^9, 3.47018126221875*^9}}] }, WindowSize->{1272, 922}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 2594, 85, 132, "Input"], Cell[3142, 107, 1413, 37, 72, "Input"], Cell[4558, 146, 1198, 32, 72, "Input"], Cell[5759, 180, 1320, 38, 52, "Input"], Cell[7082, 220, 2632, 72, 159, "Input"] } ] *) (* End of internal cache information *)