(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 113232, 1857]*) (*NotebookOutlinePosition[ 113986, 1883]*) (* CellTagsIndexPosition[ 113942, 1879]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Planetary Motion in the Sitnikov system", "Section"], Cell["\<\ Differential equation with eccentricity parameter ecc and initial phase \ phi0\ \>", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ SuperscriptBox["z", "\[DoublePrime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", \(\(-z[ t]\)/\((\ \ \((1\ + \ ecc*Cos[t + phi0])\)^2/4 + z[t]^2\ \ )\)^\((3/2)\)\)}]], "Input", AspectRatioFixed->True], Cell[BoxData[ RowBox[{ RowBox[{ SuperscriptBox["z", "\[Prime]\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", \(-\(z[ t]\/\((1\/4\ \((1 + ecc\ Cos[phi0 + t])\)\^2 + \ z[t]\^2)\)\^\(3/2\)\)\)}]], "Output"] }, Open ]], Cell["System of differential equations", "Subsection"], Cell[BoxData[{ RowBox[{"equationz", ":=", RowBox[{ RowBox[{ SuperscriptBox["z", "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", \(zdot[t]\)}]}], "\n", RowBox[{"equationzdot", ":=", RowBox[{ RowBox[{ SuperscriptBox["zdot", "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "==", \(\(-z[ t]\)/\((\ \ \((1\ + \ ecc*Cos[t + phi0])\)^2/4 + z[t]^2\ \ )\)^\((3/2)\)\)}]}]}], "Input", AspectRatioFixed->True], Cell["\<\ Time parameters: length of year for orbiting stars, number of years to \ follow time evolution, number of positions to save during each year\ \>", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[{ \(year = 2\ Pi\), "\[IndentingNewLine]", \(Nyears\ = \ 10\), "\[IndentingNewLine]", \(Nsave = 10\)}], "Input", AspectRatioFixed->True], Cell[BoxData[ \(2\ \[Pi]\)], "Output"], Cell[BoxData[ \(10\)], "Output"], Cell[BoxData[ \(10\)], "Output"] }, Open ]], Cell["Initial conditions and value of eccentricity", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(ecc = 0;\)\), "\[IndentingNewLine]", \(\(zstart = \ 0. ;\)\), "\[IndentingNewLine]", \(zdotstart\ = 1. \), "\[IndentingNewLine]", \(phi0 = 0. \)}], "Input"], Cell[BoxData[ \(1.`\)], "Output"], Cell[BoxData[ \(0.`\)], "Output"] }, Open ]], Cell["\<\ Solve the system of differential equations numerically, saving the position z(t) of the planet Nsave times during each year and keeping track of the time of each crossing of the orbital plane of the \ stars. Plot the position of the planet as a function of time\ \>", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(positionlist\ = \ {{0. , 0. }};\)\), "\[IndentingNewLine]", \(\(crossings\ = \ {0. };\)\), "\[IndentingNewLine]", \(\(t0 = 0. ;\)\), "\[IndentingNewLine]", \(Do[\[IndentingNewLine]initialz = z[t0] \[Equal] zstart; \n initialzdot = zdot[t0] \[Equal] zdotstart; \n ndssol = NDSolve[{equationz, equationzdot, initialz, initialzdot}, {z[t], zdot[t]}, {t, t0, t0 + year}]; \[IndentingNewLine]position[t_] = z[t] /. ndssol\[LeftDoubleBracket]1\[RightDoubleBracket]; \ \[IndentingNewLine]velocity[t_] = zdot[t] /. ndssol\[LeftDoubleBracket]1\[RightDoubleBracket]; \ \[IndentingNewLine]told = t0; \[IndentingNewLine]zold = zstart; \n Do[tnew = told + year/Nsave; \[IndentingNewLine]znew\ = \ position[tnew]; \[IndentingNewLine]positionlist\ = \ Append[positionlist, {tnew/year, \ znew}]; \[IndentingNewLine]If[ zold*znew < 0, crossings\ = \ Append[crossings, \((znew*told - zold*tnew)\)/\((znew - zold)\)]]; \[IndentingNewLine]told = tnew; \[IndentingNewLine]zold = znew, \[IndentingNewLine]{m, 1, Nsave}]; \[IndentingNewLine]zstart\ = position[t0 + year]; \[IndentingNewLine]zdotstart = velocity[t0 + year]; \n t0 = t0 + year, \[IndentingNewLine]{n, 1, Nyears}]\), "\[IndentingNewLine]", \(ListPlot[positionlist, PlotRange \[Rule] Automatic, AxesLabel \[Rule] {"\", "\"}, PlotJoined \[Rule] True]\)}], "Input", AspectRatioFixed->True], Cell[BoxData[ RowBox[{\(General::"spell1"\), \(\(:\)\(\ \)\), "\<\"Possible spelling \ error: new symbol name \\\"\\!\\(position\\)\\\" is similar to existing \ symbol \\\"\\!\\(Position\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ ButtonData:>\\\"General::spell1\\\"]\\)\"\>"}]], "Message"], Cell[BoxData[ RowBox[{\(General::"spell1"\), \(\(:\)\(\ \)\), "\<\"Possible spelling \ error: new symbol name \\\"\\!\\(zold\\)\\\" is similar to existing symbol \\\ \"\\!\\(told\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ ButtonData:>\\\"General::spell1\\\"]\\)\"\>"}]], "Message"], Cell[BoxData[ RowBox[{\(General::"spell1"\), \(\(:\)\(\ \)\), "\<\"Possible spelling \ error: new symbol name \\\"\\!\\(zstart\\)\\\" is similar to existing symbol \ \\\"\\!\\(zstart\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ ButtonData:>\\\"General::spell1\\\"]\\)\"\>"}]], "Message"], Cell[BoxData[ RowBox[{\(General::"stop"\), \(\(:\)\(\ \)\), "\<\"Further output of \ \\!\\(General :: \\\"spell1\\\"\\) will be suppressed during this \ calculation. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ ButtonData:>\\\"General::stop\\\"]\\)\"\>"}]], "Message"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0952381 0.309041 0.667609 [ [.21429 .29654 -3 -9 ] [.21429 .29654 3 0 ] [.40476 .29654 -3 -9 ] [.40476 .29654 3 0 ] [.59524 .29654 -3 -9 ] [.59524 .29654 3 0 ] [.78571 .29654 -3 -9 ] [.78571 .29654 3 0 ] [.97619 .29654 -6 -9 ] [.97619 .29654 6 0 ] [1.025 .30904 0 -6 ] [1.025 .30904 34 6 ] [.01131 .042 -24 -4.5 ] [.01131 .042 0 4.5 ] [.01131 .17552 -24 -4.5 ] [.01131 .17552 0 4.5 ] [.01131 .44256 -18 -4.5 ] [.01131 .44256 0 4.5 ] [.01131 .57608 -18 -4.5 ] [.01131 .57608 0 4.5 ] [.02381 .64303 -5 0 ] [.02381 .64303 5 12 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 .30904 m .21429 .31529 L s [(2)] .21429 .29654 0 1 Mshowa .40476 .30904 m .40476 .31529 L s [(4)] .40476 .29654 0 1 Mshowa .59524 .30904 m .59524 .31529 L s [(6)] .59524 .29654 0 1 Mshowa .78571 .30904 m .78571 .31529 L s [(8)] .78571 .29654 0 1 Mshowa .97619 .30904 m .97619 .31529 L s [(10)] .97619 .29654 0 1 Mshowa .125 Mabswid .07143 .30904 m .07143 .31279 L s .11905 .30904 m .11905 .31279 L s .16667 .30904 m .16667 .31279 L s .2619 .30904 m .2619 .31279 L s .30952 .30904 m .30952 .31279 L s .35714 .30904 m .35714 .31279 L s .45238 .30904 m .45238 .31279 L s .5 .30904 m .5 .31279 L s .54762 .30904 m .54762 .31279 L s .64286 .30904 m .64286 .31279 L s .69048 .30904 m .69048 .31279 L s .7381 .30904 m .7381 .31279 L s .83333 .30904 m .83333 .31279 L s .88095 .30904 m .88095 .31279 L s .92857 .30904 m .92857 .31279 L s .25 Mabswid 0 .30904 m 1 .30904 L s gsave 1.025 .30904 -61 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (years) show 93.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .02381 .042 m .03006 .042 L s [(-0.4)] .01131 .042 1 0 Mshowa .02381 .17552 m .03006 .17552 L s [(-0.2)] .01131 .17552 1 0 Mshowa .02381 .44256 m .03006 .44256 L s [(0.2)] .01131 .44256 1 0 Mshowa .02381 .57608 m .03006 .57608 L s [(0.4)] .01131 .57608 1 0 Mshowa .125 Mabswid .02381 .07538 m .02756 .07538 L s .02381 .10876 m .02756 .10876 L s .02381 .14214 m .02756 .14214 L s .02381 .2089 m .02756 .2089 L s .02381 .24228 m .02756 .24228 L s .02381 .27566 m .02756 .27566 L s .02381 .34242 m .02756 .34242 L s .02381 .3758 m .02756 .3758 L s .02381 .40918 m .02756 .40918 L s .02381 .47594 m .02756 .47594 L s .02381 .50932 m .02756 .50932 L s .02381 .5427 m .02756 .5427 L s .02381 .00862 m .02756 .00862 L s .02381 .60946 m .02756 .60946 L s .25 Mabswid .02381 0 m .02381 .61803 L s gsave .02381 .64303 -66 -4 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (z) show 69.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .30904 m .03333 .59242 L .04286 .48766 L .05238 .11476 L .0619 .03119 L .07143 .33135 L .08095 .59682 L .09048 .47091 L .1 .10022 L .10952 .03784 L .11905 .35346 L .12857 .6001 L .1381 .4531 L .14762 .08682 L .15714 .04563 L .16667 .37518 L .17619 .60227 L .18571 .43429 L .19524 .07457 L .20476 .05457 L .21429 .39634 L .22381 .60332 L .23333 .41456 L .24286 .06347 L .25238 .06465 L .2619 .4168 L .27143 .60326 L .28095 .39402 L .29048 .05352 L .3 .07588 L .30952 .43643 L .31905 .60208 L .32857 .37278 L .3381 .04471 L .34762 .08826 L .35714 .45513 L .36667 .59979 L .37619 .35101 L .38571 .03705 L .39524 .10178 L .40476 .47283 L .41429 .59639 L .42381 .32887 L .43333 .03052 L .44286 .11645 L .45238 .48946 L .4619 .59186 L .47143 .30655 L .48095 .02512 L .49048 .13223 L Mistroke .5 .505 L .50952 .58621 L .51905 .28426 L .52857 .02084 L .5381 .14911 L .54762 .51941 L .55714 .57943 L .56667 .26218 L .57619 .01768 L .58571 .16703 L .59524 .53268 L .60476 .57151 L .61429 .24052 L .62381 .01564 L .63333 .18595 L .64286 .54481 L .65238 .56245 L .6619 .21942 L .67143 .01472 L .68095 .20577 L .69048 .55578 L .7 .55224 L .70952 .19905 L .71905 .0149 L .72857 .2264 L .7381 .5656 L .74762 .54088 L .75714 .17952 L .76667 .0162 L .77619 .2477 L .78571 .57428 L .79524 .52838 L .80476 .16093 L .81429 .01861 L .82381 .26953 L .83333 .58182 L .84286 .51472 L .85238 .14335 L .8619 .02214 L .87143 .2917 L .88095 .58822 L .89048 .49993 L .9 .12683 L .90952 .02679 L .91905 .31402 L .92857 .5935 L .9381 .48402 L .94762 .11142 L .95714 .03257 L .96667 .3363 L Mistroke .97619 .59765 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{35, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-1.24681, -0.528131, \ 0.0464797, 0.00663059}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Open ]], Cell["\<\ List the time intervals between crossings of the plane of the stars\ \>", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[{ \(crossings\), "\[IndentingNewLine]", \(crossingintervals = Delete[crossings, 1] - Delete[crossings, \(-1\)]\)}], "Input"], Cell[BoxData[ \({0.`, 1.5576027977586375`, 3.094899964635518`, 4.6725945435588505`, 6.19476581018252`, 7.786938849447987`, 9.298679863670989`, 10.900183928736338`, 12.405875793832244`, 14.011848101041068`, 15.515695706865595`, 17.121405627832562`, 18.627561014955447`, 20.228270239758245`, 21.740951402757208`, 23.33177324456672`, 24.855389405139338`, 26.431134305510508`, 27.97042600051433`, 29.52549057854549`, 31.085628758286997`, 32.62099466569598`, 34.200569569385294`, 35.721353009156566`, 37.31481373854742`, 38.82566783657945`, 40.427906733150856`, 41.93318663585603`, 43.53936279058572`, 45.04326169893833`, 46.648650327488255`, 48.15532171254818`, 49.755174981241375`, 51.26885201909709`, 52.85825741005672`, 54.38337846325499`, 55.95710194175758`, 57.498454916912316`, 59.05105156685036`, 60.613649882533906`, 62.147147342316956`}\)], "Output"], Cell[BoxData[ \({1.5576027977586375`, 1.5372971668768804`, 1.5776945789233325`, 1.522171266623669`, 1.5921730392654672`, 1.511741014223002`, 1.601504065065349`, 1.5056918650959066`, 1.6059723072088232`, 1.503847605824527`, 1.6057099209669676`, 1.5061553871228845`, 1.6007092248027988`, 1.5126811629989625`, 1.590821841809511`, 1.5236161605726188`, 1.5757449003711699`, 1.539291695003822`, 1.5550645780311605`, 1.5601381797415073`, 1.535365907408984`, 1.5795749036893127`, 1.5207834397712716`, 1.5934607293908556`, 1.510854098032027`, 1.6022388965714072`, 1.5052799027051762`, 1.6061761547296882`, 1.5038989083526104`, 1.6053886285499246`, 1.5066713850599243`, 1.5998532686931952`, 1.5136770378557145`, 1.5894053909596337`, 1.5251210531982693`, 1.5737234785025862`, 1.5413529751547372`, 1.552596649938046`, 1.5625983156835446`, 1.5334974597830495`}\)], "Output"] }, Open ]], Cell["Find the escape velocity (zdotstart) for ecc = 0", "Subsection"] }, FrontEndVersion->"5.2 for Macintosh", ScreenRectangle->{{0, 1280}, {0, 934}}, CellGrouping->Manual, WindowSize->{1058, 825}, WindowMargins->{{Automatic, 45}, {-33, Automatic}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, StyleDefinitions -> "NaturalColor.nb" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 58, 0, 66, "Section"], Cell[1837, 55, 108, 3, 40, "Subsection"], Cell[CellGroupData[{ Cell[1970, 62, 309, 8, 39, "Input"], Cell[2282, 72, 270, 7, 61, "Output"] }, Open ]], Cell[2567, 82, 54, 0, 40, "Subsection"], Cell[2624, 84, 559, 15, 59, "Input"], Cell[3186, 101, 171, 4, 58, "Subsection"], Cell[CellGroupData[{ Cell[3382, 109, 166, 4, 79, "Input"], Cell[3551, 115, 42, 1, 36, "Output"], Cell[3596, 118, 36, 1, 36, "Output"], Cell[3635, 121, 36, 1, 36, "Output"] }, Open ]], Cell[3686, 125, 66, 0, 40, "Subsection"], Cell[CellGroupData[{ Cell[3777, 129, 195, 4, 99, "Input"], Cell[3975, 135, 37, 1, 36, "Output"], Cell[4015, 138, 37, 1, 36, "Output"] }, Open ]], Cell[4067, 142, 292, 6, 94, "Subsection"], Cell[CellGroupData[{ Cell[4384, 152, 1608, 30, 499, "Input"], Cell[5995, 184, 364, 5, 23, "Message"], Cell[6362, 191, 356, 5, 23, "Message"], Cell[6721, 198, 359, 5, 23, "Message"], Cell[7083, 205, 333, 5, 23, "Message"], Cell[7419, 212, 103377, 1590, 194, 6986, 395, "GraphicsData", "PostScript", \ "Graphics"], Cell[110799, 1804, 130, 3, 36, "Output"] }, Open ]] }, Open ]], Cell[110956, 1811, 97, 2, 40, "Subsection"], Cell[CellGroupData[{ Cell[111078, 1817, 153, 3, 59, "Input"], Cell[111234, 1822, 950, 14, 68, "Output"], Cell[112187, 1838, 956, 14, 68, "Output"] }, Open ]], Cell[113158, 1855, 70, 0, 40, "Subsection"] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)