(* 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[ 12061, 407] NotebookOptionsPosition[ 11074, 368] NotebookOutlinePosition[ 11441, 384] CellTagsIndexPosition[ 11398, 381] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "x", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"DSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ FractionBox[ RowBox[{"-", "1"}], "T"], RowBox[{"(", RowBox[{ RowBox[{"x", "[", "t", "]"}], "-", "xa"}], ")"}]}], "-", RowBox[{ FractionBox[ RowBox[{"m", " ", SuperscriptBox["k1", "2"]}], "2"], " ", SuperscriptBox["E", FractionBox[ RowBox[{"(", RowBox[{"t", "-", "tf"}], ")"}], "T"]]}]}]}], ",", RowBox[{ RowBox[{"x", "[", "t0", "]"}], "==", "x0"}]}], "}"}], ",", RowBox[{"x", "[", "t", "]"}], ",", "t"}], "]"}], "//", "Simplify"}]}], "Input", CellChangeTimes->{{3.5309691914900894`*^9, 3.5309692376469297`*^9}, { 3.530969438274498*^9, 3.530969446196474*^9}, {3.5309694776031265`*^9, 3.5309694888063946`*^9}, 3.531065703468913*^9, {3.531065864345972*^9, 3.5310658816743193`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"x", "[", "t", "]"}], "\[Rule]", RowBox[{ FractionBox["1", "4"], " ", SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}]], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"2", " ", "t"}], "T"]]}], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{ SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"2", " ", "t0"}], "T"]], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{"4", " ", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"t0", "+", "tf"}], "T"]], " ", RowBox[{"(", RowBox[{"x0", "-", "xa"}], ")"}]}], "+", RowBox[{"4", " ", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]], " ", "xa"}]}], ")"}]}]}], "}"}], "}"}]], "Output", CellChangeTimes->{ 3.530969325304302*^9, 3.5309694469152336`*^9, {3.530969481696929*^9, 3.5309694893220263`*^9}, 3.5310658119546766`*^9, 3.5310658841118507`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Expand", "[", RowBox[{ FractionBox["1", "4"], " ", SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}]], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"2", " ", "t"}], "T"]]}], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{ SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"2", " ", "t0"}], "T"]], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{"4", " ", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"t0", "+", "tf"}], "T"]], " ", RowBox[{"(", RowBox[{"x0", "-", "xa"}], ")"}]}], "+", RowBox[{"4", " ", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]], " ", "xa"}]}], ")"}]}], "]"}]], "Input", CellChangeTimes->{{3.5309695215099382`*^9, 3.530969563729229*^9}, { 3.531065703484538*^9, 3.531065703515789*^9}, 3.5310659147841177`*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"-", FractionBox["1", "4"]}], " ", SuperscriptBox["\[ExponentialE]", RowBox[{ FractionBox[ RowBox[{"2", " ", "t"}], "T"], "-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}]], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{ FractionBox["1", "4"], " ", SuperscriptBox["\[ExponentialE]", RowBox[{ FractionBox[ RowBox[{"2", " ", "t0"}], "T"], "-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}]], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}], "+", FractionBox[ RowBox[{"t0", "+", "tf"}], "T"]}]], " ", "x0"}], "+", "xa", "-", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}], "+", FractionBox[ RowBox[{"t0", "+", "tf"}], "T"]}]], " ", "xa"}]}]], "Output", CellChangeTimes->{{3.5309695239474697`*^9, 3.530969564041733*^9}, 3.5310658120796785`*^9, 3.5310659154560013`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}], "+", FractionBox[ RowBox[{"t0", "+", "tf"}], "T"]}]], " ", "x0"}], "+", "xa", "-", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}], "+", FractionBox[ RowBox[{"t0", "+", "tf"}], "T"]}]], " ", "xa"}]}], "//", "Simplify"}]], "Input", CellChangeTimes->{{3.5309696181674256`*^9, 3.530969621917474*^9}, 3.5310661838656874`*^9}], Cell[BoxData[ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox["t", "T"]}]], " ", RowBox[{"(", RowBox[{ RowBox[{ SuperscriptBox["\[ExponentialE]", FractionBox["t0", "T"]], " ", RowBox[{"(", RowBox[{"x0", "-", "xa"}], ")"}]}], "+", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"t", "/", "T"}]], " ", "xa"}]}], ")"}]}]], "Output", CellChangeTimes->{3.5309696222456026`*^9, 3.5310658121578045`*^9, 3.5310661848657*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"-", FractionBox["1", "4"]}], " ", SuperscriptBox["\[ExponentialE]", RowBox[{ FractionBox[ RowBox[{"2", " ", "t"}], "T"], "-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}]], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{ FractionBox["1", "4"], " ", SuperscriptBox["\[ExponentialE]", RowBox[{ FractionBox[ RowBox[{"2", " ", "t0"}], "T"], "-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}]], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}]}], "//", "Simplify"}]], "Input", CellChangeTimes->{{3.5309696720899906`*^9, 3.5309696735431347`*^9}, 3.530970335332855*^9, {3.531065703547039*^9, 3.531065703547039*^9}, 3.5310662076628666`*^9}], Cell[BoxData[ RowBox[{ RowBox[{"-", FractionBox["1", "4"]}], " ", SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox[ RowBox[{"t", "+", "tf"}], "T"]}]], " ", RowBox[{"(", RowBox[{ SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"2", " ", "t"}], "T"]], "-", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"2", " ", "t0"}], "T"]]}], ")"}], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}]], "Output", CellChangeTimes->{3.530969673824388*^9, 3.5309703362078667`*^9, 3.531065812282806*^9, 3.531066208459752*^9}] }, Open ]], Cell["Lets check this solution : ", "Text", CellChangeTimes->{{3.530970073813883*^9, 3.530970078517068*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"x", "[", "t_", "]"}], ":=", RowBox[{"xa", "+", RowBox[{ RowBox[{"(", RowBox[{"x0", "-", "xa"}], ")"}], " ", SuperscriptBox["E", FractionBox[ RowBox[{"-", RowBox[{"(", RowBox[{"t", "+", "t0"}], ")"}]}], "T"]]}], "-", RowBox[{"m", " ", SuperscriptBox["k1", "2"], FractionBox["T", "4"], RowBox[{"(", " ", RowBox[{ SuperscriptBox["E", FractionBox[ RowBox[{"(", RowBox[{"t", "-", "tf"}], ")"}], "T"]], "+", SuperscriptBox["E", FractionBox[ RowBox[{"(", RowBox[{ RowBox[{"2", " ", "t0"}], "-", "t", "-", "tf"}], ")"}], "T"]]}], ")"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", "t"}], "]"}], "+", RowBox[{ FractionBox["1", "T"], RowBox[{"(", RowBox[{ RowBox[{"x", "[", "t", "]"}], "-", "xa"}], ")"}]}], "+", RowBox[{ FractionBox[ RowBox[{"m", " ", SuperscriptBox["k1", "2"]}], "2"], " ", SuperscriptBox["E", FractionBox[ RowBox[{"(", RowBox[{"t", "-", "tf"}], ")"}], "T"]]}]}], "//", "Simplify"}]}], "Input", CellChangeTimes->{{3.530970091876614*^9, 3.530970227737728*^9}, { 3.530970393458599*^9, 3.530970396568014*^9}, {3.530970450068699*^9, 3.5309704518968472`*^9}, {3.5310657035782895`*^9, 3.531065703593915*^9}, { 3.5310665131980276`*^9, 3.5310665227450247`*^9}, {3.5310665599017506`*^9, 3.5310665682612324`*^9}}], Cell[BoxData["0"], "Output", CellChangeTimes->{ 3.5309701544555397`*^9, {3.5309701984092274`*^9, 3.5309702283158607`*^9}, 3.5309703971461463`*^9, 3.5309704536468697`*^9, 3.5310658124546833`*^9, 3.531066538948357*^9, 3.531066570011255*^9}] }, Open ]], Cell["Evaluate the above at tf and we get ", "Text", CellChangeTimes->{{3.5309704312715836`*^9, 3.530970438959182*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"x", "[", "tf", "]"}], "//", "Simplify"}]], "Input", CellChangeTimes->{{3.530970446240525*^9, 3.5309704629282384`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"-", FractionBox["1", "4"]}], " ", RowBox[{"(", RowBox[{"1", "+", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{"2", " ", RowBox[{"(", RowBox[{"t0", "-", "tf"}], ")"}]}], "T"]]}], ")"}], " ", SuperscriptBox["k1", "2"], " ", "m", " ", "T"}], "+", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox[ RowBox[{"t0", "+", "tf"}], "T"]}]], " ", RowBox[{"(", RowBox[{"x0", "-", "xa"}], ")"}]}], "+", "xa"}]], "Output", CellChangeTimes->{{3.5309704584438057`*^9, 3.5309704633188686`*^9}, 3.5310658126421857`*^9, 3.531066573917555*^9}] }, Open ]] }, WindowSize->{788, 935}, WindowMargins->{{78, Automatic}, {118, Automatic}}, ShowSelection->True, 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[CellGroupData[{ Cell[567, 22, 1142, 33, 70, "Input"], Cell[1712, 57, 1295, 37, 48, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[3044, 99, 1136, 33, 48, "Input"], Cell[4183, 134, 1190, 38, 48, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5410, 177, 638, 21, 39, "Input"], Cell[6051, 200, 509, 16, 47, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6597, 221, 829, 25, 48, "Input"], Cell[7429, 248, 605, 18, 48, "Output"] }, Open ]], Cell[8049, 269, 109, 1, 29, "Text"], Cell[CellGroupData[{ Cell[8183, 274, 1614, 51, 87, "Input"], Cell[9800, 327, 249, 4, 30, "Output"] }, Open ]], Cell[10064, 334, 120, 1, 29, "Text"], Cell[CellGroupData[{ Cell[10209, 339, 154, 3, 31, "Input"], Cell[10366, 344, 692, 21, 48, "Output"] }, Open ]] } ] *) (* End of internal cache information *)