Central Forces: Spring-2025
HW 02 2025 (SOLUTION): Due W1 D5: Math Bits

  1. Properties of Legendre Polynomials S1 5246S
    1. Use technology such as Mathematica or Maple or Python to find the first 5 Legendre polynomials. This question is simply asking you to find the command in your preferred computer algebra system and learn the syntax to call the polynomials.

      The Mathematica code for the Legendre polynomial of degree \(\ell\) as a function of \(z\) is: \(LegendreP[\ell,z]\). Using Mathematica and this command, I can generate the following Legendre polynomials: \begin{align*} P_0(z)&=1\\ P_1(z)&=z\\ P_2(z)&=\frac{1}{2}\left(3z^2-1\right)\\ P_3(z)&=\frac{1}{2}\left(5z^3-3z\right)\\ P_4(z)&=\frac{1}{8}\left(35z^4-30z^2+3\right) \end{align*}

    2. Use Rodrigues' formula to calculate the first 5 Legendre polynomials. (You may use computer technology like Mathematica or Maple or Python to help with the derivatives. This question is asking you to find Rodrigues' formula (Googling it is fine) and learn how to use it to generate the Legendre polynomials. It is pretty straightforward to do this part by hand, but, if you use technology to help with messy derivatives, make sure to explain what you are doing.)

      Rodrigues' formula is: \[P_{\ell}(z)=\frac{1}{2^{\ell}\ell!} \frac{d^{\ell}}{dz^{\ell}}\left(z^2-1\right)^{\ell}\] I can use this formula straightforwardly to generate the same Legendre polynomials as above. It's just lots of derivatives and the chain rule. (You should show some details.)

  2. Legendre Polynomial Series for the Sine Function S1 5246S

    Use your favorite technology tool (e.g. Maple, Mathematica, Matlab, Python, pencil) to generate the Legendre polynomial expansion to the function \(f(z)=\sin(\pi z)\). How many terms do you need to include in a partial sum to get a “good” approximation to \(f(z)\) for \(-1<z<1\)? What do you mean by a “good” approximation? How about the interval \(-2<z<2\)? How good is your approximation? Discuss your answers. Answer the same set of questions for the function \(g(z)=\sin(3\pi z)\)

    The function \(\sin(\pi\, z)\) is an odd function, therefore we only expect to get contributions from Legendre polynomials with odd values of \(\ell\). For \(\ell=1\), we will get a straight line approximation to the sine function, surely not good enough. For \(\ell=3\) we see that we are already getting the right number of peaks for the range \(-1<z<1\), but the peaks are shifted and not quite the right shape. For \(\ell=5\), we are already getting a reasonably good fit, depending on our needs. As always, we need to say “a good fit compared to what?”. Notice, however, that outside the range of \(-1<z<1\), the fit gets worse and worse as we add more terms. See for example, this graph for \(\ell=19\). This behavior is expected. Series of orthogonal polynomials each have a specified region of convergence. For Legendre polynomials, the region of convergence is \(-1<z<1\).

    The Legendre Series approximation for the function \(\sin(\pi z)\) terminating at \(\ell=3\) (left) and \(\ell=5\) (right).
    The Legendre Series approximation for the function \(\sin(\pi z)\) terminating at \(\ell=19\).

    For the function \(\sin(3\pi\, z)\), terminating the series at \(\ell=3\) is a terrible fit. It doesn't even have enough terms to fit the correct number of peaks. Remember that the Legendre polynomials are polynomials, so terminating the series at \(\ell=3\) gives you only two peaks. For \(\ell=7\), we are at least getting the correct number of peaks. And for \(\ell=13\), we are finally getting the same kind of fit that we got in the previous example for \(\ell=5\).

    The Legendre Series approximation for the function \(\sin(3\pi z)\) terminating at \(\ell=3\) (left) and \(\ell=7\) (right).
    The Legendre Series approximation for the function \(\sin(3\pi z)\) terminating at \(\ell=13\).

  3. Laplace's Equation in Polar Coordinates S1 5246S
    1. Write down Laplace's equation in two dimensions in polar coordinates.

      \begin{align*} \nabla^2 f &= 0 \\ \vec{\nabla}\cdot\vec{\nabla} f&=0\\ \frac{\partial^2 f}{\partial r^2}+\frac{1}{r}\frac{\partial f}{\partial r}+\frac{1}{r^2}\frac{\partial ^2 f}{\partial \phi^2} &= 0 \end{align*}

    2. Use the separation of variables procedure to separate this partial differential equation into two ordinary differential equations.

      To separate the equation, first write the solution as a product of functions, one for each variable. \begin{align*} f(r,\phi)=R(r)\Phi(\phi) \end{align*}

      Plug this ansatz into the differential equation:

      \begin{align*} \frac{\partial^2 R}{\partial r^2}\Phi+\frac{1}{r}\frac{\partial R}{\partial r}\Phi+\frac{1}{r^2}R\frac{\partial ^2 \Phi}{\partial \phi^2}=0 \end{align*} Divide by \(f\) in the form of \(f=R\Phi\): \begin{align*} \frac{1}{R}\frac{\partial^2 R}{\partial r^2}+\frac{1}{r}\frac{1}{R}\frac{\partial R}{\partial r}+\frac{1}{r^2}\frac{1}{\Phi}\frac{\partial ^2 \Phi}{\partial \phi^2}=0 \end{align*} And then multiply through by \(r^2\) and put all of the \(r\) dependence on one side of the equation and all the \(\phi\) dependence on the other side of the equation. \begin{align*} r^2\,\frac{1}{R}\frac{\partial^2 R}{\partial r^2}+r\,\frac{1}{R}\frac{\partial R}{\partial r}=-\frac{1}{\Phi}\frac{\partial ^2 \Phi}{\partial \phi^2}\\ \end{align*} Utter the magic words: "Since the left-hand side of the equation could depend on \(r\), but the right-hand side does not, if we change \(r\) by a little bit, the right-hand side of the equation remains constant. Therefore, the particular combination of \(r\) dependences on the left-hand side of the equation must also be constant. Ditto for the \(\phi\) dependence with the role of left- and right-hand sides of the equation reversed. We can therefore set both sides of the equation equal to the SAME constant \(A\)." \begin{align*} D&=r^2\,\frac{1}{R}\frac{\partial^2 R}{\partial r^2}+r\,\frac{1}{R}\frac{\partial R}{\partial r}\\ D&=-\frac{1}{\Phi}\frac{\partial ^2 \Phi}{\partial \phi^2}\\ &\Rightarrow\\ DR&=r^2\,\frac{\partial^2 R}{\partial r^2}+r\,\frac{\partial R}{\partial r}\\ D\Phi&=-\frac{\partial ^2 \Phi}{\partial \phi^2}\\ \end{align*}

    3. Write down a complete set of eigenstates of the \(\phi\) equation. Justify your answer. You do not NEED to calculate anything here, but if you quote some answer that you already know, say how/where you know the answer. DO NOT TRY TO SOLVE THE \(r\) EQUATION!

      This is a second order differential equation, so we expect two solutions: \begin{align*} \Phi(\phi)&=A\cos D\phi+B\sin D\phi\\ \text{or}&\\ \Phi(\phi)&=C_1\exp (iD\phi)+C_2\exp (-iD\phi)\\ \end{align*} To make these solutions satisfy periodic boundary conditions \(\Phi(\phi+2\pi)=\phi(\phi)\), we must have \(D=\left\{0, \pm 1, \pm 2, \pm 3, \dots\right\}\).

  4. Confidence Rating S1 5246S After solving each problem on the assignment, indicate your answers to the following questions for each problem. Answer for the problem as a whole, even if the problem has multiple parts.
    1. Question Confidence How confident are you that you are interpreting the problem the way the instructor intends?

      For the rest of the questions, assume you have interpreted the problem correctly
    2. Problem Confidence How confident are you that you could independentl come up with a correct solution process to a similar problem on a future problem set?
    3. Answer Confidence How confident are you that your final answer to this question is correct (not solution process)?
    4. Makes Sense To what degree do you understand how your answer fits (or does not fit) the physical or mathematical situation of the problem?