3469 - Assignment 2 solution Question 1 — Shooting method

advertisement
3469 - Assignment 2 solution
Mike Peardon (mjp@maths.tcd.ie)
Michaelmas Term 2015-16
Question 1 — Shooting method
There are 11 solutions to the second-order ODE given by
d2 x
2
= −x3 te−x /2 with x(0) = 0, x(10) = 1.
2
dt
(1)
The values of ẋ(0) that give these solutions are specified in Table 1 and all 11 solutions are plotted
in Fig. 1.
5
4
3
2
x(t)
1
0
1
2
3
4
5
6
7
8
9
10
-1
-2
-3
-4
-5
t
Figure 1: The 11 solutions to the ODE specified in Eqn. 1
Table 1: The 11 values for ẋ(0) for the solutions to Eqn. 1, k = 1, 2, . . . 11 (checked to 7sf)
k
1
2
3
4
5
6
ẋk (0)
k
-2.037797 7
-2.033002 8
-2.017598 9
-1.996646 10
-1.829865 11
-1.265691
1
ẋk (0)
1.919303
1.981126
2.022206
2.031362
2.038403
Question 2 — Planets
The trajectories of the four planets are shown in Fig. 2 For 3sf precision, about 10,000 leap-frog
1
Planet 0
Planet 1
Planet 2
Planet 3
0.5
0
-0.5
-1
-1
-0.5
0
0.5
1
Figure 2: The trajectories of the four planets
Table 2: The locations of the four planets at t = 3 (to 3sf)
Planet
0
1
2
3
Position
x0
x1
-0.309 -0.353
-0.318 -0.525
0.0360 0.907
0.102 0.859
steps are needed.
2
Download