(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 9.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 105940, 2672] NotebookOptionsPosition[ 102931, 2576] NotebookOutlinePosition[ 103271, 2591] CellTagsIndexPosition[ 103228, 2588] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Demonstrace k NDSolve", "Title", CellChangeTimes->{{3.5932865237322807`*^9, 3.593286538518675*^9}, { 3.593286797267556*^9, 3.593286812110498*^9}}], Cell["\<\ Tom\[AAcute]\[SHacek] Kalvoda, KAM FIT, ZS 2013/2014\ \>", "Subtitle", CellChangeTimes->{{3.5932868209522877`*^9, 3.593286837046682*^9}}], Cell[CellGroupData[{ Cell["Popis probl\[EAcute]mu", "Section", CellChangeTimes->{{3.593286881399269*^9, 3.59328689344862*^9}}], Cell["\<\ \[CapitalUAcute]kolem je vy\[RHacek]e\[SHacek]it soustavu oby\[CHacek]ejn\ \[YAcute]ch diferenci\[AAcute]ln\[IAcute]ch rovnic\ \>", "Text", CellChangeTimes->{{3.593286896967278*^9, 3.593286916022735*^9}, { 3.593286954359351*^9, 3.593286980271291*^9}, {3.5933274104467573`*^9, 3.593327415230782*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{"y", "'"}], "=", RowBox[{"f", "(", RowBox[{"t", ",", "y"}], ")"}]}], ",", " ", RowBox[{ RowBox[{"y", "(", "0", ")"}], "=", SubscriptBox["y", "0"]}], ","}], TraditionalForm]], "DisplayFormula", CellChangeTimes->{{3.593286983745996*^9, 3.593286996581256*^9}}], Cell[TextData[{ "kde ", Cell[BoxData[ FormBox[ RowBox[{"y", "=", RowBox[{"(", RowBox[{ SubscriptBox["y", "1"], ",", "...", ",", SubscriptBox["y", "n"]}], ")"}]}], TraditionalForm]]], " je vektor ", Cell[BoxData[ FormBox["n", TraditionalForm]]], " nezn\[AAcute]m\[YAcute]ch funkc\[IAcute], ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"y", "'"}], "=", RowBox[{"(", RowBox[{ SubsuperscriptBox["y", "1", "'"], ",", "...", ",", SubsuperscriptBox["y", "n", "'"]}], ")"}]}], TraditionalForm]]], " je vektor jejich derivac\[IAcute] a ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", ":", RowBox[{"\[DoubleStruckCapitalR]", "\[Times]", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}]}], "\[Rule]", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}], TraditionalForm]]], " je vektorov\[AAcute] funkce prav\[YAcute]ch stran. Nez\[AAcute]visle prom\ \[EHacek]nn\[AAcute] ", Cell[BoxData[ FormBox["t", TraditionalForm]]], " m\[AAcute] v\[YAcute]znam \[CHacek]asu a ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["y", "0"], "=", RowBox[{ RowBox[{"(", RowBox[{ SubscriptBox["y", "10"], ",", "...", ",", SubscriptBox["y", "n0"]}], ")"}], "\[Element]", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}]}], TraditionalForm]]], " je vektor p\[RHacek]edepsan\[YAcute]ch po\[CHacek]\[AAcute]te\[CHacek]n\ \[IAcute]ch podm\[IAcute]nek v \[CHacek]ase ", Cell[BoxData[ FormBox["0", TraditionalForm]]], ". Tento probl\[EAcute]m se z o\[CHacek]ividn\[YAcute]ch \ d\[URing]vod\[URing] tak\[EAcute] n\[EHacek]kdy naz\[YAcute]v\[AAcute] \ \[OpenCurlyDoubleQuote]po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] \ \[UAcute]loha\[CloseCurlyDoubleQuote]. Proto\[ZHacek]e se v cel\[EAcute]m \ probl\[EAcute]mu vyskytuj\[IAcute] funkce pouze jedn\[EAcute] prom\[EHacek]nn\ \[EAcute], \[CHacek]asu ", Cell[BoxData[ FormBox["t", TraditionalForm]], FormatType->"TraditionalForm"], ", mluv\[IAcute]me tak\[EAcute] o tomto probl\[EAcute]mu jako o soustav\ \[EHacek] oby\[CHacek]ejn\[YAcute]ch diferenci\[AAcute]ln\[IAcute]ch rovnic (", StyleBox["ordinary differential equations", FontSlant->"Italic"], ", ODE)." }], "Text", CellChangeTimes->{{3.593286998735568*^9, 3.59328713161674*^9}, { 3.593327431624373*^9, 3.5933274576693172`*^9}, {3.595097298770134*^9, 3.5950974005065613`*^9}}], Cell["\<\ V tomto notebooku se pokus\[IAcute]m uk\[AAcute]zat n\[EHacek]kolik \ nejjednodu\[SHacek]\[SHacek]\[IAcute]ch numerizk\[YAcute]ch zp\[URing]sob\ \[URing] \[RHacek]e\[SHacek]en\[IAcute] zadan\[EAcute]ho probl\[EAcute]mu.\ \>", "Text", CellChangeTimes->{{3.5950974144661283`*^9, 3.5950974507858963`*^9}}], Cell[CellGroupData[{ Cell["Eulerova metoda", "Subsection", CellChangeTimes->{{3.59332748375867*^9, 3.593327486910351*^9}}], Cell[TextData[{ "Abychom mohli aproximovat analytick\[EAcute] (p\[RHacek]esn\[EAcute]) \ \[RHacek]e\[SHacek]en\[IAcute] p\[URing]vodn\[IAcute]ho probl\[EAcute]mu je \ nejprve nutn\[EAcute] diskretizovat nez\[AAcute]visle prom\[EHacek]nnou ", Cell[BoxData[ FormBox["t", TraditionalForm]]], ". P\[RHacek]ibli\[ZHacek]n\[EAcute] \[RHacek]e\[SHacek]en\[IAcute] ", Cell[BoxData[ FormBox["y", TraditionalForm]]], " proto hled\[AAcute]me v diskr\[EAcute]tn\[IAcute]ch \ \[CHacek]asov\[YAcute]ch bodech ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["t", "k"], "=", RowBox[{"\[CapitalDelta]", " ", "k"}]}], TraditionalForm]]], ", ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"k", "=", "0"}], ",", "1", ",", "2", ",", "..."}], TraditionalForm]]], ", kde ", Cell[BoxData[ FormBox["\[CapitalDelta]", TraditionalForm]]], " p\[RHacek]edstavuje d\[EAcute]lku \[CHacek]asov\[EAcute]ho kroku. \ Sofistikovan\[EHacek]j\[SHacek]\[IAcute] metody mohou d\[EAcute]lku tohoto \ kroku pru\[ZHacek]n\[EHacek] m\[EHacek]nit. My se zde zam\[EHacek]\[RHacek]\ \[IAcute]me na nejjednodu\[SHacek]\[SHacek]\[IAcute] metody s konstantn\ \[IAcute]m \[CHacek]asov\[YAcute]m krokem. Hledan\[EAcute] hodnoty \ z\[AAcute]visle prom\[EHacek]nn\[EAcute] (funkce) ", Cell[BoxData[ FormBox["y", TraditionalForm]]], " v diskr\[EAcute]tn\[IAcute]ch \[CHacek]asech ", Cell[BoxData[ FormBox[ SubscriptBox["t", "k"], TraditionalForm]]], " si ozna\[CHacek]\[IAcute]me odpov\[IAcute]daj\[IAcute]c\[IAcute]m zp\ \[URing]sobem jako ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["y", "k"], "=", RowBox[{"y", "(", SubscriptBox["t", "k"], ")"}]}], TraditionalForm]]], ", ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"k", "=", "0"}], ",", "1", ",", "2", ",", "..."}], TraditionalForm]]], ". V\[SHacek]imn\[EHacek]me si, \[ZHacek]e prvn\[IAcute] hodnota, ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["y", "0"], "=", RowBox[{"y", "(", "0", ")"}]}], TraditionalForm]]], " je zn\[AAcute]ma, je to p\[RHacek]edepsan\[AAcute] po\[CHacek]\[AAcute]te\ \[CHacek]n\[IAcute] podm\[IAcute]nka." }], "Text", CellChangeTimes->{{3.593337869373693*^9, 3.5933380840818377`*^9}, { 3.5933381373441687`*^9, 3.593338172482531*^9}, {3.595097459355274*^9, 3.595097501571109*^9}}], Cell["\<\ Jak\[YAcute]m zp\[URing]sobem se zbavit derivace v diferenci\[AAcute]ln\ \[IAcute] rovnici? M\[IAcute]sto te\[CHacek]ny (derivaci) p\[RHacek]ejdeme k \ se\[CHacek]n\[EHacek] (p\[RHacek]\[IAcute]mka proch\[AAcute]zej\[IAcute]c\ \[IAcute] dv\[EHacek]ma sousedn\[IAcute]mi body). Nahrad\[IAcute]me proto \ derivaci (dop\[RHacek]ednou) diferenc\[IAcute] a tu pak hodnotou \ prav\[EAcute] strany v p\[RHacek]edch\[AAcute]zej\[IAcute]c\[IAcute]m okam\ \[ZHacek]iku,\ \>", "Text", CellChangeTimes->{{3.5933381803931704`*^9, 3.593338212393372*^9}, { 3.595097530315239*^9, 3.595097591203271*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ FractionBox[ RowBox[{ SubscriptBox["y", RowBox[{"k", "+", "1"}]], "-", SubscriptBox["y", "k"]}], "\[CapitalDelta]"], "\[TildeTilde]", RowBox[{ RowBox[{"y", "'"}], RowBox[{"(", SubscriptBox["t", "k"], ")"}]}], "\[TildeTilde]", RowBox[{"f", "(", RowBox[{ SubscriptBox["t", "k"], ",", SubscriptBox["y", "k"]}], ")"}]}], ",", " ", RowBox[{"k", "=", "0"}], ",", "1", ",", "2", ",", RowBox[{"...", "."}]}], TraditionalForm]], "DisplayFormula", CellChangeTimes->{{3.59333821643537*^9, 3.593338384797144*^9}}], Cell["nebo jinak zaps\[AAcute]no", "Text", CellChangeTimes->{{3.59333836280713*^9, 3.593338365519878*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SubscriptBox["y", RowBox[{"k", "+", "1"}]], "=", RowBox[{ SubscriptBox["y", "k"], "+", RowBox[{"\[CapitalDelta]", " ", RowBox[{"f", "(", RowBox[{ SubscriptBox["t", "k"], ",", SubscriptBox["y", "k"]}], ")"}]}]}]}], ",", " ", RowBox[{"k", "=", "0"}], ",", "1", ",", "2", ",", "...", ",", "\[IndentingNewLine]", RowBox[{ SubscriptBox["y", "0"], "=", RowBox[{ RowBox[{"y", "(", "0", ")"}], "."}]}]}], TraditionalForm]], "DisplayFormula", CellChangeTimes->{{3.593338371849016*^9, 3.5933384184502563`*^9}}], Cell[TextData[{ "Jedn\[AAcute] se o rekurentn\[EHacek] zadanou posloupnost, kterou m\[URing]\ \[ZHacek]eme libovoln\[EHacek] dlouho iterovat. P\[RHacek]esnost aproximace z\ \[RHacek]ejm\[EHacek] z\[AAcute]vis\[IAcute] na velikosti \[CHacek]asov\ \[EAcute]ho kroku ", Cell[BoxData[ FormBox["\[CapitalDelta]", TraditionalForm]]], ". \[CapitalCHacek]\[IAcute]m bude tento krok men\[SHacek]\[IAcute], t\ \[IAcute]m bude aproximace lep\[SHacek]\[IAcute] (aspo\[NHacek] na \ kr\[AAcute]tk\[EAcute]m \[CHacek]asov\[EAcute]m intervalu). Eulerova metoda \ se v\[SHacek]ak v praxi nepou\[ZHacek]\[IAcute]v\[AAcute]. Ned\[AAcute]v\ \[AAcute] p\[RHacek]\[IAcute]li\[SHacek] p\[RHacek]esn\[EAcute] \ v\[YAcute]sledky, jak bude patrn\[EAcute] z n\[AAcute]sleduj\[IAcute]c\ \[IAcute]ch p\[RHacek]\[IAcute]klad\[URing]." }], "Text", CellChangeTimes->{{3.593338422214396*^9, 3.5933385135732517`*^9}, { 3.595097523099607*^9, 3.5950975256432333`*^9}, {3.595097606923725*^9, 3.595097644483776*^9}}], Cell["\<\ Jako prvn\[IAcute] p\[RHacek]\[IAcute]klad uva\[ZHacek]me soustavu popisuj\ \[IAcute]c\[IAcute] jednorozm\[EHacek]rn\[YAcute] harmonick\[YAcute] oscil\ \[AAcute]tor (t\[EHacek]leso na pru\[ZHacek]in\[EHacek]),\ \>", "Text", CellChangeTimes->{{3.593338548156744*^9, 3.593338572628359*^9}, { 3.5933386909554453`*^9, 3.593338693379582*^9}, {3.595097651443059*^9, 3.595097654467703*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{"y", "'"}], "=", RowBox[{ RowBox[{"-", SuperscriptBox["\[Omega]", "2"]}], " ", "x"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "'"}], "=", "y"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", RowBox[{"(", "0", ")"}]}], "=", SubscriptBox["x", "0"]}], ",", " ", RowBox[{ RowBox[{"y", RowBox[{"(", "0", ")"}]}], "=", RowBox[{ SubscriptBox["y", "0"], "."}]}]}], TraditionalForm]], "DisplayFormula", CellChangeTimes->{{3.5933385852951307`*^9, 3.5933386570747004`*^9}}], Cell[TextData[{ "Zde ", Cell[BoxData[ FormBox["x", TraditionalForm]], FormatType->"TraditionalForm"], " p\[RHacek]edstavuje vzd\[AAcute]lenost od rovnov\[AAcute]\[ZHacek]n\ \[EAcute] polohy, ", Cell[BoxData[ FormBox["y", TraditionalForm]], FormatType->"TraditionalForm"], " rychlost t\[EHacek]lesa a ", Cell[BoxData[ FormBox[ RowBox[{"\[Omega]", ">", "0"}], TraditionalForm]], FormatType->"TraditionalForm"], " frekvenci kmit\[AAcute]n\[IAcute]." }], "Text", CellChangeTimes->{{3.5933386620440617`*^9, 3.5933387229951963`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"data", "=", RowBox[{"NestList", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"First", "[", "#", "]"}], "+", "delta"}], ",", RowBox[{ RowBox[{"Last", "[", "#", "]"}], "+", RowBox[{"delta", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", SuperscriptBox["omg", "2"]}], ",", "0"}], "}"}]}], "}"}], ".", RowBox[{"Last", "[", "#", "]"}]}]}]}]}], "}"}], "&"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"{", RowBox[{"x0", ",", "y0"}], "}"}]}], "}"}], ",", RowBox[{"Floor", "[", RowBox[{"tmax", "/", "delta"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"err", "=", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"First", "[", "#", "]"}], ",", RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox["y0", "2"]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox["x0", "2"]}], "-", RowBox[{"(", RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox[ RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "2"}], "\[RightDoubleBracket]"}], "2"]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox[ RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}], "2"]}]}], ")"}]}]}], "}"}], "&"}], "/@", "data"}]}], ";", "\[IndentingNewLine]", RowBox[{"Column", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Show", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"First", "[", "#", "]"}], ",", RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}]}], "}"}], "&"}], "/@", "data"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "5"}], ",", "5"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "x"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"x0", " ", RowBox[{"Cos", "[", RowBox[{"omg", " ", "t"}], "]"}]}], "+", RowBox[{ FractionBox["y0", "omg"], RowBox[{"Sin", "[", RowBox[{"omg", " ", "t"}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"ListPlot", "[", RowBox[{"err", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}]}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "14", ",", "Bold"}], "]"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "x0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(x\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "y0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(y\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"omg", ",", "1", ",", "\"\<\[Omega]\>\""}], "}"}], ",", ".1", ",", "4"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"delta", ",", ".1", ",", "\"\<\[CapitalDelta]\>\""}], "}"}], ",", ".001", ",", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "tmax", ",", "10", ",", "\"\<\!\(\*SubscriptBox[\(t\), \(max\)]\)\>\""}], "}"}], ",", "1", ",", "20"}], "}"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ControlPlacement", "\[Rule]", "Left"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.593338545901724*^9, 3.593338546311714*^9}, { 3.593338704317779*^9, 3.593338942184291*^9}, {3.593338977461111*^9, 3.5933389881853113`*^9}, {3.593339130187224*^9, 3.593339214080571*^9}, { 3.593339259195327*^9, 3.593339262822606*^9}, {3.593339297402398*^9, 3.593339373676951*^9}, {3.5933394161939173`*^9, 3.593339612399044*^9}, { 3.593340377611394*^9, 3.593340377785707*^9}, {3.5933415367675047`*^9, 3.593341569029209*^9}, {3.593341866878434*^9, 3.593341902389317*^9}, { 3.59334212014857*^9, 3.593342214975415*^9}, {3.593342679917803*^9, 3.593342706387849*^9}, {3.5933434636631527`*^9, 3.593343536207354*^9}, { 3.595097703267034*^9, 3.595097754859139*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`delta$$ = 0.106, $CellContext`omg$$ = 2.265, $CellContext`tmax$$ = 8.16, $CellContext`x0$$ = 1.0999999999999996`, $CellContext`y0$$ = -0.46999999999999975`, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[ Style["Eulerova metoda", 14, Bold]], Manipulate`Dump`ThisIsNotAControl}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`x0$$], 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{ Hold[$CellContext`y0$$], 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, { Hold[ Style["Parametry modelu", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`omg$$], 1, "\[Omega]"}, 0.1, 4}, { Hold[ Style["Parametry Eulera", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`delta$$], 0.1, "\[CapitalDelta]"}, 0.001, 1}, {{ Hold[$CellContext`tmax$$], 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Body p\[RHacek]edstavuj\[IAcute] numerickou aproximaci,\n\ \[CHacek]erven\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje p\[RHacek]esn\ \[EAcute] \[RHacek]e\[SHacek]en\[IAcute].\n", 10]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t v \ realit\[EHacek] konstantn\[IAcute] (neuva\[ZHacek]ujeme-li\nt\[RHacek]en\ \[IAcute]). V\[YAcute]sledek je tedy \[SHacek]patn\[YAcute].", 10]], Manipulate`Dump`ThisIsNotAControl}}, Typeset`size$$ = { 500., {312.5, 319.5}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`x0$1950$$ = 0, $CellContext`y0$1951$$ = 0, $CellContext`omg$1952$$ = 0, $CellContext`delta$1953$$ = 0, $CellContext`tmax$1954$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`delta$$ = 0.1, $CellContext`omg$$ = 1, $CellContext`tmax$$ = 10, $CellContext`x0$$ = 1, $CellContext`y0$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`x0$$, $CellContext`x0$1950$$, 0], Hold[$CellContext`y0$$, $CellContext`y0$1951$$, 0], Hold[$CellContext`omg$$, $CellContext`omg$1952$$, 0], Hold[$CellContext`delta$$, $CellContext`delta$1953$$, 0], Hold[$CellContext`tmax$$, $CellContext`tmax$1954$$, 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`data = NestList[{ First[#] + $CellContext`delta$$, Last[#] + $CellContext`delta$$ Dot[{{0, 1}, {-$CellContext`omg$$^2, 0}}, Last[#]]}& , {0, {$CellContext`x0$$, $CellContext`y0$$}}, Floor[$CellContext`tmax$$/$CellContext`delta$$]]; $CellContext`err = Map[{ First[#], (1/2) $CellContext`y0$$^2 + (1/ 2) $CellContext`omg$$^2 $CellContext`x0$$^2 - ((1/2) Part[#, 2, 2]^2 + (1/2) $CellContext`omg$$^2 Part[#, 2, 1]^2)}& , $CellContext`data]; Column[{ Show[ ListPlot[ Map[{ First[#], Part[#, 2, 1]}& , $CellContext`data], PlotRange -> {-5, 5}, ImageSize -> 500, AxesLabel -> {$CellContext`t, $CellContext`x}], Plot[$CellContext`x0$$ Cos[$CellContext`omg$$ $CellContext`t] + \ ($CellContext`y0$$/$CellContext`omg$$) Sin[$CellContext`omg$$ $CellContext`t], {$CellContext`t, 0, $CellContext`tmax$$}, PlotStyle -> Lighter[Red]]], ListPlot[$CellContext`err, PlotStyle -> Lighter[Red], ImageSize -> 500, AxesLabel -> {$CellContext`t, Style["E", Italic]}, PlotRange -> All]}]), "Specifications" :> { Style["Eulerova metoda", 14, Bold], "", Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12], {{$CellContext`x0$$, 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{$CellContext`y0$$, 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, Style[ "Parametry modelu", 12], {{$CellContext`omg$$, 1, "\[Omega]"}, 0.1, 4}, Style[ "Parametry Eulera", 12], {{$CellContext`delta$$, 0.1, "\[CapitalDelta]"}, 0.001, 1}, {{$CellContext`tmax$$, 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, "", Style[ "Body p\[RHacek]edstavuj\[IAcute] numerickou aproximaci,\n\ \[CHacek]erven\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje p\[RHacek]esn\ \[EAcute] \[RHacek]e\[SHacek]en\[IAcute].\n", 10], Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t v \ realit\[EHacek] konstantn\[IAcute] (neuva\[ZHacek]ujeme-li\nt\[RHacek]en\ \[IAcute]). V\[YAcute]sledek je tedy \[SHacek]patn\[YAcute].", 10]}, "Options" :> {ControlPlacement -> Left}, "DefaultOptions" :> {}], ImageSizeCache->{796., {344., 351.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{{3.593338963002613*^9, 3.5933389888805513`*^9}, 3.5933390486774483`*^9, 3.5933391398595753`*^9, {3.593339206673256*^9, 3.593339214609405*^9}, 3.5933392633963823`*^9, {3.593339302295796*^9, 3.5933393143732758`*^9}, {3.593339347657031*^9, 3.5933393742094917`*^9}, { 3.593339421881949*^9, 3.593339500757169*^9}, {3.593339557426152*^9, 3.593339613014461*^9}, 3.593340378278565*^9, 3.593341578937025*^9, { 3.5933418728433247`*^9, 3.593341902916132*^9}, {3.5933421462501173`*^9, 3.59334221610774*^9}, 3.5933427102924757`*^9, 3.593343480416471*^9, { 3.59334352261487*^9, 3.593343536686647*^9}, 3.595097666938484*^9, { 3.5950977172103443`*^9, 3.595097755854578*^9}}] }, Open ]], Cell[BoxData[" "], "Input", CellChangeTimes->{3.593338175749208*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Centr\[AAcute]ln\[IAcute] Eulerova metoda", "Subsection", CellChangeTimes->{{3.593327498246357*^9, 3.593327504821368*^9}}], Cell["\<\ Centr\[AAcute]ln\[IAcute] Eulerova metoda se od eulerovy metody li\[SHacek]\ \[IAcute] pouze t\[IAcute]m, kdy vyhodnocuje prav\[EAcute] strany. \ M\[AAcute]me\ \>", "Text", CellChangeTimes->{{3.593339782263092*^9, 3.5933398201665363`*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ FractionBox[ RowBox[{ SubscriptBox["y", RowBox[{"k", "+", "1"}]], "-", SubscriptBox["y", "k"]}], "\[CapitalDelta]"], "\[TildeTilde]", RowBox[{ RowBox[{"y", "'"}], RowBox[{"(", SubscriptBox["t", "k"], ")"}]}], "\[TildeTilde]", RowBox[{"f", "(", RowBox[{ FractionBox[ RowBox[{ SubscriptBox["t", RowBox[{"k", "+", "1"}]], "+", SubscriptBox["t", "k"]}], "2"], ",", FractionBox[ RowBox[{ SubscriptBox["y", RowBox[{"k", "+", "1"}]], "+", SubscriptBox["y", "k"]}], "2"]}], ")"}]}], ",", " ", RowBox[{"k", "=", "0"}], ",", "1", ",", "2", ",", RowBox[{"...", "."}]}], TraditionalForm]], "DisplayFormula", CellChangeTimes->{{3.59333821643537*^9, 3.593338384797144*^9}, { 3.593339829147279*^9, 3.593339849281733*^9}}], Cell[TextData[{ "Nyn\[IAcute] ihned nez\[IAcute]sk\[AAcute]v\[AAcute]me explicitn\[IAcute] \ vyj\[AAcute]d\[RHacek]en\[IAcute] ", Cell[BoxData[ FormBox[ SubscriptBox["y", RowBox[{"k", "+", "1"}]], TraditionalForm]], FormatType->"TraditionalForm"], ", tato rovnice ho pouze implicitn\[EHacek] zad\[AAcute]v\[AAcute]. Uv\ \[AAcute]\[ZHacek]\[IAcute]me-li stejn\[YAcute] p\[RHacek]\[IAcute]klad jako \ d\[RHacek]\[IAcute]ve, pak \[RHacek]e\[SHacek]\[IAcute]me" }], "Text", CellChangeTimes->{{3.593339857717637*^9, 3.593339896229113*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "delta"], RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"k", "+", "1"}], "]"}], "-", RowBox[{"x", "[", "k", "]"}]}], ",", RowBox[{ RowBox[{"y", "[", RowBox[{"k", "+", "1"}], "]"}], "-", RowBox[{"y", "[", "k", "]"}]}]}], "}"}]}], "\[Equal]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", SuperscriptBox["omg", "2"]}], ",", "0"}], "}"}]}], "}"}], ".", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "[", RowBox[{"k", "+", "1"}], "]"}], "+", RowBox[{"x", "[", "k", "]"}]}], ")"}], "/", "2"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"y", "[", RowBox[{"k", "+", "1"}], "]"}], "+", RowBox[{"y", "[", "k", "]"}]}], ")"}], "/", "2"}]}], "}"}]}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"x", "[", RowBox[{"k", "+", "1"}], "]"}], ",", RowBox[{"y", "[", RowBox[{"k", "+", "1"}], "]"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5933398999266357`*^9, 3.593340013661729*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"1", "+", "k"}], "]"}], "\[Rule]", RowBox[{"-", FractionBox[ RowBox[{ RowBox[{ RowBox[{"-", "4"}], " ", RowBox[{"x", "[", "k", "]"}]}], "+", RowBox[{ SuperscriptBox["delta", "2"], " ", SuperscriptBox["omg", "2"], " ", RowBox[{"x", "[", "k", "]"}]}], "-", RowBox[{"4", " ", "delta", " ", RowBox[{"y", "[", "k", "]"}]}]}], RowBox[{"4", "+", RowBox[{ SuperscriptBox["delta", "2"], " ", SuperscriptBox["omg", "2"]}]}]]}]}], ",", RowBox[{ RowBox[{"y", "[", RowBox[{"1", "+", "k"}], "]"}], "\[Rule]", RowBox[{"-", FractionBox[ RowBox[{ RowBox[{"4", " ", "delta", " ", SuperscriptBox["omg", "2"], " ", RowBox[{"x", "[", "k", "]"}]}], "-", RowBox[{"4", " ", RowBox[{"y", "[", "k", "]"}]}], "+", RowBox[{ SuperscriptBox["delta", "2"], " ", SuperscriptBox["omg", "2"], " ", RowBox[{"y", "[", "k", "]"}]}]}], RowBox[{"4", "+", RowBox[{ SuperscriptBox["delta", "2"], " ", SuperscriptBox["omg", "2"]}]}]]}]}]}], "}"}], "}"}]], "Output", CellChangeTimes->{{3.593340006571958*^9, 3.593340014033342*^9}}] }, Open ]], Cell["\<\ Pod\[IAcute]vejme se, jak\[EAcute] d\[AAcute]v\[AAcute] toto \ numerick\[EAcute] sch\[EAcute]ma v\[YAcute]sledky.\ \>", "Text", CellChangeTimes->{{3.593340025884375*^9, 3.593340036003093*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"data", "=", RowBox[{"NestList", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"First", "[", "#", "]"}], "+", "delta"}], ",", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ FractionBox[ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"4", "-", RowBox[{ SuperscriptBox["delta", "2"], SuperscriptBox["omg", "2"]}]}], ")"}], RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}]}], "+", RowBox[{"4", "delta", RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "2"}], "\[RightDoubleBracket]"}]}]}], RowBox[{"4", "+", RowBox[{ SuperscriptBox["delta", "2"], SuperscriptBox["omg", "2"]}]}]], ",", "\[IndentingNewLine]", FractionBox[ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"4", "-", RowBox[{ SuperscriptBox["delta", "2"], SuperscriptBox["omg", "2"]}]}], ")"}], RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "2"}], "\[RightDoubleBracket]"}]}], "-", RowBox[{"4", "delta", " ", SuperscriptBox["omg", "2"], RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}]}]}], RowBox[{"4", "+", RowBox[{ SuperscriptBox["delta", "2"], SuperscriptBox["omg", "2"]}]}]]}], "\[IndentingNewLine]", "}"}]}], "\[IndentingNewLine]", "}"}], "&"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"{", RowBox[{"x0", ",", "y0"}], "}"}]}], "}"}], ",", RowBox[{"Floor", "[", RowBox[{"tmax", "/", "delta"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"err", "=", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"First", "[", "#", "]"}], ",", RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox["y0", "2"]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox["x0", "2"]}], "-", RowBox[{"(", RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox[ RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "2"}], "\[RightDoubleBracket]"}], "2"]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox[ RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}], "2"]}]}], ")"}]}]}], "}"}], "&"}], "/@", "data"}]}], ";", "\[IndentingNewLine]", RowBox[{"Column", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Show", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"First", "[", "#", "]"}], ",", RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}]}], "}"}], "&"}], "/@", "data"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "5"}], ",", "5"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "x"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"x0", " ", RowBox[{"Cos", "[", RowBox[{"omg", " ", "t"}], "]"}]}], "+", RowBox[{ FractionBox["y0", "omg"], RowBox[{"Sin", "[", RowBox[{"omg", " ", "t"}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"ListPlot", "[", RowBox[{"err", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "\"\\""}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "14", ",", "Bold"}], "]"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "x0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(x\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "y0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(y\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"omg", ",", "1", ",", "\"\<\[Omega]\>\""}], "}"}], ",", ".1", ",", "4"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"delta", ",", ".1", ",", "\"\<\[CapitalDelta]\>\""}], "}"}], ",", ".001", ",", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "tmax", ",", "10", ",", "\"\<\!\(\*SubscriptBox[\(t\), \(max\)]\)\>\""}], "}"}], ",", "1", ",", "20"}], "}"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ControlPlacement", "\[Rule]", "Left"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.593338545901724*^9, 3.593338546311714*^9}, { 3.593338704317779*^9, 3.593338942184291*^9}, {3.593338977461111*^9, 3.5933389881853113`*^9}, {3.593339130187224*^9, 3.593339214080571*^9}, { 3.593339259195327*^9, 3.593339262822606*^9}, {3.593339297402398*^9, 3.593339373676951*^9}, {3.5933394161939173`*^9, 3.593339612399044*^9}, { 3.593340134147284*^9, 3.593340318434794*^9}, {3.593340371867256*^9, 3.5933403719762278`*^9}, {3.593340913081069*^9, 3.593341120554673*^9}, { 3.5933411671078157`*^9, 3.5933411936374893`*^9}, {3.5933412283474827`*^9, 3.593341294148713*^9}, {3.593341324338233*^9, 3.593341325578548*^9}, { 3.593341384030971*^9, 3.593341387002557*^9}, {3.593341421994691*^9, 3.593341453135418*^9}, {3.593342224188308*^9, 3.593342256022173*^9}, { 3.5933426070204163`*^9, 3.593342670233851*^9}, 3.593343548180439*^9, { 3.5950978146551237`*^9, 3.595097837597775*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`delta$$ = 0.14500000000000002`, $CellContext`omg$$ = 1.8750000000000002`, $CellContext`tmax$$ = 12.700000000000001`, $CellContext`x0$$ = 1., $CellContext`y0$$ = -1.57, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[ Style["Centr\[AAcute]ln\[IAcute] Euler", 14, Bold]], Manipulate`Dump`ThisIsNotAControl}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`x0$$], 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{ Hold[$CellContext`y0$$], 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, { Hold[ Style["Parametry modelu", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`omg$$], 1, "\[Omega]"}, 0.1, 4}, { Hold[ Style["Parametry Centr\[AAcute]ln\[IAcute]ho Eulera", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`delta$$], 0.1, "\[CapitalDelta]"}, 0.001, 1}, {{ Hold[$CellContext`tmax$$], 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Body p\[RHacek]edstavuj\[IAcute] numerickou aproximaci,\n\ \[CHacek]erven\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje p\[RHacek]esn\ \[EAcute] \[RHacek]e\[SHacek]en\[IAcute].", 10]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t \ konstantn\[IAcute]. V tomto p\[RHacek]\[IAcute]pad\[EHacek] to\nprakticky \ plat\[IAcute].", 10]], Manipulate`Dump`ThisIsNotAControl}}, Typeset`size$$ = { 500., {301.5, 308.5}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`x0$16380$$ = 0, $CellContext`y0$16381$$ = 0, $CellContext`omg$16382$$ = 0, $CellContext`delta$16383$$ = 0, $CellContext`tmax$16384$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`delta$$ = 0.1, $CellContext`omg$$ = 1, $CellContext`tmax$$ = 10, $CellContext`x0$$ = 1, $CellContext`y0$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`x0$$, $CellContext`x0$16380$$, 0], Hold[$CellContext`y0$$, $CellContext`y0$16381$$, 0], Hold[$CellContext`omg$$, $CellContext`omg$16382$$, 0], Hold[$CellContext`delta$$, $CellContext`delta$16383$$, 0], Hold[$CellContext`tmax$$, $CellContext`tmax$16384$$, 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`data = NestList[{ First[#] + $CellContext`delta$$, {(( 4 - $CellContext`delta$$^2 $CellContext`omg$$^2) Part[#, 2, 1] + 4 $CellContext`delta$$ Part[#, 2, 2])/( 4 + $CellContext`delta$$^2 $CellContext`omg$$^2), (( 4 - $CellContext`delta$$^2 $CellContext`omg$$^2) Part[#, 2, 2] - 4 $CellContext`delta$$ $CellContext`omg$$^2 Part[#, 2, 1])/( 4 + $CellContext`delta$$^2 $CellContext`omg$$^2)}}& , { 0, {$CellContext`x0$$, $CellContext`y0$$}}, Floor[$CellContext`tmax$$/$CellContext`delta$$]]; $CellContext`err = Map[{ First[#], (1/2) $CellContext`y0$$^2 + (1/ 2) $CellContext`omg$$^2 $CellContext`x0$$^2 - ((1/2) Part[#, 2, 2]^2 + (1/2) $CellContext`omg$$^2 Part[#, 2, 1]^2)}& , $CellContext`data]; Column[{ Show[ ListPlot[ Map[{ First[#], Part[#, 2, 1]}& , $CellContext`data], PlotRange -> {-5, 5}, ImageSize -> 500, AxesLabel -> {$CellContext`t, $CellContext`x}], Plot[$CellContext`x0$$ Cos[$CellContext`omg$$ $CellContext`t] + \ ($CellContext`y0$$/$CellContext`omg$$) Sin[$CellContext`omg$$ $CellContext`t], {$CellContext`t, 0, $CellContext`tmax$$}, PlotStyle -> Lighter[Red]]], ListPlot[$CellContext`err, PlotStyle -> Lighter[Red], ImageSize -> 500, AxesLabel -> {$CellContext`t, "E"}, PlotRange -> All]}]), "Specifications" :> { Style["Centr\[AAcute]ln\[IAcute] Euler", 14, Bold], "", Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12], {{$CellContext`x0$$, 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{$CellContext`y0$$, 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, Style[ "Parametry modelu", 12], {{$CellContext`omg$$, 1, "\[Omega]"}, 0.1, 4}, Style[ "Parametry Centr\[AAcute]ln\[IAcute]ho Eulera", 12], {{$CellContext`delta$$, 0.1, "\[CapitalDelta]"}, 0.001, 1}, {{$CellContext`tmax$$, 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, "", Style[ "Body p\[RHacek]edstavuj\[IAcute] numerickou aproximaci,\n\ \[CHacek]erven\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje p\[RHacek]esn\ \[EAcute] \[RHacek]e\[SHacek]en\[IAcute].", 10], Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t \ konstantn\[IAcute]. V tomto p\[RHacek]\[IAcute]pad\[EHacek] to\nprakticky \ plat\[IAcute].", 10]}, "Options" :> {ControlPlacement -> Left}, "DefaultOptions" :> {}], ImageSizeCache->{796., {333., 340.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.593340322138289*^9, {3.59334037258986*^9, 3.593340382296051*^9}, 3.593340916499567*^9, {3.593341014600288*^9, 3.593341052573653*^9}, 3.5933410841379557`*^9, 3.593341122609676*^9, 3.5933411691570177`*^9, { 3.5933412864843483`*^9, 3.593341294613164*^9}, 3.593341331778371*^9, 3.5933413896053658`*^9, {3.5933414362398453`*^9, 3.593341453761969*^9}, 3.593341612501204*^9, 3.593342258200387*^9, {3.593342633205955*^9, 3.5933426708285093`*^9}, 3.593343551064883*^9, {3.59509780555716*^9, 3.595097838125021*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Runge-Kutta metoda (RK4)", "Subsection", CellChangeTimes->{{3.593327512396984*^9, 3.59332751837272*^9}}], Cell["\<\ Runge-Kuttove metoda (RK4) je explicitn\[IAcute] metoda 4. \ \[RHacek]\[AAcute]du. P\[RHacek]\[IAcute]slu\[SHacek]n\[EAcute] numerick\ \[EAcute] sch\[EAcute]ma nebudeme podrobn\[EHacek] odvozovat, pouze zm\ \[IAcute]n\[IAcute]me jeho tvar:\ \>", "Text", CellChangeTimes->{{3.593340397622902*^9, 3.5933404409982843`*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SubscriptBox["k", "1"], "=", RowBox[{"f", "(", RowBox[{ SubscriptBox["t", "k"], ",", SubscriptBox["y", "k"]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{ SubscriptBox["k", "2"], "=", RowBox[{"f", "(", RowBox[{ RowBox[{ SubscriptBox["t", "k"], "+", FractionBox["\[CapitalDelta]", "2"]}], ",", RowBox[{ SubscriptBox["y", "k"], "+", RowBox[{ FractionBox["\[CapitalDelta]", "2"], SubscriptBox["k", "1"]}]}]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{ SubscriptBox["k", "3"], "=", RowBox[{"f", "(", RowBox[{ RowBox[{ SubscriptBox["t", "k"], "+", FractionBox["\[CapitalDelta]", "2"]}], ",", RowBox[{ SubscriptBox["y", "k"], "+", RowBox[{ FractionBox["h", "2"], SubscriptBox["k", "2"]}]}]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{ SubscriptBox["k", "4"], "=", RowBox[{"f", "(", RowBox[{ RowBox[{ SubscriptBox["t", "k"], "+", "\[CapitalDelta]"}], ",", RowBox[{ SubscriptBox["y", "k"], "+", RowBox[{"\[CapitalDelta]", " ", SubscriptBox["k", "3"]}]}]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{ SubscriptBox["y", RowBox[{"k", "+", "1"}]], "=", RowBox[{ SubscriptBox["y", "k"], "+", RowBox[{ FractionBox["1", "6"], RowBox[{ RowBox[{"\[CapitalDelta]", "(", RowBox[{ SubscriptBox["k", "1"], "+", RowBox[{"2", SubscriptBox["k", "2"]}], "+", RowBox[{"2", SubscriptBox["k", "3"]}], "+", SubscriptBox["k", "4"]}], ")"}], "."}]}]}]}]}], TraditionalForm]], "DisplayFormula", CellChangeTimes->{{3.593340467744937*^9, 3.593340578266553*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", SuperscriptBox["omg", "2"]}], ",", "0"}], "}"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"rungeStep", "[", "in_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"tk", "=", RowBox[{"First", "[", "in", "]"}]}], ",", RowBox[{"yk", "=", RowBox[{"Last", "[", "in", "]"}]}], ",", "k1", ",", "k2", ",", "k3", ",", "k4"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"k1", "=", RowBox[{"f", ".", "yk"}]}], ";", "\[IndentingNewLine]", RowBox[{"k2", "=", RowBox[{"f", ".", RowBox[{"(", RowBox[{"yk", "+", RowBox[{ RowBox[{"delta", "/", "2"}], "*", "k1"}]}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"k3", "=", RowBox[{"f", ".", RowBox[{"(", RowBox[{"yk", "+", RowBox[{ RowBox[{"delta", "/", "2"}], "*", "k2"}]}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"k4", "=", RowBox[{"f", ".", RowBox[{"(", RowBox[{"yk", "+", RowBox[{"delta", "*", "k3"}]}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Return", "[", RowBox[{"{", RowBox[{ RowBox[{"tk", "+", "delta"}], ",", RowBox[{"yk", "+", RowBox[{ RowBox[{"delta", "/", "6"}], "*", RowBox[{"(", RowBox[{"k1", "+", RowBox[{"2", "k2"}], "+", RowBox[{"2", "k3"}], "+", "k4"}], ")"}]}]}]}], "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"data", "=", RowBox[{"NestList", "[", RowBox[{"rungeStep", ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"{", RowBox[{"x0", ",", "y0"}], "}"}]}], "}"}], ",", RowBox[{"Floor", "[", RowBox[{"tmax", "/", "delta"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"err", "=", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"First", "[", "#", "]"}], ",", RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox["y0", "2"]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox["x0", "2"]}], "-", RowBox[{"(", RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox[ RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "2"}], "\[RightDoubleBracket]"}], "2"]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox[ RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}], "2"]}]}], ")"}]}]}], "}"}], "&"}], "/@", "data"}]}], ";", "\[IndentingNewLine]", RowBox[{"Column", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Show", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"First", "[", "#", "]"}], ",", RowBox[{"#", "\[LeftDoubleBracket]", RowBox[{"2", ",", "1"}], "\[RightDoubleBracket]"}]}], "}"}], "&"}], "/@", "data"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "5"}], ",", "5"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "x"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"x0", " ", RowBox[{"Cos", "[", RowBox[{"omg", " ", "t"}], "]"}]}], "+", RowBox[{ FractionBox["y0", "omg"], RowBox[{"Sin", "[", RowBox[{"omg", " ", "t"}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"ListPlot", "[", RowBox[{"err", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "\"\\""}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "14", ",", "Bold"}], "]"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "x0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(x\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "y0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(y\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"omg", ",", "1", ",", "\"\<\[Omega]\>\""}], "}"}], ",", ".1", ",", "4"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"delta", ",", ".1", ",", "\"\<\[CapitalDelta]\>\""}], "}"}], ",", ".001", ",", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "tmax", ",", "10", ",", "\"\<\!\(\*SubscriptBox[\(t\), \(max\)]\)\>\""}], "}"}], ",", "1", ",", "20"}], "}"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ControlPlacement", "\[Rule]", "Left"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.593340598596319*^9, 3.593340873340496*^9}, { 3.593340921734035*^9, 3.593340923778923*^9}, {3.5933416527596617`*^9, 3.5933416972316017`*^9}, {3.593341747007098*^9, 3.593341765495921*^9}, { 3.593342266597639*^9, 3.5933422915234623`*^9}, {3.593342720315228*^9, 3.5933427506769114`*^9}, 3.593343558126186*^9}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`delta$$ = 0.406, $CellContext`omg$$ = 2.74, $CellContext`tmax$$ = 15.56, $CellContext`x0$$ = -1.3, $CellContext`y0$$ = -2.3, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[ Style["Runge-Kutta RK4", 14, Bold]], Manipulate`Dump`ThisIsNotAControl}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`x0$$], 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{ Hold[$CellContext`y0$$], 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, { Hold[ Style["Parametry modelu", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`omg$$], 1, "\[Omega]"}, 0.1, 4}, { Hold[ Style["Parametry RK4", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`delta$$], 0.1, "\[CapitalDelta]"}, 0.001, 1}, {{ Hold[$CellContext`tmax$$], 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Body p\[RHacek]edstavuj\[IAcute] numerickou aproximaci,\n\ \[CHacek]erven\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje p\[RHacek]esn\ \[EAcute] \[RHacek]e\[SHacek]en\[IAcute].", 10]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t \ konstantn\[IAcute].", 10]], Manipulate`Dump`ThisIsNotAControl}}, Typeset`size$$ = {500., {319.5, 326.5}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`x0$27681$$ = 0, $CellContext`y0$27682$$ = 0, $CellContext`omg$27683$$ = 0, $CellContext`delta$27684$$ = 0, $CellContext`tmax$27685$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`delta$$ = 0.1, $CellContext`omg$$ = 1, $CellContext`tmax$$ = 10, $CellContext`x0$$ = 1, $CellContext`y0$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`x0$$, $CellContext`x0$27681$$, 0], Hold[$CellContext`y0$$, $CellContext`y0$27682$$, 0], Hold[$CellContext`omg$$, $CellContext`omg$27683$$, 0], Hold[$CellContext`delta$$, $CellContext`delta$27684$$, 0], Hold[$CellContext`tmax$$, $CellContext`tmax$27685$$, 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`f = {{0, 1}, {-$CellContext`omg$$^2, 0}}; $CellContext`rungeStep[ Pattern[$CellContext`in$, Blank[]]] := Module[{$CellContext`tk$ = First[$CellContext`in$], $CellContext`yk$ = Last[$CellContext`in$], $CellContext`k1$, $CellContext`k2$, \ $CellContext`k3$, $CellContext`k4$}, $CellContext`k1$ = Dot[$CellContext`f, $CellContext`yk$]; $CellContext`k2$ = Dot[$CellContext`f, $CellContext`yk$ + ($CellContext`delta$$/ 2) $CellContext`k1$]; $CellContext`k3$ = Dot[$CellContext`f, $CellContext`yk$ + ($CellContext`delta$$/ 2) $CellContext`k2$]; $CellContext`k4$ = Dot[$CellContext`f, $CellContext`yk$ + $CellContext`delta$$ \ $CellContext`k3$]; Return[{$CellContext`tk$ + $CellContext`delta$$, $CellContext`yk$ + \ ($CellContext`delta$$/6) ($CellContext`k1$ + 2 $CellContext`k2$ + 2 $CellContext`k3$ + $CellContext`k4$)}]]; $CellContext`data = NestList[$CellContext`rungeStep, { 0, {$CellContext`x0$$, $CellContext`y0$$}}, Floor[$CellContext`tmax$$/$CellContext`delta$$]]; $CellContext`err = Map[{ First[#], (1/2) $CellContext`y0$$^2 + (1/ 2) $CellContext`omg$$^2 $CellContext`x0$$^2 - ((1/2) Part[#, 2, 2]^2 + (1/2) $CellContext`omg$$^2 Part[#, 2, 1]^2)}& , $CellContext`data]; Column[{ Show[ ListPlot[ Map[{ First[#], Part[#, 2, 1]}& , $CellContext`data], PlotRange -> {-5, 5}, ImageSize -> 500, AxesLabel -> {$CellContext`t, $CellContext`x}], Plot[$CellContext`x0$$ Cos[$CellContext`omg$$ $CellContext`t] + \ ($CellContext`y0$$/$CellContext`omg$$) Sin[$CellContext`omg$$ $CellContext`t], {$CellContext`t, 0, $CellContext`tmax$$}, PlotStyle -> Lighter[Red]]], ListPlot[$CellContext`err, PlotStyle -> Lighter[Red], ImageSize -> 500, AxesLabel -> {$CellContext`t, "E"}, PlotRange -> All]}]), "Specifications" :> { Style["Runge-Kutta RK4", 14, Bold], "", Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12], {{$CellContext`x0$$, 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{$CellContext`y0$$, 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, Style[ "Parametry modelu", 12], {{$CellContext`omg$$, 1, "\[Omega]"}, 0.1, 4}, Style[ "Parametry RK4", 12], {{$CellContext`delta$$, 0.1, "\[CapitalDelta]"}, 0.001, 1}, {{$CellContext`tmax$$, 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, "", Style[ "Body p\[RHacek]edstavuj\[IAcute] numerickou aproximaci,\n\ \[CHacek]erven\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje p\[RHacek]esn\ \[EAcute] \[RHacek]e\[SHacek]en\[IAcute].", 10], Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t \ konstantn\[IAcute].", 10]}, "Options" :> {ControlPlacement -> Left}, "DefaultOptions" :> {}], ImageSizeCache->{796., {351., 358.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.593340883720001*^9, 3.593340924674996*^9, {3.593341665210985*^9, 3.593341686069454*^9}, 3.593341767015174*^9, 3.59334229251482*^9, 3.593342751263226*^9, 3.593343559218288*^9, 3.595097879606007*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "NDSolve ", StyleBox["Mathematica", FontSlant->"Italic"], " (defaultn\[IAcute] chov\[AAcute]n\[IAcute])" }], "Subsection", CellChangeTimes->{{3.593327512396984*^9, 3.59332751837272*^9}, { 3.595097912744321*^9, 3.5950979281613493`*^9}}], Cell["Defaultn\[IAcute] NDSolve.", "Text", CellChangeTimes->{{3.593340397622902*^9, 3.5933404409982843`*^9}, { 3.593342317252364*^9, 3.593342323007657*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sol", "=", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{"y", "[", "t", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", SuperscriptBox["omg", "2"]}], RowBox[{"x", "[", "t", "]"}]}]}], ",", RowBox[{ RowBox[{"x", "[", "0", "]"}], "\[Equal]", "x0"}], ",", RowBox[{ RowBox[{"y", "[", "0", "]"}], "\[Equal]", "y0"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Column", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Show", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", "t", "]"}], "/.", "sol"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "5"}], ",", "5"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "x"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"x0", " ", RowBox[{"Cos", "[", RowBox[{"omg", " ", "t"}], "]"}]}], "+", RowBox[{ FractionBox["y0", "omg"], RowBox[{"Sin", "[", RowBox[{"omg", " ", "t"}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox["y0", "2"]}], "-", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox["x0", "2"]}], "-", RowBox[{"(", RowBox[{ RowBox[{ FractionBox["1", "2"], SuperscriptBox[ RowBox[{"y", "[", "t", "]"}], "2"]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["omg", "2"], SuperscriptBox[ RowBox[{"x", "[", "t", "]"}], "2"]}]}], ")"}]}], "/.", "sol"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Lighter", "[", "Red", "]"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "500"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "\"\\""}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "14", ",", "Bold"}], "]"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "x0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(x\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "y0", ",", "1", ",", "\"\<\!\(\*SubscriptBox[\(y\), \(0\)]\)\>\""}], "}"}], ",", RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"omg", ",", "1", ",", "\"\<\[Omega]\>\""}], "}"}], ",", ".1", ",", "4"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "12"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "tmax", ",", "10", ",", "\"\<\!\(\*SubscriptBox[\(t\), \(max\)]\)\>\""}], "}"}], ",", "1", ",", "20"}], "}"}], ",", "\[IndentingNewLine]", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "10"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ControlPlacement", "\[Rule]", "Left"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.593340598596319*^9, 3.593340873340496*^9}, { 3.593340921734035*^9, 3.593340923778923*^9}, {3.5933416527596617`*^9, 3.5933416972316017`*^9}, {3.593341747007098*^9, 3.593341765495921*^9}, { 3.593342266597639*^9, 3.5933422915234623`*^9}, {3.5933423322522993`*^9, 3.593342489748056*^9}, {3.5933425234965143`*^9, 3.593342575522925*^9}, { 3.593342770921685*^9, 3.593342785377112*^9}, {3.5933433783667603`*^9, 3.593343388232202*^9}, 3.593343568662516*^9}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`omg$$ = 1.6800000000000002`, $CellContext`tmax$$ = 10, $CellContext`x0$$ = 1, $CellContext`y0$$ = 1, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[ Style["NDSolve", 14, Bold]], Manipulate`Dump`ThisIsNotAControl}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`x0$$], 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{ Hold[$CellContext`y0$$], 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, { Hold[ Style["Parametry modelu", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`omg$$], 1, "\[Omega]"}, 0.1, 4}, { Hold[ Style["Parametry NDSolve", 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`tmax$$], 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, { Hold[""], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Modr\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje numerick\[EAcute] \ \[RHacek]e\[SHacek]en\[IAcute],\n\[CHacek]erven\[AAcute] k\[RHacek]ivka p\ \[RHacek]edstavuje p\[RHacek]esn\[EAcute] \[RHacek]e\[SHacek]en\[IAcute].", 10]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t \ konstantn\[IAcute].", 10]], Manipulate`Dump`ThisIsNotAControl}}, Typeset`size$$ = {500., {306.5, 313.5}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`x0$89147$$ = 0, $CellContext`y0$89148$$ = 0, $CellContext`omg$89149$$ = 0, $CellContext`tmax$89150$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`omg$$ = 1, $CellContext`tmax$$ = 10, $CellContext`x0$$ = 1, $CellContext`y0$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`x0$$, $CellContext`x0$89147$$, 0], Hold[$CellContext`y0$$, $CellContext`y0$89148$$, 0], Hold[$CellContext`omg$$, $CellContext`omg$89149$$, 0], Hold[$CellContext`tmax$$, $CellContext`tmax$89150$$, 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 = NDSolve[{ Derivative[ 1][$CellContext`x][$CellContext`t] == \ $CellContext`y[$CellContext`t], Derivative[ 1][$CellContext`y][$CellContext`t] == (-$CellContext`omg$$^2) \ $CellContext`x[$CellContext`t], $CellContext`x[ 0] == $CellContext`x0$$, $CellContext`y[ 0] == $CellContext`y0$$}, {$CellContext`x, $CellContext`y}, \ {$CellContext`t, 0, $CellContext`tmax$$}]; Column[{ Show[ Plot[ ReplaceAll[ $CellContext`x[$CellContext`t], $CellContext`sol], \ {$CellContext`t, 0, $CellContext`tmax$$}, PlotRange -> {-5, 5}, ImageSize -> 500, AxesLabel -> {$CellContext`t, $CellContext`x}], Plot[$CellContext`x0$$ Cos[$CellContext`omg$$ $CellContext`t] + \ ($CellContext`y0$$/$CellContext`omg$$) Sin[$CellContext`omg$$ $CellContext`t], {$CellContext`t, 0, $CellContext`tmax$$}, PlotStyle -> Lighter[Red]]], Plot[ ReplaceAll[(1/2) $CellContext`y0$$^2 - (1/ 2) $CellContext`omg$$^2 $CellContext`x0$$^2 - ((1/ 2) $CellContext`y[$CellContext`t]^2 + (1/ 2) $CellContext`omg$$^2 $CellContext`x[$CellContext`t]^2), \ $CellContext`sol], {$CellContext`t, 0, $CellContext`tmax$$}, PlotStyle -> Lighter[Red], ImageSize -> 500, AxesLabel -> {$CellContext`t, "E"}, PlotRange -> All]}]), "Specifications" :> { Style["NDSolve", 14, Bold], "", Style[ "Po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute] podm\[IAcute]nky", 12], {{$CellContext`x0$$, 1, "\!\(\*SubscriptBox[\(x\), \(0\)]\)"}, -3, 3}, {{$CellContext`y0$$, 1, "\!\(\*SubscriptBox[\(y\), \(0\)]\)"}, -3, 3}, Style[ "Parametry modelu", 12], {{$CellContext`omg$$, 1, "\[Omega]"}, 0.1, 4}, Style[ "Parametry NDSolve", 12], {{$CellContext`tmax$$, 10, "\!\(\*SubscriptBox[\(t\), \(max\)]\)"}, 1, 20}, "", Style[ "Modr\[AAcute] k\[RHacek]ivka p\[RHacek]edstavuje numerick\[EAcute] \ \[RHacek]e\[SHacek]en\[IAcute],\n\[CHacek]erven\[AAcute] k\[RHacek]ivka p\ \[RHacek]edstavuje p\[RHacek]esn\[EAcute] \[RHacek]e\[SHacek]en\[IAcute].", 10], Style[ "Na spodn\[IAcute]m grafu je zm\[EHacek]na energie,\nod po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute] hodnoty. Energie mus\[IAcute]\nb\[YAcute]t \ konstantn\[IAcute].", 10]}, "Options" :> {ControlPlacement -> Left}, "DefaultOptions" :> {}], ImageSizeCache->{806., {338., 345.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{3.59334257632211*^9, 3.593342786069187*^9, 3.593343388701335*^9, 3.5933435696018333`*^9, 3.595097932127565*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Z\[AAcute]v\[EHacek]r", "Subsection", CellChangeTimes->{{3.5950979572138042`*^9, 3.595097960629766*^9}}], Cell[TextData[{ "Na jednoduch\[EAcute]m fyzik\[AAcute]ln\[IAcute]m probl\[EAcute]mu jsme \ porovnali v\[YAcute]sledky napo\[CHacek]\[IAcute]tan\[EAcute] pomoc\[IAcute] \ Eulerovy, Centr\[AAcute]ln\[IAcute] Eulerovy a Runge-Kutta 4 metody s v\ \[YAcute]sledky ", StyleBox["Mathematica", FontSlant->"Italic"], " napo\[CHacek]ten\[YAcute]ch pomoc\[IAcute] NDSolve. Celkem lze \[RHacek]\ \[IAcute]ci, \[ZHacek]e Eulerova metoda byla vylo\[ZHacek]en\[EHacek] \ \[SHacek]patn\[AAcute]. (Defaultn\[IAcute]) NDSolve a Runge-Kutta 4 \ d\[AAcute]vaj\[IAcute] dobr\[EAcute] v\[YAcute]sledky pro \ v\[EHacek]t\[SHacek]inu voleb parametr\[URing], ale pro n\[EHacek]kter\ \[EAcute] rozsahy u\[ZHacek] nesta\[CHacek]\[IAcute] a chyby v \ p\[RHacek]edpov\[EHacek]di v\[YAcute]voje energie (mus\[IAcute] b\[YAcute]t \ konstantn\[IAcute] - Z\[AAcute]kon zachov\[AAcute]n\[IAcute] energie) jsou \ podstatn\[EAcute]. Nejlep\[SHacek]\[IAcute] v\[YAcute]sledky v tomto p\ \[RHacek]\[IAcute]pad\[EHacek] d\[AAcute]v\[AAcute] Centr\[AAcute]ln\[IAcute] \ Eulerova metoda. To nen\[IAcute] n\[AAcute]hoda, jedn\[AAcute] se toti\ \[ZHacek] o symplektickou metodu, kter\[AAcute] zachov\[AAcute]v\[AAcute] n\ \[EHacek]kter\[EAcute] fundament\[AAcute]ln\[IAcute] vlastnosti p\[URing]vodn\ \[IAcute]ho klasick\[EAcute]ho mechanick\[EAcute]ho syst\[EAcute]mu. \ Poznamenejme, \[ZHacek]e p\[RHacek]\[IAcute]kaz NDSolve je velmi \ mocn\[YAcute] a umo\[ZHacek]\[NHacek]uje modifikovat \ pou\[ZHacek]\[IAcute]vanou metodu podle p\[RHacek]\[AAcute]n\[IAcute] u\ \[ZHacek]ivatele (vizte rozs\[AAcute]hlou dokumentaci t\[EAcute]to funkce v \ ", StyleBox["Mathematica", FontSlant->"Italic"], ")." }], "Text", CellChangeTimes->{{3.595097940301529*^9, 3.5950981849037857`*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Raketa v homogenn\[IAcute] gravita\[CHacek]n\[IAcute]m poli pod vlivem v\ \[EHacek]tru a odporu vzduchu se spot\[RHacek]ebou paliva\ \>", "Section", CellChangeTimes->{{3.593287515842667*^9, 3.593287535875489*^9}, { 3.593327540933578*^9, 3.593327560733189*^9}, {3.593341819324111*^9, 3.593341829548224*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ "Needs", "[", "\"\\"", "]"}], ";"}]], "Input"], Cell["\<\ V t\[EAcute]to sekci si uk\[AAcute]\[ZHacek]eme jak z\[AAcute]bavn\[EHacek] \ popisovat raketu v homogenn\[IAcute]m gravita\[CHacek]n\[IAcute]m poli pod \ vlivem v\[EHacek]tru (fouk\[AAcute] a zapo\[CHacek]\[IAcute]t\[AAcute]v\ \[AAcute]me i odpor vzduchu). Tento syst\[EAcute]m je pops\[AAcute]n \ soustavou Newtonov\[YAcute]ch pohybov\[YAcute]ch rovnic (tj. p\[RHacek]edpokl\ \[AAcute]d\[AAcute]me, \[ZHacek]e rychlost rakety se nebl\[IAcute]\[ZHacek]\ \[IAcute] rychlosti sv\[EHacek]tla a nepohybujeme se v bl\[IAcute]zkosti \ gravita\[CHacek]n\[IAcute] singularity, vysta\[CHacek]\[IAcute]me tak bez \ speci\[AAcute]ln\[IAcute] i obecn\[EAcute] teorie relativity).\ \>", "Text", CellChangeTimes->{{3.593287567052375*^9, 3.593287595899805*^9}, { 3.593343597344007*^9, 3.593343605871894*^9}, {3.595098221327948*^9, 3.595098236855488*^9}, {3.5950984898334312`*^9, 3.595098532897665*^9}, { 3.5950985934747143`*^9, 3.595098684555251*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"m", "(", "t", ")"}], RowBox[{"(", GridBox[{ { RowBox[{"x", "''"}]}, { RowBox[{"y", "''"}]}, { RowBox[{"z", "''"}]} }], ")"}]}], "=", RowBox[{ RowBox[{"(", GridBox[{ {"0"}, {"0"}, { RowBox[{"-", "g"}]} }], ")"}], "+", RowBox[{"(", GridBox[{ { SubscriptBox["w", "x"]}, { SubscriptBox["w", "y"]}, {"0"} }], ")"}], "-", RowBox[{"k", "(", GridBox[{ { RowBox[{"x", "'"}]}, { RowBox[{"y", "'"}]}, { RowBox[{"z", "'"}]} }], ")"}], "+", RowBox[{ FractionBox[ RowBox[{"M", "(", "t", ")"}], RowBox[{"v", "(", "t", ")"}]], RowBox[{"(", GridBox[{ { RowBox[{"x", "'"}]}, { RowBox[{"y", "'"}]}, { RowBox[{"z", "'"}]} }], ")"}]}]}]}], ","}], TraditionalForm]], "DisplayFormula", CellChangeTimes->{{3.5950986951726103`*^9, 3.595098851784678*^9}}], Cell[TextData[{ "kde ", Cell[BoxData[ FormBox[ RowBox[{"(", RowBox[{"x", ",", "y", ",", "z"}], ")"}], TraditionalForm]], FormatType->"TraditionalForm"], " p\[RHacek]edstavuje polohu rakety v trojrozm\[EHacek]rn\[EAcute]m \ prostoru, ", Cell[BoxData[ FormBox[ RowBox[{"m", "(", "t", ")"}], TraditionalForm]], FormatType->"TraditionalForm"], " m\[EHacek]n\[IAcute]c\[IAcute] se v\[AAcute]hu rakety (v d\[URing]sledku \ \[UAcute]bytku paliva), prvn\[IAcute] \[CHacek]len na prav\[EAcute] stran\ \[EHacek] p\[RHacek]edstavuje gravita\[CHacek]n\[IAcute] zrychlen\[IAcute], \ druh\[YAcute] \[CHacek]len vliv (konstatn\[IAcute]) v\[EHacek]tru, \ t\[RHacek]et\[IAcute] odpor vzduchu s konstantou ", Cell[BoxData[ FormBox["k", TraditionalForm]], FormatType->"TraditionalForm"], " a \[CHacek]tvrt\[YAcute] zrychlen\[IAcute] v d\[URing]sledku motor\[URing] \ (funkce ", Cell[BoxData[ FormBox[ RowBox[{"M", "(", "t", ")"}], TraditionalForm]], FormatType->"TraditionalForm"], " je kladn\[AAcute] a nenulov\[AAcute] pouze po dobu kdy m\[AAcute]me \ palivo, ", Cell[BoxData[ FormBox[ RowBox[{"v", "(", "t", ")"}], TraditionalForm]], FormatType->"TraditionalForm"], " je velikost okam\[ZHacek]it\[EAcute] rychlosti)." }], "Text", CellChangeTimes->{{3.595098854116475*^9, 3.595098982613331*^9}}], Cell["\<\ Experimentov\[AAcute]n\[IAcute]m s n\[AAcute]sleduj\[IAcute]c\[IAcute]m k\ \[OAcute]dem m\[URing]\[ZHacek]eme doc\[IAcute]lit mnoha zaj\[IAcute]mav\ \[YAcute]ch v\[YAcute]sledk\[URing]. Nejprve definujeme parametry modelu.\ \>", "Text", CellChangeTimes->{{3.5950990705012617`*^9, 3.595099099157987*^9}, { 3.595099188246626*^9, 3.5950991936065474`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"palivo", " ", "sta\[CHacek]\[IAcute]", " ", "na"}], " ", "..."}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"tpalivo", "=", "3"}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"ub\[YAcute]vaj\[IAcute]c\[IAcute]", " ", "hmotnost"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"m", "[", "t_", "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{"t", "<", "tpalivo"}], ",", RowBox[{"1", "-", RowBox[{".25", RowBox[{"t", "/", "tpalivo"}]}]}], ",", "True", ",", ".75"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "motor", " ", "jede", " ", "jen", " ", "do", " ", "t\[EAcute]", " ", "doby", " ", "kdy", " ", "m\[AAcute]", " ", "palivo"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"motor", "[", "t_", "]"}], ":=", RowBox[{"Which", "[", RowBox[{ RowBox[{"t", "<", "tpalivo"}], ",", "10", ",", "True", ",", "0"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"t\[RHacek]en\[IAcute]", " ", "vzduchu"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"k", "=", "2"}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", "gravitace", " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g", "=", "2"}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", "v\[EHacek]try", " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"wx", "=", "5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"wy", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"po\[CHacek]\[AAcute]te\[CHacek]n\[IAcute]", " ", "rychlost"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vx0", "=", ".2"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vy0", "=", ".2"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vz0", "=", RowBox[{"motor", "[", "0", "]"}]}], ";"}]}]}]], "Input", CellChangeTimes->{{3.593327575693509*^9, 3.593327618007638*^9}, { 3.593327673694881*^9, 3.593327714991337*^9}, {3.593327764861237*^9, 3.593327796909933*^9}, {3.5933279201626053`*^9, 3.5933279223711367`*^9}, { 3.593327979788497*^9, 3.593328023147059*^9}, {3.5933281292071*^9, 3.593328161586529*^9}, {3.593328350799205*^9, 3.593328372566592*^9}, 3.593328503813637*^9, {3.59332865246959*^9, 3.593328658810738*^9}, { 3.593328806106498*^9, 3.59332880682633*^9}, {3.5933288566510468`*^9, 3.593328856848012*^9}, {3.5933288982967243`*^9, 3.5933289110241823`*^9}, { 3.593328997129656*^9, 3.593328997351863*^9}, {3.5933436548122272`*^9, 3.593343659097522*^9}, {3.5933437157226133`*^9, 3.593343716043767*^9}, { 3.5950990514373426`*^9, 3.5950990644615097`*^9}, {3.5950991053331223`*^9, 3.5950991652994223`*^9}, {3.595100560443808*^9, 3.595100560728566*^9}}], Cell["\<\ D\[AAcute]le zave\[DHacek]me \[CHacek]leny v pohybov\[EAcute] rovnici.\ \>", "Text", CellChangeTimes->{{3.595099196606316*^9, 3.595099206542507*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"gravitace", "=", RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "g"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vitr", "=", RowBox[{"{", RowBox[{"wx", ",", "wy", ",", "0"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"odpor", "=", RowBox[{ RowBox[{"-", "k"}], " ", RowBox[{"m", "[", "t", "]"}], RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], ",", RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], ",", RowBox[{ RowBox[{"z", "'"}], "[", "t", "]"}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pohon", "=", RowBox[{ RowBox[{"motor", "[", "t", "]"}], FractionBox[ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], ",", RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], ",", RowBox[{ RowBox[{"z", "'"}], "[", "t", "]"}]}], "}"}], SqrtBox[ RowBox[{ SuperscriptBox[ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "2"], "+", SuperscriptBox[ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], "2"], "+", SuperscriptBox[ RowBox[{ RowBox[{"z", "'"}], "[", "t", "]"}], "2"]}]]]}]}], ";"}]}], "Input", CellChangeTimes->{{3.593327743611609*^9, 3.593327755788723*^9}, { 3.59332779923626*^9, 3.5933278697488337`*^9}, {3.593327904979374*^9, 3.593327917876738*^9}, {3.593327954660377*^9, 3.5933279769291*^9}, { 3.5933280270155582`*^9, 3.5933280312300377`*^9}, {3.593328217468266*^9, 3.59332823598258*^9}, {3.593328427388199*^9, 3.593328439338046*^9}, { 3.593328685877589*^9, 3.593328693312943*^9}, {3.593328903427949*^9, 3.5933289035950537`*^9}, {3.5950991711423883`*^9, 3.59509918591053*^9}, { 3.595099217820763*^9, 3.595099218039439*^9}}], Cell[TextData[{ "A kone\[CHacek]n\[EHacek] vlastn\[IAcute] Newtonova rovnice s po\[CHacek]\ \[AAcute]te\[CHacek]n\[IAcute]mi podm\[IAcute]nkami (start je z bodu ", Cell[BoxData[ FormBox[ RowBox[{"(", RowBox[{"0", ",", "0", ",", "0"}], ")"}], TraditionalForm]], FormatType->"TraditionalForm"], ")." }], "Text", CellChangeTimes->{{3.5950992155027*^9, 3.595099242046949*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"newton", "=", RowBox[{ RowBox[{ RowBox[{"m", "[", "t", "]"}], RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "''"}], "[", "t", "]"}], ",", RowBox[{ RowBox[{"y", "''"}], "[", "t", "]"}], ",", RowBox[{ RowBox[{"z", "''"}], "[", "t", "]"}]}], "}"}]}], "\[Equal]", RowBox[{"gravitace", "+", "vitr", "+", "odpor", "+", "pohon"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"start", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"y", "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"z", "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "0", "]"}], "\[Equal]", "vx0"}], ",", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "0", "]"}], "\[Equal]", "vy0"}], ",", RowBox[{ RowBox[{ RowBox[{"z", "'"}], "[", "0", "]"}], "\[Equal]", "vz0"}]}], "}"}]}], ";"}]}], "Input", CellChangeTimes->{{3.593328057350133*^9, 3.593328125242112*^9}, { 3.59332818160133*^9, 3.593328212562562*^9}, 3.5933282629874907`*^9, { 3.593328451622961*^9, 3.593328489063087*^9}}], Cell[TextData[{ "\[CapitalRHacek]e\[SHacek]en\[IAcute] pomoc\[IAcute] NDSolve. \ \[CapitalRHacek]e\[SHacek]en\[IAcute] p\[RHacek]eru\[SHacek]\[IAcute]me v \ okam\[ZHacek]ik kdy raketa spadne na zem (rovina ", Cell[BoxData[ FormBox[ RowBox[{"(", RowBox[{"x", ",", "y", ",", "0"}]}], TraditionalForm]], FormatType->"TraditionalForm"], "))." }], "Text", CellChangeTimes->{{3.595099250253849*^9, 3.59509928475908*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"sol", "=", RowBox[{"NDSolve", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"newton", ",", "start"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"x", ",", "y", ",", "z"}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "100"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Method", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"z", "[", "t", "]"}]}]}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"\[CHacek]as", " ", "dopadu"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dopad", "=", RowBox[{ RowBox[{"InterpolatingFunctionDomain", "[", RowBox[{"First", "[", RowBox[{"z", "/.", "sol"}], "]"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2"}], "\[RightDoubleBracket]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.593328292762521*^9, 3.5933283023881693`*^9}, 3.593328341906855*^9, 3.593328399100045*^9, {3.593328711948271*^9, 3.593328740480804*^9}, {3.593328831309877*^9, 3.593328832031398*^9}, { 3.593343690655414*^9, 3.593343691982428*^9}, {3.59334372783991*^9, 3.5933437321350193`*^9}, {3.5950992910650797`*^9, 3.595099310327932*^9}}], Cell["\<\ Interaktivn\[IAcute] anal\[YAcute]za letu. Pro spr\[AAcute]vn\[EAcute] funguv\ \[AAcute]n\[IAcute] je pot\[RHacek]ebn\[EAcute] spustit prvn\[IAcute] p\ \[RHacek]\[IAcute]kaz v t\[EAcute]to sekci.\ \>", "Text", CellChangeTimes->{{3.595099325039969*^9, 3.595099331255746*^9}, { 3.595099550016749*^9, 3.595099565448612*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"GraphicsGrid", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ParametricPlot3D", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}], ",", RowBox[{"z", "[", "t", "]"}]}], "}"}], "/.", "sol"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "dopad"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"ImageSize", "\[Rule]", "300"}], ",", "\[IndentingNewLine]", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", "Thick"}], "}"}]}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"z", "[", "t", "]"}], "/.", "sol"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "dopad"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Blue", ",", "Thick"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Epilog", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", "Large", "]"}], ",", RowBox[{"Point", "[", RowBox[{"Flatten", "[", RowBox[{"{", RowBox[{"tt", ",", RowBox[{ RowBox[{"z", "[", "tt", "]"}], "/.", "sol"}]}], "}"}], "]"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Frame", "\[Rule]", "True"}], ",", "\[IndentingNewLine]", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{ "\"\<\[CHacek]as\>\"", ",", "\"\\""}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ "PlotLabel", "\[Rule]", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{ SqrtBox[ RowBox[{ SuperscriptBox[ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "2"], "+", SuperscriptBox[ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], "2"], "+", SuperscriptBox[ RowBox[{ RowBox[{"z", "'"}], "[", "t", "]"}], "2"]}]], "/.", "sol"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "dopad"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Green", ",", "Thick"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Epilog", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", "Large", "]"}], ",", RowBox[{"Point", "[", RowBox[{"Flatten", "[", RowBox[{"{", RowBox[{"tt", ",", RowBox[{ SqrtBox[ RowBox[{ SuperscriptBox[ RowBox[{ RowBox[{"x", "'"}], "[", "tt", "]"}], "2"], "+", SuperscriptBox[ RowBox[{ RowBox[{"y", "'"}], "[", "tt", "]"}], "2"], "+", SuperscriptBox[ RowBox[{ RowBox[{"z", "'"}], "[", "tt", "]"}], "2"]}]], "/.", "sol"}]}], "}"}], "]"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Frame", "\[Rule]", "True"}], ",", "\[IndentingNewLine]", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\<\[CHacek]as\>\"", ",", "\"\\""}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ "PlotLabel", "\[Rule]", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{"motor", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "dopad"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Brown", ",", "Thick"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Epilog", "\[Rule]", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", "Large", "]"}], ",", RowBox[{"Point", "[", RowBox[{"Flatten", "[", RowBox[{"{", RowBox[{"tt", ",", RowBox[{"motor", "[", "tt", "]"}]}], "}"}], "]"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Frame", "\[Rule]", "True"}], ",", "\[IndentingNewLine]", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\<\[CHacek]as\>\"", ",", "\"\\""}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ImageSize", "\[Rule]", "300"}]}], "]"}]}], "\[IndentingNewLine]", "}"}]}], "\[IndentingNewLine]", "}"}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"tt", ",", "0", ",", "\"\<\[CapitalCHacek]as\>\""}], "}"}], ",", "0", ",", "dopad", ",", RowBox[{"ContinuousAction", "\[Rule]", "False"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.595099332961927*^9, 3.5950993351457453`*^9}, { 3.5950993757041397`*^9, 3.595099505250956*^9}, {3.5950995961174383`*^9, 3.595099766036865*^9}, {3.595099812557906*^9, 3.5950998131972713`*^9}, { 3.595099843441539*^9, 3.595100015606093*^9}, {3.595100066523691*^9, 3.5951000976589537`*^9}, {3.595100180753471*^9, 3.59510032073781*^9}, { 3.595100359872777*^9, 3.595100410366844*^9}, {3.595100453014164*^9, 3.595100538741295*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`tt$$ = 0.45, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`tt$$], 0, "\[CapitalCHacek]as"}, 0, 9.69542816878173}}, Typeset`size$$ = {652., {201., 207.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`tt$15170$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`tt$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`tt$$, $CellContext`tt$15170$$, 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" :> GraphicsGrid[{{ ParametricPlot3D[ ReplaceAll[{ $CellContext`x[$CellContext`t], $CellContext`y[$CellContext`t], $CellContext`z[$CellContext`t]}, $CellContext`sol], \ {$CellContext`t, 0, $CellContext`dopad}, PlotRange -> All, ImageSize -> 300, AxesLabel -> {"x", "y", "z"}, PlotStyle -> {Red, Thick}], Plot[ ReplaceAll[ $CellContext`z[$CellContext`t], $CellContext`sol], \ {$CellContext`t, 0, $CellContext`dopad}, PlotStyle -> {Blue, Thick}, Epilog -> {Red, PointSize[Large], Point[ Flatten[{$CellContext`tt$$, ReplaceAll[ $CellContext`z[$CellContext`tt$$], $CellContext`sol]}]]}, Frame -> True, FrameLabel -> {"\[CHacek]as", "v\[YAcute]\[SHacek]ka"}, PlotLabel -> "V\[YAcute]\[SHacek]kov\[YAcute] profil", ImageSize -> 300]}, { Plot[ ReplaceAll[(Derivative[1][$CellContext`x][$CellContext`t]^2 + Derivative[1][$CellContext`y][$CellContext`t]^2 + Derivative[1][$CellContext`z][$CellContext`t]^2)^ Rational[1, 2], $CellContext`sol], {$CellContext`t, 0, $CellContext`dopad}, PlotStyle -> {Green, Thick}, Epilog -> {Red, PointSize[Large], Point[ Flatten[{$CellContext`tt$$, ReplaceAll[( Derivative[1][$CellContext`x][$CellContext`tt$$]^2 + Derivative[1][$CellContext`y][$CellContext`tt$$]^2 + Derivative[1][$CellContext`z][$CellContext`tt$$]^2)^ Rational[1, 2], $CellContext`sol]}]]}, Frame -> True, FrameLabel -> {"\[CHacek]as", "rychlost"}, PlotLabel -> "Rychlostn\[IAcute] pr\[URing]b\[EHacek]h", ImageSize -> 300], Plot[ $CellContext`motor[$CellContext`t], {$CellContext`t, 0, $CellContext`dopad}, PlotStyle -> {Brown, Thick}, Epilog -> {Red, PointSize[Large], Point[ Flatten[{$CellContext`tt$$, $CellContext`motor[$CellContext`tt$$]}]]}, Frame -> True, FrameLabel -> {"\[CHacek]as", "motor"}, ImageSize -> 300]}}], "Specifications" :> {{{$CellContext`tt$$, 0, "\[CapitalCHacek]as"}, 0, 9.69542816878173, ContinuousAction -> False}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{699., {245., 252.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{{3.5950994238257504`*^9, 3.595099447059155*^9}, 3.595099506730563*^9, 3.595099569817531*^9, {3.595099659551571*^9, 3.595099680677402*^9}, {3.595099739921735*^9, 3.59509976744466*^9}, 3.5950998135936127`*^9, 3.595099851504863*^9, {3.5950998834200907`*^9, 3.595099909954135*^9}, {3.5950999974104147`*^9, 3.595100016085966*^9}, { 3.595100073771318*^9, 3.595100098027707*^9}, {3.595100186912735*^9, 3.5951001894150763`*^9}, 3.5951002396967983`*^9, {3.5951002848992853`*^9, 3.5951003120121098`*^9}, {3.5951003609525347`*^9, 3.595100374545879*^9}, 3.5951004111797953`*^9, {3.5951004543198*^9, 3.595100468618101*^9}, { 3.5951005396693707`*^9, 3.595100593663912*^9}}] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{934, 879}, WindowMargins->{{Automatic, -1438}, {Automatic, 19}}, FrontEndVersion->"9.0 for Linux x86 (64-bit) (November 20, 2012)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 155, 2, 92, "Title"], Cell[737, 26, 148, 3, 50, "Subtitle"], Cell[CellGroupData[{ Cell[910, 33, 106, 1, 81, "Section"], Cell[1019, 36, 315, 6, 32, "Text"], Cell[1337, 44, 341, 10, 27, "DisplayFormula"], Cell[1681, 56, 2408, 65, 77, "Text"], Cell[4092, 123, 313, 5, 32, "Text"], Cell[CellGroupData[{ Cell[4430, 132, 102, 1, 44, "Subsection"], Cell[4535, 135, 2319, 62, 98, "Text"], Cell[6857, 199, 600, 10, 53, "Text"], Cell[7460, 211, 634, 19, 50, "DisplayFormula"], Cell[8097, 232, 107, 1, 32, "Text"], Cell[8207, 235, 635, 20, 50, "DisplayFormula"], Cell[8845, 257, 989, 17, 53, "Text"], Cell[9837, 276, 399, 7, 32, "Text"], Cell[10239, 285, 610, 20, 76, "DisplayFormula"], Cell[10852, 307, 550, 17, 33, "Text"], Cell[CellGroupData[{ Cell[11427, 328, 7307, 183, 721, "Input"], Cell[18737, 513, 6824, 136, 712, "Output"] }, Open ]], Cell[25576, 652, 69, 1, 32, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[25682, 658, 129, 1, 44, "Subsection"], Cell[25814, 661, 250, 5, 32, "Text"], Cell[26067, 668, 909, 28, 53, "DisplayFormula"], Cell[26979, 698, 550, 12, 33, "Text"], Cell[CellGroupData[{ Cell[27554, 714, 1384, 45, 59, "Input"], Cell[28941, 761, 1395, 42, 55, "Output"] }, Open ]], Cell[30351, 806, 203, 4, 32, "Text"], Cell[CellGroupData[{ Cell[30579, 814, 8640, 210, 918, "Input"], Cell[39222, 1026, 6976, 140, 690, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[46247, 1172, 111, 1, 44, "Subsection"], Cell[46361, 1175, 331, 6, 32, "Text"], Cell[46695, 1183, 1860, 60, 210, "DisplayFormula"], Cell[CellGroupData[{ Cell[48580, 1247, 8064, 212, 852, "Input"], Cell[56647, 1461, 6898, 140, 726, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[63594, 1607, 259, 7, 44, "Subsection"], Cell[63856, 1616, 159, 2, 30, "Text"], Cell[CellGroupData[{ Cell[64040, 1622, 6219, 157, 796, "Input"], Cell[70262, 1781, 5931, 125, 700, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[76242, 1912, 111, 1, 44, "Subsection"], Cell[76356, 1915, 1744, 30, 179, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[78149, 1951, 322, 6, 117, "Section"], Cell[78474, 1959, 141, 4, 32, "Input"], Cell[78618, 1965, 955, 14, 95, "Text"], Cell[79576, 1981, 1136, 48, 69, "DisplayFormula"], Cell[80715, 2031, 1327, 35, 96, "Text"], Cell[82045, 2068, 365, 6, 51, "Text"], Cell[82413, 2076, 3003, 68, 385, "Input"], Cell[85419, 2146, 160, 3, 32, "Text"], Cell[85582, 2151, 1922, 56, 140, "Input"], Cell[87507, 2209, 388, 10, 32, "Text"], Cell[87898, 2221, 1278, 38, 55, "Input"], Cell[89179, 2261, 430, 11, 33, "Text"], Cell[89612, 2274, 1412, 32, 165, "Input"], Cell[91027, 2308, 334, 6, 32, "Text"], Cell[CellGroupData[{ Cell[91386, 2318, 6899, 161, 964, "Input"], Cell[98288, 2481, 4603, 90, 547, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)