(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 35208, 832] NotebookOptionsPosition[ 34432, 800] NotebookOutlinePosition[ 34774, 815] CellTagsIndexPosition[ 34731, 812] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{ RowBox[{"Quit", "[", "]"}], ";"}]], "Input", CellChangeTimes->{{3.7311072152584*^9, 3.7311072163036003`*^9}}], Cell[CellGroupData[{ Cell["Mec\[AAcute]nica Cl\[AAcute]sica 2018 1c - Turno A", "Chapter", CellChangeTimes->{{3.7311487609214*^9, 3.7311487993634*^9}, { 3.7311557874128*^9, 3.7311557877404003`*^9}}], Cell[CellGroupData[{ Cell["\<\ Notebook 'm\[IAcute]nimo local' para el problema del p\[EAcute]ndulo con \ soporte m\[OAcute]vil (problema 1-17).\ \>", "Subchapter", CellChangeTimes->{{3.7311063738304*^9, 3.7311063883248*^9}, { 3.7311064338942003`*^9, 3.73110644073*^9}, {3.7311465355238*^9, 3.7311465386282*^9}, {3.731148743619*^9, 3.7311487468482*^9}, { 3.7311936253642*^9, 3.7311936262032003`*^9}}], Cell[BoxData[ GraphicsBox[{ {RGBColor[0.87, 0.94, 1], AbsoluteThickness[1], ArrowBox[{{-1.5, 0}, {1.5, 0}}], ArrowBox[{{0, 1.5}, {0, -1.5}}]}, { {RGBColor[0, 1, 0], Opacity[1], DiskBox[{-0.95, 0}, 0.05]}, {RGBColor[1, 0, 0], Opacity[1], DiskBox[NCache[{-0.44999999999999996`, Rational[-1, 2] 3^Rational[1, 2]}, {-0.44999999999999996`, -0.8660254037844386}], 0.05]}}, {RGBColor[1, 0.5, 0], AbsoluteThickness[3], Arrowheads[0.03], ArrowBox[{{0.75, -0.25}, {0.75, -0.75}}]}, {GrayLevel[1], AbsoluteThickness[4], ArrowBox[NCache[{{-0.95, 0}, {-0.44999999999999996`, Rational[-1, 2] 3^Rational[1, 2]}}, {{-0.95, 0}, {-0.44999999999999996`, -0.8660254037844386}}]]}, {GrayLevel[1], AbsoluteThickness[1], Dashing[{Small, Small}], LineBox[{{-0.95, 0}, {-0.95, -1.5}}]}, {RGBColor[1, 1, 0], AbsoluteThickness[2], ArrowBox[{{-0.9500000000000002, -1.}, {-0.900020830729322, \ -0.9987502603949663}, {-0.8501665833531723, -0.9950041652780258}, \ {-0.8005618675264006, -0.9887710779360422}, {-0.7513306692049387, \ -0.9800665778412416}, {-0.7025960407454772, -0.9689124217106448}, \ {-0.6544797933386608, -0.9553364891256061}, {-0.6071021925445491, \ -0.9393727128473791}, {-0.5605816576913494, -0.921060994002885}, \ {-0.5150344658887698, -0.9004471023526769}, {-0.4705744613957971, \ -0.8775825618903728}}]}, { {GrayLevel[1], InsetBox[ StyleBox["\<\"\\!\\(\\*SubscriptBox[\\(m\\), \\(1\\)]\\)\"\>", StripOnInput->False, FontSize->25], {-0.95, 0.25}]}, {RGBColor[1, 0.5, 0], InsetBox[ StyleBox["\<\"\\!\\(\\*OverscriptBox[\\(g\\), \\(\\(\[Rule]\\)\\(\\\\ \ \\)\\)]\\)\"\>", StripOnInput->False, FontSize->24], {0.95, -0.45}]}, {GrayLevel[1], InsetBox[ StyleBox["\<\"\[ScriptL]\"\>", StripOnInput->False, FontSize->30], {-0.51, -0.4330127018922193}]}, {GrayLevel[1], InsetBox[ StyleBox["\<\"\\!\\(\\*SubscriptBox[\\(m\\), \\(2\\)]\\)\"\>", StripOnInput->False, FontSize->25], {-0.24999999999999994`, -0.7160254037844386}]}, {GrayLevel[1], InsetBox[ StyleBox["\<\"\[ScriptX]\"\>", StripOnInput->False, FontSize->30], {0.2, -1.35}]}, {GrayLevel[1], InsetBox[ StyleBox["\<\"\[ScriptY]\"\>", StripOnInput->False, FontSize->30], {1.35, 0.2}]}, {RGBColor[1, 1, 0], InsetBox[ StyleBox["\<\"y\"\>", StripOnInput->False, FontSize->30], {-1.15, -0.12}]}, {RGBColor[1, 1, 0], InsetBox[ StyleBox["\<\"\[Phi]\"\>", StripOnInput->False, FontSize->25], {-0.6911809548974792, -1.1459258262890681`}]}}}, AspectRatio->Automatic, Axes->False, Background->GrayLevel[0], ImageSize->400, PlotRange->{{-1.6500000000000001`, 1.6500000000000001`}, {-1.6500000000000001`, 1.6500000000000001`}}, Ticks->False]], "Input", CellChangeTimes->{{3.7311476853638*^9, 3.7311476879378*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ El sistema tiene s\[OAcute]lo dos posibles movimientos cualitativamente \ diferentes: \[FilledSmallCircle] oscilaciones peri\[OAcute]dicas, en donde \[Phi] avanza \ y retrocede, \[FilledSmallCircle] rotaciones peri\[OAcute]dicas, en donde \[Phi] es una \ funci\[OAcute]n siempre creciente o siempre decreciente.\ \>", "Subchapter", CellChangeTimes->{{3.7311515599234*^9, 3.7311517129372*^9}, 3.7311527251786003`*^9}], Cell["\<\ Todos los comentarios entre signos \"(* ........*)\" pueden borrarse. Est\ \[AAcute]n ah\[IAcute] como gu\[IAcute]a, pero entorpecen la visi\[OAcute]n.\ \>", "Text", CellChangeTimes->{{3.7311537460727997`*^9, 3.7311537947136*^9}, { 3.7312426844021997`*^9, 3.7312426853262*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Abajo: \n\n", StyleBox["\[FilledSmallCircle] la soluci\[OAcute]n num\[EAcute]rica \n\ \[FilledSmallCircle] la extracci\[OAcute]n del per\[IAcute]odo [detecci\ \[OAcute]n de los sucesivos cruces de \[Phi] por 0]\n\[FilledSmallCircle] el \ gr\[AAcute]fico en bruto de las funciones \[Phi](t) e y(t)", FontSize->24] }], "Section", CellChangeTimes->{{3.7310980899834003`*^9, 3.7310981529414*^9}, { 3.7311014944354*^9, 3.731101518539*^9}, {3.7311065377734003`*^9, 3.7311065444034*^9}, {3.7311477024362*^9, 3.7311478281448*^9}, { 3.7311488217424*^9, 3.7311488562298*^9}, {3.7311527406562*^9, 3.731152747795*^9}, {3.7312426904804*^9, 3.731242698642*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"Ejecutar", " ", "esta", " ", "celda", " ", "con", " ", "Shift"}], "+", RowBox[{ "Enter", " ", "o", " ", "el", " ", "Enter", " ", "del", " ", "teclado", " ", RowBox[{"num\[EAcute]rico", " ", "[", RowBox[{ "el", " ", "cursor", " ", "debe", " ", "estar", " ", "dentro", " ", "de", " ", "la", " ", "celda"}], "]"}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", RowBox[{"\[Phi]", ",", " ", "y"}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Condiciones", " ", "iniciales", " ", "para", " ", "y"}], ",", " ", RowBox[{"\[Phi]", " ", "y", " ", "\[Phi]", " ", RowBox[{"punto", ".", " ", "Experimenten"}], " ", "cambiando", " ", "estos", " ", "valores"}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"y0", " ", "=", " ", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Phi]0", " ", "=", RowBox[{"\[Pi]", "/", "2"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Phi]p0", " ", "=", " ", "0.2"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Si", " ", "cuentan", " ", "como", " ", "yo", " ", RowBox[{"(", RowBox[{"con", " ", "los", " ", "dedos"}], ")"}]}], ",", " ", RowBox[{ "ver\[AAcute]n", " ", "que", " ", "estas", " ", "son", " ", "s\[OAcute]lo", " ", "3", " ", RowBox[{"condiciones", ".", " ", "Falta"}], " ", RowBox[{"una", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{ "La", " ", "condici\[OAcute]n", " ", "inicial", " ", "suplementaria", " ", "est\[AAcute]", " ", "impl\[IAcute]cita", " ", "en", " ", "las", " ", "ecuaciones", " ", "de", " ", "movimiento", " ", "dentro", " ", "del", " ", "NDSolve"}], ";", " ", RowBox[{"a", " ", "saber"}]}], ",", " ", RowBox[{ SubscriptBox["P", "y"], " ", "=", " ", "0."}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Es", " ", "decir"}], ",", " ", RowBox[{ "el", " ", "CM", " ", "del", " ", "sistema", " ", "no", " ", "se", " ", "mueve", " ", "en", " ", "la", " ", "direcci\[OAcute]n", " ", RowBox[{"\[ScriptY]", ".", " ", "Recordar"}]}], ",", " ", "adem\[AAcute]s", ",", RowBox[{"que", " ", SubscriptBox["P", "y"], " ", "se", " ", RowBox[{"conserva", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"La", " ", "elecci\[OAcute]n", " ", SubscriptBox["P", "y"]}], " ", "=", " ", RowBox[{ "0", " ", "no", " ", "significa", " ", "ninguna", " ", "p\[EAcute]rdida", " ", "de", " ", RowBox[{"generalidad", ".", " ", "Corresponde"}], " ", "a", " ", "tomar", " ", "un", " ", "SR", " ", "que", " ", "se", " ", "mueve", " ", "con", " ", "la", " ", "velocidad", " ", "horizontal", " ", "del", " ", RowBox[{"CM", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"m1", " ", "=", " ", "0.2"}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{ "Es", " ", "el", " ", "\[UAcute]nico", " ", "par\[AAcute]metro", " ", "que", " ", RowBox[{"importa", ".", " ", "Estoy"}], " ", "tomando", " ", "m2"}], " ", "=", " ", "1"}], ",", " ", "o", ",", " ", RowBox[{"si", " ", "se", " ", "quiere"}], ",", " ", RowBox[{ "definiendo", " ", "m1", " ", "en", " ", "unidades", " ", "de", " ", RowBox[{"m2", ".", " ", "Experimenten"}], " ", "cambiando", " ", RowBox[{"m1", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"tmax", " ", "=", " ", "30"}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"Un", " ", "tiempo", " ", "elegido", " ", "a", " ", "ojo"}], ",", " ", RowBox[{ "lo", " ", "suficientemente", " ", "grande", " ", "como", " ", "para", " ", "incluir", " ", "varios", " ", "per\[IAcute]odos"}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Ahora", " ", RowBox[{"s\[IAcute]", ":", " ", RowBox[{ "la", " ", "soluci\[OAcute]n", " ", "num\[EAcute]rica", " ", "mediante", " ", RowBox[{"NDSolve", "."}]}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"La", " ", "conservaci\[OAcute]n", " ", "de", " ", SubscriptBox["P", "y"], " ", "permitir\[IAcute]a", " ", "reducir", " ", "todo", " ", "a", " ", "una", " ", "ecuaci\[OAcute]n", " ", "diferencial", " ", "para", " ", RowBox[{"\[Phi]", "."}]}], " ", "*)"}], " ", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"De", " ", "todas", " ", "maneras"}], ",", " ", RowBox[{ "incluyo", " ", "la", " ", "ecuaci\[OAcute]n", " ", "de", " ", "primer", " ", "orden", " ", "para", " ", RowBox[{"y", "[", "t", "]"}], " ", "as\[IAcute]", " ", "tienen", " ", "un", " ", "ejemplo", " ", "con", " ", "dos", " ", "funciones", " ", RowBox[{"inc\[OAcute]gnitas", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "En", " ", "realidad", " ", "podr\[IAcute]amos", " ", "usar", " ", "la", " ", "conservaci\[OAcute]n", " ", "de", " ", SubscriptBox["P", RowBox[{"y", " "}]], "para", " ", "escribir", " ", "directamente", " ", RowBox[{"y", "[", "t", "]"}]}], " ", "=", " ", RowBox[{"y0", " ", "-", RowBox[{ FractionBox["1", RowBox[{"1", "+", "m1"}]], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Sin", "[", RowBox[{"\[Phi]", "[", "t", "]"}], "]"}], " ", "-", " ", RowBox[{"Sin", "[", "\[Phi]0", "]"}]}], ")"}], "."}]}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"sol", ",", " ", "CrucesPorCero"}], "}"}], " ", "=", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Reap", "[", "\[IndentingNewLine]", RowBox[{"NDSolve", "[", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", FractionBox[ SuperscriptBox[ RowBox[{"Cos", "[", RowBox[{"\[Phi]", "[", "t", "]"}], "]"}], "2"], RowBox[{"1", "+", "m1"}]]}], ")"}], " ", RowBox[{ RowBox[{"\[Phi]", "''"}], "[", "t", "]"}]}], " ", "+", FractionBox[ RowBox[{" ", RowBox[{ RowBox[{"Sin", "[", RowBox[{"2", RowBox[{"\[Phi]", "[", "t", "]"}]}], "]"}], " ", SuperscriptBox[ RowBox[{ RowBox[{"\[Phi]", "'"}], "[", "t", "]"}], "2"]}]}], RowBox[{"2", RowBox[{"(", RowBox[{"1", "+", "m1"}], ")"}]}]], "+", " ", RowBox[{"Sin", "[", RowBox[{"\[Phi]", "[", "t", "]"}], "]"}]}], "\[Equal]", " ", "0"}], ",", " ", RowBox[{"(*", " ", RowBox[{"Ecuaci\[OAcute]n", " ", "para", " ", RowBox[{"\[Phi]", ".", " ", "\[DownExclamation]Deducir"}], " ", "y", " ", RowBox[{"revisar", "!"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], " ", "\[Equal]", RowBox[{ RowBox[{"-", FractionBox["1", RowBox[{"1", "+", "m1"}]]}], RowBox[{"Cos", "[", RowBox[{"\[Phi]", "[", "t", "]"}], "]"}], " ", RowBox[{ RowBox[{"\[Phi]", "'"}], "[", "t", "]"}]}]}], ",", " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"Ecuaci\[OAcute]n", " ", "para", " ", "y"}], ",", " ", RowBox[{ RowBox[{ "habiendo", " ", "tomado", " ", "que", " ", "el", " ", "impulso", " ", "total", " ", SubscriptBox["P", "y"]}], " ", "=", " ", "0"}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Phi]", "[", "0", "]"}], " ", "\[Equal]", " ", "\[Phi]0"}], ",", RowBox[{ RowBox[{ RowBox[{"\[Phi]", "'"}], "[", "0", "]"}], " ", "\[Equal]", " ", "\[Phi]p0"}], ",", " ", RowBox[{ RowBox[{"y", "[", "0", "]"}], " ", "\[Equal]", " ", "y0"}], ",", " ", RowBox[{"(*", " ", RowBox[{"Condiciones", " ", "iniciales"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"WhenEvent", "[", RowBox[{ RowBox[{ RowBox[{"Sin", "[", RowBox[{ RowBox[{"\[Phi]", "[", "t", "]"}], "/", "2"}], "]"}], " ", "\[Equal]", " ", "0"}], " ", ",", RowBox[{"Sow", "[", RowBox[{"{", RowBox[{"t", ",", " ", RowBox[{"Sign", "[", RowBox[{ RowBox[{"\[Phi]", "'"}], "[", "t", "]"}], "]"}]}], "}"}], "]"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{ "Guarda", " ", "los", " ", "tiempos", " ", "y", " ", "la", " ", "direcci\[OAcute]n", " ", "de", " ", "movimiento", " ", "cuando", " ", "la", " ", "barra", " ", "cruza", " ", "el", " ", "eje", " ", "x"}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "}"}], ",", " ", RowBox[{"{", RowBox[{"\[Phi]", ",", " ", "y"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"t", ",", " ", "0", ",", " ", "tmax"}], "}"}]}], " ", RowBox[{"(*", " ", RowBox[{ "Funciones", " ", "inc\[OAcute]gnitas", " ", "e", " ", "intervalo", " ", "de", " ", "integraci\[OAcute]n"}], " ", "*)"}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\n", RowBox[{ RowBox[{"cruces", " ", "=", " ", RowBox[{ RowBox[{"CrucesPorCero", "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", " ", "1"}], "]"}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{ "Esta", " ", "lista", " ", "guarda", " ", "los", " ", "tiempos", " ", "en", " ", "los", " ", "que", " ", "la", " ", "barra", " ", "cruza", " ", "por", " ", "\[Phi]"}], " ", "=", " ", "0"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sentido", " ", "=", " ", RowBox[{ RowBox[{"CrucesPorCero", "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", " ", "2"}], "]"}], "]"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{ "Esta", " ", "lista", " ", "guarda", " ", "el", " ", "sentido", " ", "en", " ", "que", " ", "se", " ", "mueve", " ", "la", " ", "barra", " ", "en", " ", "cada", " ", "paso", " ", "por", " ", "\[Phi]"}], " ", "=", " ", "0"}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"Phi", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", " ", "\"\<\\n\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"Y", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", " ", "\"\<\\n\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", " ", "cruces", ",", " ", "\"\<\\n\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\<\[CapitalDelta]t entre cruces consecutivos \[Rule] \>\"", ",", " ", RowBox[{"Differences", "[", "cruces", "]"}], ",", " ", "\"\<\\n\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Tally", "[", "sentido", "]"}], "]"}], " ", "\[Equal]", " ", "2"}], ",", " ", "\"\\"", ",", " ", "\"\\""}], "]"}]}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ "Respecto", " ", "al", " ", "c\[AAcute]lculo", " ", "del", " ", "per\[IAcute]odo", " ", "hecho", " ", "aqu\[IAcute]", " ", RowBox[{"abajo", ":", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ "\[FilledSmallCircle]", " ", "Si", " ", "el", " ", "sistema", " ", "oscila", " ", "como", " ", "un", " ", "p\[EAcute]ndulo"}]}]}], ",", " ", RowBox[{ "hay", " ", "cruces", " ", "en", " ", "uno", " ", "y", " ", "otro", " ", RowBox[{"sentido", ".", " ", "Por"}], " ", "eso", " ", "el", " ", "per\[IAcute]odo", " ", "es", " ", "2", " ", "veces", " ", "el", " ", "intervalo", " ", "entre", " ", "cruces", " ", "por", " ", "0.", " ", "\[DownQuestion]Por", " ", RowBox[{ "qu\[EAcute]", "?", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[FilledSmallCircle]"}], " ", "Si", " ", "el", " ", "sistema", " ", "rota", " ", "siempre", " ", "en", " ", "un", " ", "mismo", " ", "sentido"}], ",", " ", RowBox[{ "el", " ", "per\[IAcute]odo", " ", "es", " ", "directamente", " ", "el", " ", "intervalo", " ", "entre", " ", "sucesivos", " ", "cruces", " ", "por", " ", RowBox[{ "cero", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[FilledSmallCircle]"}], " ", "La", " ", "funci\[OAcute]n", " ", "Tally", " ", RowBox[{"(", RowBox[{"\[DownExclamation]F1", " ", RowBox[{"Tally", "!"}]}], ")"}], " ", "lo", " ", "que", " ", "me", " ", "dice", " ", "es", " ", "cu\[AAcute]ntos", " ", "tipos", " ", "de", " ", "cruces", " ", RowBox[{"hay", ".", " ", "Si"}], " ", "todos", " ", "son", " ", "en", " ", "el", " ", "mismo", " ", "sentido"}], ",", " ", RowBox[{ "entonces", " ", "Tally", " ", "va", " ", "a", " ", "tener", " ", "un", " ", "s\[OAcute]lo", " ", RowBox[{"elemento", ".", " ", "Si"}], " ", "hay", " ", "cruces", " ", "en", " ", "uno", " ", "y", " ", "otro", " ", "sentido", " ", "Tally", " ", "va", " ", "a", " ", "tener", " ", "2", " ", RowBox[{"elementos", ".", " ", "Entonces"}], " ", "si", " ", "multiplico", " ", "por", " ", "la", " ", "longitud", " ", "de", " ", "Tally", " ", "obtengo", " ", "el", " ", "per\[IAcute]odo", " ", "correcto"}], ",", " ", RowBox[{ "tanto", " ", "para", " ", "las", " ", "oscilaciones", " ", "como", " ", "para", " ", "las", " ", RowBox[{"rotaciones", "."}]}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"T", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"Differences", "[", "cruces", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Times]", " ", RowBox[{"Length", "[", RowBox[{"Tally", "[", "sentido", "]"}], "]"}]}]}]}], "]"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Phi", "[", "t", "]"}], ",", " ", RowBox[{"Y", "[", "t", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"t", ",", " ", "0", ",", RowBox[{"2", "T"}]}], "}"}], ",", RowBox[{"PlotLegends", "\[Rule]", "\"\\""}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", "Thick"}], ",", " ", RowBox[{"ImageMargins", "\[Rule]", "50"}], ",", " ", RowBox[{"PlotLabel", "\[Rule]", " ", RowBox[{"Style", "[", RowBox[{"\"\<\[Phi](t), y(t) \\n\>\"", ",", " ", "20"}], "]"}]}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.7309299208972*^9, 3.7309299302468*^9}, { 3.7309300836935997`*^9, 3.7309301202862*^9}, {3.7309302411535997`*^9, 3.730930276576*^9}, {3.7309303131898003`*^9, 3.7309303625973997`*^9}, { 3.7309877890039997`*^9, 3.7309879280081997`*^9}, {3.7309879602634*^9, 3.7309884510758*^9}, {3.7309885755596*^9, 3.7309887892925997`*^9}, 3.7309888221022*^9, {3.7309896759948*^9, 3.730989712383*^9}, { 3.7309897723873997`*^9, 3.7309897942402*^9}, {3.7309902840242*^9, 3.7309904315088*^9}, {3.7309904869948*^9, 3.730990530172*^9}, { 3.7309912317482*^9, 3.7309913086118*^9}, {3.730991460476*^9, 3.7309915676963997`*^9}, {3.7309918236628*^9, 3.7309918245364*^9}, { 3.7309919542376003`*^9, 3.7309919669254*^9}, {3.7310048663722*^9, 3.7310048806436*^9}, {3.7310049240706*^9, 3.7310049382806*^9}, { 3.731005038652*^9, 3.7310050478803997`*^9}, 3.7310051689264*^9, { 3.7310052402282*^9, 3.7310052499528*^9}, {3.7310052999700003`*^9, 3.731005323466*^9}, {3.7310053652816*^9, 3.731005402766*^9}, { 3.7310054383266*^9, 3.7310054777248*^9}, {3.7310201669844*^9, 3.7310202546912003`*^9}, {3.7310208508118*^9, 3.7310208562292*^9}, { 3.7310210031142*^9, 3.7310210057124*^9}, {3.7310211439642*^9, 3.7310212229154*^9}, {3.7310212747418003`*^9, 3.7310212831232*^9}, 3.7310213572518*^9, 3.7310213998722*^9, {3.7310214398154*^9, 3.7310214537088003`*^9}, {3.7310214842342*^9, 3.731021529708*^9}, 3.7310215686324*^9, {3.731021608182*^9, 3.7310217440572*^9}, 3.7310217752282*^9, {3.7310218076730003`*^9, 3.7310218239502*^9}, { 3.731096973901*^9, 3.7310971095478*^9}, {3.7310972051238003`*^9, 3.7310972367676*^9}, {3.7310972732720003`*^9, 3.7310973049374*^9}, { 3.731097416513*^9, 3.7310974461102*^9}, {3.7310981634421997`*^9, 3.7310982263613997`*^9}, {3.7311015262752*^9, 3.7311016212054*^9}, { 3.7311016685987997`*^9, 3.7311016985492*^9}, {3.7311032200559998`*^9, 3.7311032228016*^9}, {3.7311064817418003`*^9, 3.7311065164734*^9}, { 3.731106586704*^9, 3.7311066293644*^9}, {3.7311067226996*^9, 3.7311067688378*^9}, 3.7311068140692*^9, {3.7311070695868*^9, 3.7311071611466*^9}, {3.7311071982846003`*^9, 3.7311072027462*^9}, { 3.731147839255*^9, 3.7311482671744003`*^9}, {3.7311483005352*^9, 3.731148489242*^9}, {3.7311485599561996`*^9, 3.7311485647942*^9}, 3.7311487044997997`*^9, 3.7311488359006*^9, {3.7311488871424*^9, 3.731148901959*^9}, {3.7311489709914*^9, 3.7311489916354*^9}, { 3.7311490935078*^9, 3.7311491563164*^9}, {3.7311491974746*^9, 3.7311492280506*^9}, {3.7311493247216*^9, 3.7311493418698*^9}, 3.7311493847198*^9, 3.7311494727688*^9, {3.7311495263213997`*^9, 3.731149589682*^9}, {3.7311497088964*^9, 3.7311497593938*^9}, { 3.7311498525612*^9, 3.7311498668968*^9}, {3.731149908384*^9, 3.731149940241*^9}, 3.7311500198564*^9, {3.7311500521774*^9, 3.7311500669912*^9}, {3.7311501537106*^9, 3.73115018159*^9}, { 3.7311502274632*^9, 3.7311502576261997`*^9}, {3.7311503743092003`*^9, 3.7311503894952*^9}, {3.7311504529782*^9, 3.7311504580671997`*^9}, { 3.7311504988512*^9, 3.7311506468356*^9}, {3.7311507386521997`*^9, 3.7311508071878*^9}, {3.731150844767*^9, 3.7311513001244*^9}, { 3.7311513330313997`*^9, 3.7311514635643997`*^9}, {3.7311515212578*^9, 3.7311515488534*^9}, {3.7311517390446*^9, 3.7311520067778*^9}, { 3.7311520468845997`*^9, 3.731152223538*^9}, {3.7311522910048*^9, 3.7311526262757998`*^9}, {3.7311526613122*^9, 3.7311526734184*^9}, { 3.7311527757356*^9, 3.7311528081542*^9}, {3.7311528419638*^9, 3.73115292465*^9}, {3.7311529554646*^9, 3.7311530397338*^9}, { 3.731153080844*^9, 3.731153081*^9}, {3.73115325234*^9, 3.7311534239323997`*^9}, {3.7311537065114*^9, 3.731153729933*^9}, 3.7311538376202*^9, {3.7311936644962*^9, 3.7311936684132*^9}, { 3.7312427500182*^9, 3.7312427655836*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Abajo, la animaci\[OAcute]n:", "Subchapter", CellChangeTimes->{{3.7311017159926*^9, 3.7311017198450003`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Ncuadros", " ", "=", " ", "100"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[CapitalDelta]", " ", "=", " ", RowBox[{"T", "/", "Ncuadros"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{ "Paso", " ", "temporal", " ", "entre", " ", "configuraciones", " ", RowBox[{"sucesivas", ".", " ", "Habr\[AAcute]"}]}], ",", " ", RowBox[{"en", " ", "principio"}], ",", " ", RowBox[{"Ncuadros", " ", "gr\[AAcute]ficos", " ", "distintos"}], ",", " ", RowBox[{ RowBox[{"desde", " ", "t"}], " ", "=", " ", RowBox[{ RowBox[{"0", " ", "hasta", " ", "t"}], " ", "=", " ", RowBox[{"T", " ", "-", " ", "\[CapitalDelta]"}]}]}], ",", " ", RowBox[{"a", " ", "intervalos", " ", "de", " ", RowBox[{"\[CapitalDelta]", "."}]}]}], "*)"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", " ", RowBox[{"(*", " ", RowBox[{ "La", " ", "variable", " ", "\"\\"", " ", "se", " ", "controla", " ", "mediante", " ", "este", " ", RowBox[{"Manipulate", "."}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", " ", "=", " ", RowBox[{"Y", "[", "t", "]"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"g", " ", "=", " ", RowBox[{"Phi", "[", "t", "]"}]}], ";", " ", RowBox[{"(*", " ", RowBox[{ "Eval\[UAcute]o", " ", "las", " ", "soluciones", " ", "num\[EAcute]ricas", " ", "en", " ", RowBox[{"t", "."}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"ejes", " ", "=", " ", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"AbsoluteThickness", "[", "2", "]"}], ",", " ", "White", ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", " ", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"2", ",", " ", "0"}], "}"}]}], "}"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", " ", RowBox[{"-", "2"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"0", ",", "2"}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}]}], ";", " ", RowBox[{"(*", "ejes", "*)"}], "\[IndentingNewLine]", RowBox[{"orb", " ", "=", " ", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Y", "[", "\[Tau]", "]"}], "+", RowBox[{"Sin", "[", RowBox[{"Phi", "[", "\[Tau]", "]"}], "]"}]}], ",", " ", RowBox[{"-", RowBox[{"Cos", "[", RowBox[{"Phi", "[", "\[Tau]", "]"}], "]"}]}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"\[Tau]", ",", " ", "0", ",", " ", "T"}], "}"}], ",", " ", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Dotted", ",", "Orange"}], "}"}]}]}], "]"}]}], ";", " ", RowBox[{"(*", RowBox[{"\[OAcute]rbita", " ", "de", " ", "la", " ", "masa", " ", SubscriptBox["m", "2"]}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Show", "[", "\[IndentingNewLine]", RowBox[{ "ejes", ",", "\[IndentingNewLine]", "orb", ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"AbsoluteThickness", "[", "2", "]"}], ",", " ", "Blue", ",", " ", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"f", ",", " ", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"f", " ", "+", " ", RowBox[{"Sin", "[", "g", "]"}]}], ",", " ", RowBox[{"-", RowBox[{"Cos", "[", "g", "]"}]}]}], "}"}]}], "}"}], "]"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Green", ",", " ", RowBox[{"Disk", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f", " ", "+", " ", RowBox[{"Sin", "[", "g", "]"}]}], ",", " ", RowBox[{"-", RowBox[{"Cos", "[", "g", "]"}]}]}], "}"}], ",", " ", "0.1"}], "]"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", " ", RowBox[{"Disk", "[", RowBox[{ RowBox[{"{", RowBox[{"f", ",", " ", "0"}], "}"}], ",", " ", "0.1"}], "]"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"AspectRatio", "\[Rule]", " ", "Automatic"}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", " ", RowBox[{"2", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", " ", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", " ", "1"}], "}"}]}], "}"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"Axes", "\[Rule]", " ", "False"}], ",", "\[IndentingNewLine]", RowBox[{"Ticks", "\[Rule]", " ", "False"}], ",", "\[IndentingNewLine]", RowBox[{"Background", "\[Rule]", " ", "Black"}], ",", "\[IndentingNewLine]", RowBox[{"ImageSize", "\[Rule]", " ", "600"}]}], "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"t", ",", " ", "0", ",", " ", RowBox[{"T", "-", "\[CapitalDelta]"}], ",", " ", "\[CapitalDelta]", ",", " ", RowBox[{"Appearance", "\[Rule]", " ", "\"\\""}]}], "}"}], ",", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{ "El", " ", "tiempo", " ", "m\[AAcute]ximo", " ", "llega", " ", "hasta", " ", "T"}], " ", "-", " ", "\[CapitalDelta]"}], ",", " ", RowBox[{ "porque", " ", "si", " ", "incluyera", " ", "T", " ", "la", " ", "animaci\[OAcute]n", " ", "repetir\[IAcute]a", " ", "el", " ", "primer", " ", "cuadro"}], ",", " ", RowBox[{ RowBox[{"ya", " ", "que", " ", "en", " ", "t"}], " ", "=", " ", RowBox[{ RowBox[{"0", " ", "y", " ", "t"}], " ", "=", " ", RowBox[{ "T", " ", "la", " ", "configuraci\[OAcute]n", " ", "es", " ", "la", " ", RowBox[{"misma", ".", " ", "El"}], " ", "paso", " ", "temporal", " ", "por", " ", "defecto", " ", "es", " ", RowBox[{"\[CapitalDelta]", "."}]}]}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"TrackedSymbols", "\[RuleDelayed]", " ", RowBox[{"{", "t", "}"}]}]}], " ", RowBox[{"(*", RowBox[{ "S\[OAcute]lo", " ", "recalcula", " ", "las", " ", "cosas", " ", "cuando", " ", "cambia", " ", RowBox[{"t", "."}]}], "*)"}], "\[IndentingNewLine]", "]"}]}], "Input", CellChangeTimes->CompressedData[" 1:eJxTTMoPSmViYGAQAWIQzR7/Rc3nzGtH//VTPEE0k7Z4Gog+luuRAaLvTb68 H0RfuhdyAET//dYpGg2k/1j56IFomZqftiDaQXilK4gOCZp8D0T/ilkIpt/V HH4MojMmngTTqZKv7jUA6WWVza9BdMjjrx9BtFDzmS8gmnurG3MzkL6T0cIH ov0uskqD6JoL8+VA9D/nrLQWkHsYzmWC6NXndQtBdMbmqBIQvc59ZmYr2N31 RSBaep5cSyvYnZXdILqjdVU/iBb3qJgHol+pvXw6E0gnLdz3EURveHjTfQ6Q /nLbOgVEu97IqQbR6VfbwXSZ/7UP64G0Us4dMA0A/364ZA== "]] }, Open ]] }, Open ]] }, WindowSize->{1440, 830}, WindowMargins->{{-8, Automatic}, {Automatic, -8}}, FrontEndVersion->"10.0 for Microsoft Windows (32-bit) (July 1, 2014)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 136, 3, 31, "Input"], Cell[CellGroupData[{ Cell[719, 27, 180, 2, 64, "Chapter"], Cell[CellGroupData[{ Cell[924, 33, 387, 7, 62, "Subchapter"], Cell[1314, 42, 2950, 66, 415, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[4301, 113, 433, 10, 159, "Subchapter"], Cell[4737, 125, 290, 5, 30, "Text"], Cell[CellGroupData[{ Cell[5052, 134, 679, 12, 184, "Section"], Cell[5734, 148, 20966, 454, 1446, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[26749, 608, 116, 1, 62, "Subchapter"], Cell[26868, 611, 7536, 185, 652, "Input"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)