(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 11184, 365] NotebookOptionsPosition[ 10335, 331] NotebookOutlinePosition[ 10678, 346] CellTagsIndexPosition[ 10635, 343] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"defined", " ", "a", " ", "function", " ", RowBox[{"y", "[", "x", "]"}], " ", "in", " ", "terms", " ", "of", " ", "other", " ", "functions", " ", "like", " ", "this"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"y", "[", "x_", "]"}], ":=", FractionBox[ RowBox[{"(", RowBox[{ RowBox[{"C", " ", RowBox[{"f1", "[", "x", "]"}]}], "+", RowBox[{"f2", "[", "x", "]"}]}], ")"}], RowBox[{ RowBox[{"C", " ", RowBox[{"f3", "[", "x", "]"}]}], " ", "+", RowBox[{"f4", "[", "x", "]"}]}]]}], ";"}]}]], "Input", CellChangeTimes->{{3.48560413827067*^9, 3.4856041689739914`*^9}, { 3.4856046647115393`*^9, 3.485604678024124*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{ "lets", " ", "just", " ", "check", " ", "we", " ", "have", " ", "solve", " ", "for", " ", "C", " ", "correctly"}], " ", "..."}], " ", "yes"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Solve", "[", RowBox[{ RowBox[{"y", "\[Equal]", RowBox[{"y", "[", "x", "]"}]}], ",", "C"}], "]"}]}]], "Input", CellChangeTimes->{{3.4869086919110904`*^9, 3.4869087037551436`*^9}, { 3.486910154021617*^9, 3.486910160224861*^9}, {3.486911751745929*^9, 3.4869117606366673`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{"C", "\[Rule]", FractionBox[ RowBox[{ RowBox[{"-", RowBox[{"f2", "[", "x", "]"}]}], "+", RowBox[{"y", " ", RowBox[{"f4", "[", "x", "]"}]}]}], RowBox[{ RowBox[{"f1", "[", "x", "]"}], "-", RowBox[{"y", " ", RowBox[{"f3", "[", "x", "]"}]}]}]]}], "}"}], "}"}]], "Output", CellChangeTimes->{3.4869087390216713`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "then", " ", "the", " ", "first", " ", "derivative", " ", "of", " ", RowBox[{"y", "[", "x", "]"}], " ", "with", " ", "C", " ", "replaced", " ", "by", " ", "the", " ", "above", " ", "expression", " ", "is"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"rHS", "=", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"D", "[", RowBox[{ FractionBox[ RowBox[{"(", RowBox[{ RowBox[{"C", " ", RowBox[{"f1", "[", "x", "]"}]}], "+", RowBox[{"f2", "[", "x", "]"}]}], ")"}], RowBox[{ RowBox[{"C", " ", RowBox[{"f3", "[", "x", "]"}]}], " ", "+", RowBox[{"f4", "[", "x", "]"}]}]], ",", "x"}], "]"}], "/.", RowBox[{"{", RowBox[{"C", "\[Rule]", FractionBox[ RowBox[{ RowBox[{"-", RowBox[{"f2", "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"y", "[", "x", "]"}], " ", RowBox[{"f4", "[", "x", "]"}]}]}], RowBox[{ RowBox[{"f1", "[", "x", "]"}], "-", RowBox[{ RowBox[{"y", "[", "x", "]"}], " ", RowBox[{"f3", "[", "x", "]"}]}]}]]}], "}"}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.4856041702708745`*^9, 3.485604172224012*^9}, { 3.485604680617891*^9, 3.4856046863679276`*^9}, 3.486812295070112*^9, { 3.4869117791837797`*^9, 3.48691185340348*^9}, {3.486912169282523*^9, 3.4869121704700384`*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ RowBox[{ RowBox[{"f4", "[", "x", "]"}], " ", RowBox[{"y", "[", "x", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{ SuperscriptBox["f1", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], "-", RowBox[{ RowBox[{"y", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f3", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}]}], ")"}]}], "+", RowBox[{ RowBox[{"f2", "[", "x", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{ SuperscriptBox["f1", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"y", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f3", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}]}], ")"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"f1", "[", "x", "]"}], "-", RowBox[{ RowBox[{"f3", "[", "x", "]"}], " ", RowBox[{"y", "[", "x", "]"}]}]}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{ SuperscriptBox["f2", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], "-", RowBox[{ RowBox[{"y", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f4", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}]}], ")"}]}]}], RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"f2", "[", "x", "]"}]}], " ", RowBox[{"f3", "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", RowBox[{"f4", "[", "x", "]"}]}]}]]], "Output", CellChangeTimes->{ 3.4856042203024445`*^9, 3.4868115890015593`*^9, 3.4868116545657377`*^9, { 3.486812296476407*^9, 3.486812318117725*^9}, 3.486909189611331*^9, 3.4869092613944187`*^9, {3.4869118107935596`*^9, 3.486911816934263*^9}, { 3.486911850653445*^9, 3.486911853637858*^9}, 3.486912170860668*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"lets", " ", "get", " ", "terms", " ", RowBox[{"prop", ".", " ", "to"}], " ", RowBox[{"y", "[", "x", "]"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"yTerm", "=", RowBox[{"Coefficient", "[", RowBox[{"rHS", ",", RowBox[{"y", "[", "x", "]"}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.4869118552941294`*^9, 3.486911876981907*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ RowBox[{ RowBox[{"f4", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f1", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "-", RowBox[{ RowBox[{"f3", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f2", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"f2", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f3", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "-", RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f4", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}]}], RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"f2", "[", "x", "]"}]}], " ", RowBox[{"f3", "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", RowBox[{"f4", "[", "x", "]"}]}]}]]], "Output", CellChangeTimes->{{3.4869118614348326`*^9, 3.4869118775756645`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"lets", " ", "get", " ", "the", " ", "terms", " ", RowBox[{"prop", ".", " ", "to"}], " ", SuperscriptBox[ RowBox[{"y", "[", "x", "]"}], "2"]}], "*)"}], "\[IndentingNewLine]", RowBox[{"y2Term", "=", RowBox[{"Coefficient", "[", RowBox[{"rHS", ",", SuperscriptBox[ RowBox[{"y", "[", "x", "]"}], "2"]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.4869118789975576`*^9, 3.486911901919726*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"f4", "[", "x", "]"}]}], " ", RowBox[{ SuperscriptBox["f3", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"f3", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f4", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}]}], RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"f2", "[", "x", "]"}]}], " ", RowBox[{"f3", "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", RowBox[{"f4", "[", "x", "]"}]}]}]]], "Output", CellChangeTimes->{3.486911899388444*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"lets", " ", "get", " ", "the", " ", "constant", " ", "term"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"constTerm", "=", RowBox[{"Simplify", "[", RowBox[{"rHS", "-", RowBox[{"yTerm", " ", RowBox[{"y", "[", "x", "]"}]}], " ", "-", " ", RowBox[{"y2Term", " ", SuperscriptBox[ RowBox[{"y", "[", "x", "]"}], "2"]}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.486911907685425*^9, 3.4869119564360485`*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ RowBox[{ RowBox[{"f2", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f1", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}], "-", RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["f2", "\[Prime]", MultilineFunction->None], "[", "x", "]"}]}]}], RowBox[{ RowBox[{ RowBox[{"f2", "[", "x", "]"}], " ", RowBox[{"f3", "[", "x", "]"}]}], "-", RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", RowBox[{"f4", "[", "x", "]"}]}]}]]], "Output", CellChangeTimes->{{3.4869119269512963`*^9, 3.4869119567329273`*^9}}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"Thus", " ", "we", " ", "have", " ", "shown", " ", "that", " ", RowBox[{ RowBox[{"y", "'"}], "[", "x", "]"}]}], "=", RowBox[{ RowBox[{"constTerm", "[", "x", "]"}], "+", RowBox[{ RowBox[{"yTerm", "[", "x", "]"}], " ", RowBox[{"y", "[", "x", "]"}]}], "+", RowBox[{ RowBox[{"y2Term", "[", "x", "]"}], " ", SuperscriptBox[ RowBox[{"y", "[", "x", "]"}], "2"], " ", "or", " ", "a", " ", "Ricatti", " ", "equation", " ", "as", " ", "we", " ", "were", " ", "to", " ", RowBox[{"show", "."}]}]}]}]], "Text", CellChangeTimes->{{3.486911957936068*^9, 3.486911991467747*^9}}] }, WindowSize->{984, 750}, 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, 781, 21, 69, "Input"], Cell[CellGroupData[{ Cell[1351, 45, 585, 15, 52, "Input"], Cell[1939, 62, 433, 14, 49, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2409, 81, 1500, 40, 69, "Input"], Cell[3912, 123, 1943, 58, 49, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5892, 186, 421, 10, 52, "Input"], Cell[6316, 198, 981, 31, 49, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7334, 234, 484, 12, 54, "Input"], Cell[7821, 248, 652, 22, 49, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8510, 275, 513, 13, 54, "Input"], Cell[9026, 290, 638, 20, 49, "Output"] }, Open ]], Cell[9679, 313, 652, 16, 29, "Text"] } ] *) (* End of internal cache information *)