The mysterious Integrating factor

When I tell my friends that all the fuss about integrating factors basically comes down to this  they don’t believe me! Sure, you can arrive at the same result in so many different ways but, this,my dear friends is the essence of it.

EDIT:  There is a mistake in the sign for C_{1} on the fourth image.

A note on what makes solutions discretized?

When one stumbles upon the words ‘Discretized solution’, one is inclined to think of Quantum Mechanics. In quantum mechanics, the following are fundamentally discrete:

  • Electric charge
  • Weak hypercharge
  • Colour charge
  • Baryon number
  • Lepton number
  • Spin

BUT not energy. One only finds discrete spectra in bound states or where there are boundary conditions.

Discrete spectra and Boundary conditions

Consider a string that is clamped at x = 0 and x= L undergoing traverse vibrations. And you would like to know the motion of the string.

image

Maybe you know a priori that the solutions are sinusoids but you have no information on its wave number.

So you start trying out every single possibility of the wave number.

image

The important thing to understand here is that If there weren’t any boundary conditions that was imposed on the string then all possible sinusoidal wave would be a solution to the problem.

But the existence of a boundary condition ruins it.

image

This is the case with energy as well.

If
you have an electron in a hydrogen atom, there are only specific energy
levels it can be observed to occupy when its energy is measured.

But
if the electron is unbound because its energy exceeds the ionization
energy of the atom, then it’s in a scattering state and its energy and
angular momentum have continuous spectra.

image

       The solution of the Schrodinger equation for the hydrogen atom


Sources and more:

Solution to the wave equation by method of separation of variables

Brain Bi’s answer to ‘What quantities are always quantized?

Mathematical Methods for Physicists( Chapter – 8), George B. Arfken, Hans J. Weber, Frank E. Harris

Energy is a continuous analytic function

Solving the Laplacian in Spherical Coordinates (#1)

In this post, let’s derive a general solution for the Laplacian in Spherical Coordinates. In future posts, we shall look at the application of this equation in the context of Fluids and Quantum Mechanics.

sph_coor

x = rsin\theta cos\phi
y = rsin\theta cos\phi
z = rcos\theta

where

0 \leq r < \infty
0 \leq \theta \leq \pi
0 \leq \phi < 2\pi

The Laplacian in Spherical coordinates in its ultimate glory is written as follows:

\nabla ^{2}f ={\frac {1}{r^{2}}}{\frac {\partial }{\partial r}}\left(r^{2}{\frac {\partial f}{\partial r}}\right)+{\frac {1}{r^{2}\sin \theta }}{\frac {\partial }{\partial \theta }}\left(\sin \theta {\frac {\partial f}{\partial \theta }}\right)+{\frac {1}{r^{2}\sin ^{2}\theta }}{\frac {\partial ^{2}f}{\partial \phi ^{2}}} = 0

To solve it we use the method of separation of variables.

f = R(r)\Theta(\theta)\Phi(\phi)

Plugging in the value of f into the Laplacian, we get that :

\frac{\Theta \Phi}{r^2} \frac{d}{dr} \left( r^2\frac{dR}{dr} \right) + \frac{R \Phi}{r^2 sin \theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{d\theta} \right) + \frac{\Theta R}{r^2 sin^2 \theta} \frac{d^2 \Phi}{d\phi^2} = 0

Dividing throughout by R\Theta\Phi and multiplying throughout by r^2, further simplifies into:

\underbrace{ \frac{1}{R} \frac{d}{dr} \left( r^2\frac{dR}{dr} \right)}_{h(r)} + \underbrace{\frac{1}{\Theta sin \theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{d\theta} \right) + \frac{1}{\Phi sin^2 \theta} \frac{d^2 \Phi}{d\phi^2}}_{g(\theta,\phi)} = 0

It can be observed that the first expression in the differential equation is merely a function of r and the remaining a function of \theta and \phi only. Therefore, we equate the first expression to be \lambda = l(l+1) and the second to be -\lambda = -l(l+1). The reason for choosing the peculiar value of l(l+1) is explained in another post.

\underbrace{ \frac{1}{R} \frac{d}{dr} \left( r^2\frac{dR}{dr} \right)}_{l(l+1)} + \underbrace{\frac{1}{\Theta sin \theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{d\theta} \right) + \frac{1}{\Phi sin^2 \theta} \frac{d^2 \Phi}{d\phi^2}}_{-l(l+1)} = 0 (1)

 

The first expression in (1) the Euler-Cauchy equation in r.

\frac{d}{dr} \left( r^2\frac{dR}{dr} \right) = l(l+1)R

The general solution of this has been in discussed in a previous post and it can be written as:

R(r) = C_1 r^l + \frac{C_2}{r^{l+1}}

 

The second expression in (1) takes the form as follows:

\frac{sin \theta}{\Theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ l(l+1)sin^2 \theta + \frac{1}{\Phi} \frac{d^2 \Phi}{d\phi^2} = 0

The following observation can be made similar to the previous analysis

\underbrace{\frac{sin \theta}{\Theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ l(l+1)sin^2 \theta }_{m^2} + \underbrace{\frac{1}{\Phi} \frac{d^2 \Phi}{d\phi^2}}_{-m^2} = 0 (2)

 

The first expression in the above equation (2) is the Associated Legendre Differential equation.

\frac{sin \theta}{\Theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ l(l+1)sin^2 \theta = m^2

sin \theta \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ \Theta \left( l(l+1)sin^2 \theta - m^2 \right) = 0

The general solution to this differential equation can be given as:
\Theta(\theta) = C_3 P_l^m(cos\theta) + C_4 Q_l^m(cos\theta)

 

The solution to the second term in the equation (2) is a trivial one:

\frac{d^2 \Phi}{d\phi^2} = m^2 \Phi
\Phi(\phi) = C_5 e^{im\phi} + C_6 e^{-im\phi}

 

Therefore the general solution to the Laplacian in Spherical coordinates is given by:

R\Theta\Phi = \left(C_1 r^l + \frac{C_2}{r^{l+1}} \right) \left(C_3 P_l^m(cos\theta) + C_4 Q_l^m(cos\theta \right) \left(C_5 e^{im\phi} + C_6 e^{-im\phi}\right)

fuckyeahphysica:

The simple harmonic oscillator

Anonymous asked: Please explain the intuition of solving the SHM equation.

Okay Anon! Here you go, this is my rendition.

The problem

You have a mass suspended on a spring. We want to know where the mass will be at any instant of time.

Describe the motion of the mass

image

The physical solution

Now before we get on to the math, let us first visualize the motion by attaching a spray paint bottle as the mass.

image

Oh, wait that seems like a function that we are familiar with – The sinusoid.

image

Without even having to write down a single equation, we have found out the solution to our problem. The motion that is traced  by the mass is a sinusoid.

But what do I mean by a sinusoid ?

If you took the plotted paper and tried to create that function with the help of sum of polynomials i.e x, x2, x3 … Now you this what it would like :

image

By taking an infinite of these polynomial sums you get the function Since this series of polynomial occurs a lot, its given the name – sine.

image

I hope this shed some light on the intuition of the SHM equation. Have fun!

A note on the cosine

For people asking about the cosine and how to think about it . Cosine is merely sine pushed to the side.

The analogy works the same way 😀

Have a good one!

Legendre Differential Equation(#4) : A friendly introduction

When you are working with Spherical harmonics, then the Legendre Differential Equation does not appear in its natural form i.e

(1-x^2)y^{''} -2xy^{'} + l(l+1)y = 0

Instead, it appears in this form:

\frac{d^2 y}{d\theta^2} + \frac{cos\theta}{sin\theta} \frac{dy}{d\theta} + l(l+1)y = 0

It seems daunting but the above is the same as the LDE. We can arrive at it by taking x = cos(\theta) and proceeding as follows:

\frac{dy}{dx} = \frac{dy}{d(cos\theta)} = \frac{-1}{sin\theta}\frac{dy}{d \theta}

\frac{d^2 y}{dx^2} = \frac{d}{d(cos\theta)}\left( \frac{-1}{sin\theta}\frac{dy}{d \theta} \right) = \frac{-1}{sin\theta}\frac{d}{d \theta}\left( \frac{-1}{sin\theta}\frac{dy}{d \theta} \right)

Now, applying chain rule, we obtain that

\frac{d^2 y}{dx^2} = \frac{-1}{sin\theta} \left( \frac{-1}{sin\theta} \frac{d^2 y}{d\theta^2} - \frac{cos\theta}{sin^2 \theta} \frac{dy}{d\theta}      \right)

Now simplifying the above expression, we obtain that:

\frac{d^2 y}{dx^2} = \frac{1}{sin^2\theta} \left( \frac{d^2 y}{d\theta^2} + \frac{cos\theta}{sin\theta} \frac{dy}{d\theta} \right)

Plugging in the values of \frac{dy}{dx} and \frac{d^2 y}{dx^2}  into the Legendre Differential Equation,

(1-x^2)y^{''} -2xy^{'} + l(l+1)y = 0

(1-cos^2 \theta)y^{''} -2cos\theta y^{'} + l(l+1)y = 0

\frac{1- cos^2 \theta}{sin^2 \theta} \left( \frac{d^2 y}{d\theta^2} + \frac{cos\theta}{sin\theta}\frac{dy}{d\theta} \right) +\frac{2cos\theta}{sin\theta} \frac{dy}{d\theta} + l(l+1)y = 0

Now if we do some algebra and simplify the trigonometric identities, we will arrive at the following expression for the Legendre Differential Equation:

\frac{d^2 y}{d\theta^2} + \frac{cos\theta}{sin\theta} \frac{dy}{d\theta} + l(l+1)y = 0

If we take the solution for the LDE as f(x) , then the solution to the LDE in the above form is merely f(cos\theta) .

Legendre Differential Equation(#3): A friendly introduction

This post is just a note on the notation that is used across internet sources and books while referring to the LDE.

(1-x^2)y^{''} - 2xy^{'} + l(l+1) y = 0

If one takes p(x) = 1-x^2 , then it follows that p^{'}(x) = -2x . The differential equation can be rewritten as follows:

p(x)y^{''} + p^{'}(x)y^{'} + l(l+1) y = 0

Now the first two terms must seem familiar to you from the chain rule. ( (py)^{'} = py^{'} + yp^{'} ). Ergo,

(py^{'})^{'} + l(l+1)y = 0

or

\frac{d}{dx}(p \frac{dy}{dx}) + l(l+1)y = 0

Now, putting back the value of p :

\frac{d}{dx}\left((1-x^2) \frac{dy}{dx} \right) + l(l+1)y = 0

And you will see this form of the LDE also in many places and I thought it was worth mentioning how one ended up in that form.

Legendre Differential Equation(#2): A friendly introduction

Now there is something about the Legendre differential equation that drove me crazy. What is up with the l(l+1) !!!

(1-x^2)y^{''} -2xy^{'} + l(l+1)y = 0

To understand why let’s take this form of the LDE and arrive at the above:

(1-x^2)y^{''} -2xy^{'} + \lambda y = 0

y = \sum\limits_{n=0}^{\infty} a_n x^n

If we do a power series expansion and following the same steps as the previous post, we end up with the following recursion relation.

(n+2)(n+1)a_{n+2} = (\lambda -n(n+1))a_n

or

a_{n+2} = a_n \frac{\lambda - n(n+1)}{(n+1)(n+2)}

Here’s the deal: We want a convergent solution for our differential solution. This means that as n \rightarrow l , a_{n+2} \rightarrow 0.

Hence we obtain that

\lambda = l(l+1)

Legendre Differential equation (#1) : A friendly introduction

In this series of posts about Legendre differential equation, I would like to de-construct the differential equation down to the very bones. The motivation for this series is to put all that I know about the LDE in one place and also maybe help someone as a result.

The Legendre differential equation is the following:

(1-x^2)y^{''} -2xy^{'} + l(l+1)y = 0

where y^{'} = \frac{dy}{dx} and y^{''} = \frac{d^{2}y}{dx}

We will find solutions for this differential equation using the power series expansion i.e
y = \sum\limits_{n=0}^{\infty} a_n x^n

y^{'} = \sum\limits_{n=0}^{\infty} na_n x^{n-1}

y^{''} = \sum\limits_{n=0}^{\infty} n(n-1)a_n x^{n-2}

We will plug in these expressions for the derivatives into the differential equation.

l(l+1)y = l(l+1)\sum\limits_{n=0}^{\infty} a_n x^n – (i)

-2xy^{'} = -2\sum\limits_{n=0}^{\infty} na_n x^{n} – (ii)

(1-x^2)y^{''} = (1-x^2)\sum\limits_{n=0}^{\infty} n(n-1)a_n x^{n-2}

= \sum\limits_{n=0}^{\infty} n(n-1)a_n x^{n-2} - \sum\limits_{n=0}^{\infty} n(n-1)a_n x^{n} – (iii)

** Note: Begin

\sum\limits_{n=0}^{\infty} n(n-1)a_n x^{n-2}

Let’s take \lambda = n-2 .
As n -> 0. , \lambda -> -2.
As n -> \infty , \lambda -> \infty.

\sum\limits_{\lambda = -2}^{\infty} (\lambda+2)(\lambda+1)a_n x^{\lambda}

= 0 + 0 + \sum\limits_{\lambda = 0}^{\infty} (\lambda+2)(\lambda+1)a_n x^{\lambda}

Again performing a change of variables from \lambda to n.

= \sum\limits_{n= 0}^{\infty} (n+2)(n+1)a_n x^{n}

** Note: End

(iii) can now be written as follows.

\sum\limits_{n=0}^{\infty} x^n \left((n+1)(n+2)a_{n+2} - n(n-1)a_n \right)  – (iv)

(i)+(ii)+(iv).

\sum\limits_{n=0}^{\infty} x^n \left((n+2)(n+1)a_{n+2} - (l(l+1)-n(n+1))a_n \right)

x = 0 is a trivial solution and therefore we get the indicial equation:

(n+2)(n+1)a_{n+2} - (l(l+1)-n(n+1))a_n = 0

(n+2)(n+1)a_{n+2} = (l^2 - n^2 + l - n)a_n = 0

(n+2)(n+1)a_{n+2} = ((l-n)(l+n)+ l - n)a_n = 0

(n+2)(n+1)a_{n+2} = (l-n)(l+n+1)a_n = 0

We get the following recursion relation on the coefficients of the power series expansion.

a_{n+2} = a_n \frac{(l+n+1)(l-n)}{(n+1)(n+2)}

Next post: What do these coefficients mean ?

Euler-Cauchy equation

While trying to solve for the Laplacian in polar coordinates, one encounters the famous Euler-Cauchy differential equation.

x^{2}{\frac  {d^{2}y}{dx^{2}}}+2x{\frac  {dy}{dx}}-l(l+1)y=0

or

{\frac {d^{2}y}{dx^{2}}}+ \frac{2}{x}{\frac {dy}{dx}}- \frac{l(l+1)}{x^2}y=0

How does one find a solution to this differential equation ? Well, most places that I have read simply dictate that the solutions to this differential equation as y = x^l, x^{-(l+1)} without explaining why only these two are the only solutions. The purpose of this post is to explain why!

We can clearly see that x = 0 is a singular point. Therefore a simple power series solution won’t work. Hence we use the frobenius method to get rid of the singularity i.e

y= \sum\limits_{n=0}^{\infty} a_{n}x^{n + \lambda}

Let’s now compute its derivatives wrt x.

\frac{dy}{dx}= \sum\limits_{n=0}^{\infty} (n+\lambda)a_{n}x^{n +\lambda -1}

\frac{d^{2}y}{dx^{2}}= \sum\limits_{n=0}^{\infty} (n + \lambda)(n + \lambda -1)a_{n}x^{n + \lambda -2}

Putting the values for y,\frac{dy}{dx}  and \frac{d^{2}y}{dx^{2}}  back into the differential equation, we get the following form.

x^{2}{\sum\limits_{n=0}^{\infty} (n + \lambda)(n + \lambda -1)a_{n}x^{n-2}}

+2x{\sum\limits_{n=0}^{\infty}(n+\lambda)a_{n}x^{n-1}}

- l(l+1){\sum\limits_{n=0}^{\infty} a_{n}x^{n}}=0

Bringing the x,x^{2}  terms inside the summation, we obtain the following form:

\sum\limits_{n=0}^{\infty}x^n \left({(n+\lambda)(n+\lambda -1)a_n + 2(n+\lambda)a_n -l(l+1)a_n}\right)=0

\sum\limits_{n=0}^{\infty}a_n x^n \left({(n+\lambda)(n+\lambda +1) -l(l+1)}\right) = 0

Obviously, the coefficients of the summation cannot be zero and x=0 is a trivial solution. Therefore, we get the indicial equation.

(n+\lambda)(n+\lambda+1) - l(l+1)= 0  or

(n+\lambda)(n+\lambda+1) = l(l+1)

(i) When n = 0, the indicial equation becomes

\lambda(\lambda+1) = l(l+1)

The values of the \lambda that solve for this equation are l,-(l+1)

\lambda = l , -(l+1)

(ii) When n = 1, the indicial equation becomes

(\lambda + 1)(\lambda+2) = l(l+1)

The values of the \lambda that solve for this equation are (l-1),-(l+2)

\lambda = (l-1) , -(l+2)

\vdots

And in general:

\lambda_n = (l-n), -(l+n+1)

\lambda_{n_1} = (l-n)  , \lambda_{n_2} = -(l+n+1)

Here is the crux of it all.
Lets now write down the solution for this differential equation in its glory:

y= \sum\limits_{n=0}^{\infty} \left(a_{n}x^{n + \lambda_{n_1}} + b_n x^{n+ \lambda_{n_{2}}}\right)

y= \sum\limits_{n=0}^{\infty} \left(a_{n}x^{n + (l-n)} + b_n x^{n-(l+n+1)}\right)

y= \sum\limits_{n=0}^{\infty} \left(a_{n}x^{l} + b_n x^{-(l+1)}\right)

y = \left(a_0 + a_1 + a_2 + \hdots \right) x^{l} + \left(b_0 + b_1 + b_2 + \hdots \right) x^{-(l+1)}

y = A x^{l} + B x^{-(l+1)}

where A and B are constants.

This is the general solution to the Euler-Cauchy differential equation. 😀