기말과제

DUE: 12:00 of Jun. 17 (Wed)


This exam is taken home and 47 hours long in duration. You may use books, papers, class notes, or even internet. However, please work independently; you should not discuss with other people. Write programs using C language. Make sure to turn in your own source programs as well as a report in pdf form via email before the due date: there will be 10% grade deduction per hour for late submission.

1. (15 Points)

The function $J$ satisfies

(1)
\begin{align} x^2 {{d^2 J} \over {d x^2}} + x {{dJ} \over {dx}} + (x^2 -1)J = 0, \end{align}

with $dJ/dx = 0.5$ at $x = 0$.

  • ⒜ Let $J = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + \cdots$ for small $x$, and find the values of the coefficients $a_0 , \cdots , a_3$ that make Equation (1) regular at $x = 0$.
  • ⒝ Integrate Equation (1) from $x = 0$ to $20$, and plot the resulting $J$ as a function of $x$.
  • ⒞ Find the first three zeros of $J(x)$ (accurate within 5 significant figures).

2. (40 Points)

Consider a globular cluster whose density distribution at $t = 0$ is given by

(2)
\begin{align} \rho (r) = {{M} \over {4 \pi R}} {1 \over r^2}, \qquad r \le R, \end{align}

and $\rho (r) = 0$ for $r > R$, where $M$ and $R$ denote the mass and the radius of the cluster, respectively. For this problem, take the units of $G = M = R = 1$ (with $G$ being the gravitational constant). Assign a random velocity to each particle according to

for(i=0;i<N;i++){
    theta = acos(2.0*ran1 - 1.0 );
    phi = 2.0*M_PI*ran2;
    vx[i] = sin( theta ) * cos( phi );
    vy[i] = sin( theta ) * sin( phi );
    vz[i] = cos( theta );
}

where ran1 and ran2 are two independent uniform deviates.

  • ⒜ Realize the cluster at $t = 0$ by distributing $N = 10^3$ particles in the three-dimensional space. Assign the equal mass $(m_i = M/N )$ to each particle. Plot the particle distribution projected on the $x–y$ plane. Also plot the radial density profile obtained from the particle distribution and compare it with Equation (2).
  • ⒝ The kinetic energy $T$ and the gravitational potential energy $W$ are defined by
(3)
\begin{align} T = {1 \over 2} \sum_{i=1}^N m_i {\vec{v}_i}^2 , \qquad \mathrm{and} \qquad W = - {1 \over 2} \sum_{i=1}^N \sum_{j=1, \ne i}^N {{m_i m_j} \over { \left\lvert \vec{r}_i - \vec{r}_j \right\rvert }}, \end{align}
­
respectively. Calculate the values of $T$ and $W$ from the particle distribution in Part (a).
  • ⒞ The gravitational force (per unit mass) on the $i$-th particle is
(4)
\begin{align} \vec{F}_i = - \sum_{j \ne i} {{m_j (\vec{r}_i - \vec{r}_j)} \over { \left\lvert \vec{r}_i - \vec{r}_j \right\rvert }^3 }. \end{align}
­
Take the timestep of dt=0.01, and evolve the cluster constructed above up to $t = 10$ based on the Leap-frog algorithm. Plot the temporal changes of $W , K$, and the total energy $E = W + K$ in a single figure. Plot the radial density profile obtained from the particle distribution at $t = 10$.
  • ⒟ Repeat the calculation by taking dt=0.1/sqrt(fmax), where fmax is the maximum value of $F_i$ in Equation (4) at given $t$. Compare the results with those in Part (c).

3. (30 Points)

For a given set of data $(x_i , y_i )$ with $i = 1, \cdots , N$, the least-square minimizes the errors defined by

(5)
\begin{align} \chi^2 = \sum_i^N \left[ {{y_i - y(x_i ; a_1, \cdots , a_M )} \over {\sigma_i}} \right]^2 \end{align}

where $y$ is a fitting function with M parameters $a_1 , \cdots , a_M$.

  • ⒜ The file final-p3.txt in the class web page (http://astro.snu.ac.kr/~wkim/Comp2015/) contains three-column data: the first two columns give $(x_i , y_i)$, while the last column is $\sigma_y$ representing the error in $y$. These data can be fitted by a quadratic function $y = a_1 + a_2 x + a_3 x^2$. Use the mpfit package to find the best-fit parameters $a_1 , a_2$, and $a_3$. Make sure that your fit is reasonable by drawing your fitting curve over the data points with errorbars.
  • ⒝ For the same data, now use Powell’s method to find $a_1 , a_2$ , and $a_3$ that minimize $\chi^2$, and compare the results with those of Part ⒜.

4. (15 Points)

The file final-p4.txt in the class web page gives the monthly variation of sea surface temperature $T$ in a region near the Pacific ocean from 1950 to 2010: the first and second columns give year and month, respectively, while the third column lists $T$. For this problem only, you may use IDL.

  • ⒜ Plot $T$ and a function of $t$ elapsed from January 1950. Is there any trend with $t$ in the temperature?
  • ⒝ Perform fft of the data, and plot its power spectrum. Find the period of the most prominent cycle of $T$. Give physical interpretation of this period.
  • ⒞ What are the periods of the two next most prominent cycles of $T$?