Home Profile Projects Articles

Answer: Heat Distribution in a Rod

Wednesday, 26 of March , 2008 at 12:55 pm

Question: A 1D rod of length L has an initial heat distribution of

u(x,0) = - cos(\frac{8 \pi x}{L})

If the rod has insulated ends (\frac{\partial u}{\partial x}(0,t) = \frac{\partial u}{\partial x}(L,t) = 0) and obeys the heat equation

\frac{\partial u(x,t)}{\partial t} = k \frac{\partial^2 u(x,t)}{\partial x^2},

What is the heat distribution of the rod as a function of time?

Answer:
First assume that the solution to the PDE

\frac{\partial u(x,t)}{\partial t} = k \frac{\partial^2 u(x,t)}{\partial x^2},

has the form

u(x,t) = \phi(x) G (t)

Therefore, we can reduce the equation to the following:

\frac{\partial u(x,t)}{\partial t} = k \frac{\partial^2 u(x,t)}{\partial x^2}
\phi(x) \frac{\partial G(t)}{\partial t} = k G(t) \frac{\partial^2 \phi(x)}{\partial x^2}
\frac{1}{k G(t)} \frac{\partial G(t)}{\partial t} =\frac{1}{\phi(x)} \frac{\partial^2 \phi(x)}{\partial x^2}

Since this equation is true for all x and t, therefore both sides of the equation must equal a constant.

\frac{1}{k G(t)} \frac{\partial G(t)}{\partial t} =\frac{1}{\phi(x)} \frac{\partial^2 \phi(x)}{\partial x^2} = - \lambda

which can be written as two ODEs

\frac{d G(t)}{dt} = - \lambda k G(t)
\frac{d^2 \phi(x)}{dx^2} = - \lambda \phi(x)

Solving the first-order differential \frac{d G(t)}{dt} = - \lambda k G(t) is trivial and can easily be shown to have the solution:

G(t) = C e^{-\lambda k t}

Next, we need to solve \frac{d^2 \phi(x)}{dx^2} = - \lambda \phi(x)

The second-order differential has 3 different cases (\lambda = 0, \lambda > 0, \lambda < 0).

Case \lambda = 0
The ODE for this case would be

\frac{d^2 \phi(x)}{dx^2} =0

which has the solution

\phi(x) = A_0 x + A_1

If we apply the BC \frac{d \phi}{dx}(0)=0, we get

\frac{d \phi}{dx}(0) = A_0 = 0

which implies

\phi(x) = A_1

Case \lambda > 0
The ODE for this case would be

\frac{d^2 \phi(x)}{dx^2} = - \lambda \phi(x)

which has the solution

\phi(x) = C_1 cos(\sqrt{\lambda}x) + C_2 sin(\sqrt{\lambda}x)

Next, we apply the BC \frac{d \phi}{dx}(0)=0.

\frac{d \phi}{dx}(0) = \sqrt{\lambda}(-C_1 sin(\sqrt{\lambda}0) + C_2 cos(\sqrt{\lambda}0))
\frac{d \phi}{dx}(0) = \sqrt{\lambda}C_2

Since \lambda > 0, this implies C_2 = 0. Therefore,

\phi(x) = C_1 cos(\sqrt{\lambda}x)

If we apply the 2nd BC \frac{d \phi}{dx}(L)=0, we find the following

\frac{d \phi}{dx}(L) = -C_1 \sqrt{\lambda} sin(\sqrt{\lambda}L) = 0

Therefore, for non-trivial solutions \sqrt{\lambda}L = n \pi where n=1,2,3 \ldots.

This means,

\phi(x) = C_1 cos(\frac{n \pi x}{L})

is a solution.

Case \lambda < 0
The ODE for this case would be

\frac{d^2 \phi(x)}{dx^2} = s \phi(x) where s = -\lambda and s > 0

which has the solution

\phi(x) = B_1 e^{\sqrt{s}x} + B_2 e^{-\sqrt{s}x}

If we apply the BC \frac{d \phi}{dx}(0)=0,we find

\frac{d\phi}{dx}(0) = B_1 \sqrt{s} e^{\sqrt{s}0} - B_2 \sqrt{s} e^{-\sqrt{s}0} = 0
\sqrt{s}(B_1 - B_2) = 0

Since s > 0, we know that B_1 = B_2 which means

\phi(x) = B_1 (e^{\sqrt{s}x} + e^{-\sqrt{s}x})

is a solution.

If we apply the 2nd BC \frac{d \phi}{dx}(L)=0, we find

\frac{d\phi}{dx}(L) = B_1 \sqrt{s} (e^{\sqrt{s}L} - e^{-\sqrt{s}L}) = 0

Since s > 0 and e^{\sqrt{s}L} \neq e^{-\sqrt{s}L}, we know that B_1 =0.

This means that there is no solution where \lambda < 0.


Since the PDE will satify any linear combination of the above solutions, we find that

u(x,t) = A_0 + \sum_{n=1}^{\infty} A_n cos(\frac{n \pi x}{L}) e^{-(\frac{n\pi}{L})^2 kt}

If we apply the IC u(x,0) = - cos(\frac{8 \pi x}{L}) to the solution, we find that A_8 = -3 and every other A_n is zero.

Therefore, the solution would be

u(x,t) =-3 cos(\frac{8 \pi x}{L}) e^{-(\frac{8\pi}{L})^2 kt}

Leave a comment

Category: Answers, Differential Equations

Answer: Solve Laplace’s Equation

Monday, 17 of March , 2008 at 9:10 pm

Question: Find the solutions to Laplace’s Equation:

\frac{\partial^2 u(x,y)}{\partial x^2} + \frac{\partial^2 u(x,y)}{\partial y^2} = 0

Answer:
First assume that the solution to the PDE

\frac{\partial^2 u(x,y)}{\partial x^2} + \frac{\partial^2 u(x,y)}{\partial y^2} = 0

has the form

u(x,y) = \phi(x) \xi (y)

Therefore, we can reduce the equation to the following:

\xi (y) \frac{\partial^2 \phi(x)}{\partial x^2} + \phi(x) \frac{\partial^2 \xi (y)}{\partial y^2} = 0
\frac{1}{\phi (x)} \frac{\partial^2 \phi(x)}{\partial x^2} = \frac{-1}{\xi (y)}\frac{\partial^2 \xi (y)}{\partial y^2}

Since this equation is true for all x and y, therefore both sides of the equation must equal a constant.

\frac{1}{\phi (x)} \frac{\partial^2 \phi(x)}{\partial x^2} = \frac{-1}{\xi (y)}\frac{\partial^2 \xi (y)}{\partial y^2} = \lambda

This implies that we need to solve two ODEs.

 \frac{\partial^2 \phi(x)}{\partial x^2} =\lambda\phi (x)~~~~~~\frac{\partial^2 \xi (y)}{\partial y^2} = -\lambda\xi (y)

Since the solutions to the two ODEs will be very similar, I will solve the ODE

 \frac{\partial^2 \Psi}{\partial r^2} =\kappa \Psi(r)

and apply the results to the two ODEs.

There are 3 cases which we need to solve (\kappa > 0, \kappa = 0, and \kappa < 0).

Case \kappa = 0
The ODE for this case would be

 \frac{\partial^2 \Psi}{\partial r^2} =0

which has the solution

\Psi = C_1 r + C_2

Case \kappa < 0 and \kappa > 0
The ODE

 \frac{\partial^2 \Psi}{\partial r^2} =\kappa \Psi(r)

which will have the solution

\Psi = B_1 e^{\sqrt{\kappa}r} + B_2 e^{-\sqrt{\kappa}r}

Please note that \sqrt{\kappa} will be an imaginary number when \kappa < 0.


Therefore, if we apply the above solution, we can find the functions that solve the ODEs

 \frac{\partial^2 \phi(x)}{\partial x^2} =\lambda\phi (x)~~~~~~\frac{\partial^2 \xi (y)}{\partial y^2} = -\lambda\xi (y)

which would be

\phi (x)= A_1 e^{i\sqrt{\lambda}x} + A_2 e^{-i\sqrt{\lambda}x}
\xi  (y)= B_1 e^{\sqrt{\lambda}y} + B_2 e^{-\sqrt{\lambda}y} when \lambda < 0

\phi (x)= A_1 e^{\sqrt{\lambda}x} + A_2 e^{-\sqrt{\lambda}x}
\xi  (y)= B_1 e^{i\sqrt{\lambda}y} + B_2 e^{-i\sqrt{\lambda}y} when \lambda > 0

\phi (x)= C_1 x + C_2
\xi  (y)= D_1 y + D_2 when \lambda = 0

Therefore, the solution would have the form

u(x,y) = \begin{cases}(A_1 e^{i\sqrt{\lambda}x} + A_2 e^{-i\sqrt{\lambda}x})(B_1 e^{\sqrt{\lambda}y} + B_2 e^{-\sqrt{\lambda}y}) & for~\lambda < 0 \\ (A_1 e^{\sqrt{\lambda}x} + A_2 e^{-\sqrt{\lambda}x})(B_1 e^{i\sqrt{\lambda}y} + B_2 e^{-i\sqrt{\lambda}y}) & for~\lambda > 0 \\ (C_1 x + C_2)(D_1 y + D_2) & for~\lambda = 0\end{cases}

Any superposition of the above equation will satisfy Laplace’s equation. In order to reduce this solution more, we would need to be given Boundary and Initial Conditions.

Leave a comment

Category: Answers, Differential Equations

Answer: Falling Infinite Rope

Friday, 7 of March , 2008 at 8:21 pm

Question: An infinite rope with a linear density of \lambda is placed on a frictionless table. If the end of the rope is placed at the end of the table and starts falling, what is the velocity of the rope as a function of distance?

Answer: According to Newton’s 2nd Law of Motion, we know that

F_{net} = \frac{\partial p}{\partial t}

If we create a force diagram, we can easily see that F_{net} = mg.

where m = \lambda x.

Therefore, we can create the equation of motion as follows:

\frac{\partial p}{\partial t} = \frac{\partial (m \dot{x})}{\partial t} = \dot{x}\dot{m} + m\ddot{x} = mg
\dot{x}\frac{\partial (\lambda x)}{\partial t} + \lambda x \ddot{x} = \lambda x g
\lambda\dot{x}^2 + \lambda x \ddot{x} = \lambda x g
\dot{x}^2 + x \ddot{x} =  x g

In order to solve this differential equation, let y = \frac{1}{2} \dot{x}^2.

This means:

\dot{y} = \dot{x} \ddot{x} ~~~\Longrightarrow ~~~ \ddot{x} = \frac{\dot{y}}{\dot{x}} = \frac{\frac{\partial y}{\partial t}}{\frac{\partial x}{\partial t}} = \frac{\partial y}{\partial x}

Therefore, the differential equation becomes

2y + x \frac{dy}{dx} = gx ~~~\Longrightarrow ~~~ \frac{dy}{dx} + \frac{2}{x}y = g

We can solve this using the integrating factor method. According to our differential equation, our integrating factor will be e^{\int \frac{2 dx}{x}}= x^2. If we multiple our integrating factor to our ODE, we get

x^2 \frac{dy}{dx} + 2xy = g x^2
\frac{d(x^2 y)}{dx} = gx^2
x^2 y = \int g x^2 dx = \frac{gx^2}{3} + C
\therefore y = \frac{g}{3}x + \frac{C}{x^2}

However, since y = \frac{1}{2} \dot{x}^2, we know that

\frac{1}{2}\dot{x}^2 = \frac{g}{3}x + \frac{C}{x^2}
\dot{x} = \sqrt{\frac{2}{3}gx + \frac{2C}{x^2}}

If we add the boundary condition, \dot{x}(0) =0, the equation reduces to

\dot{x} = \sqrt{\frac{2}{3}gx}

Leave a comment

Category: Answers, Classical Mechanics

Answer: General Form of Sequence

Saturday, 1 of March , 2008 at 9:59 pm

Question: The solution to x = \sqrt{10y+1} where x,y \in \mathbb N yields the following sequence:

8,~12,~36,~44,~84,~96,~152,~168,~240~\ldots

Find the general form for this sequence.

Answer: When analyzing this sequence, the first thing I tried was comparing the difference between each number in the sequence.

Lets investigate this new sequence.

4,~24,~8,~40,~12,~56,~16,~72~\ldots

It appears the odd terms are related to each other and so are the even terms. Lets break the odd terms and even terms into two different sequences.

odd~terms:~4,~8,~12,~16,\ldots
even~terms:~24,~40,~56,~72,\ldots

As you can see, the odd terms has the form:

\phi_n = 4n

The even terms, likewise, can be seen to have the form:

\phi_n = \phi_{n-1} + 16 or
\phi_n = 16n + 8

If we merge these results, we can get pattern for the following sequence

4,~24,~8,~40,~12,~56,~16,~72~\ldots

which is

\phi_n = \begin{cases}4(\frac{n+1}{2}) & odd~n \\ 16(\frac{n}{2}) +8 & even~n\end{cases}
\phi_n = \begin{cases}2(n+1) & odd~n \\ 8(n+1) & even~n\end{cases}

We can then use this result to find the solution to

8,~12,~36,~44,~84,~96,~152,~168,~240~\ldots

which would be

\psi_n = \psi_{n-1} + \phi_n
\psi_n= \psi_{n-1} + \begin{cases}2(n+1) & odd~n \\ 8(n+1) & even~n\end{cases}

where \psi_0 = 8.

Leave a comment

Category: Algebra, Answers

Answer: Infinite Potential Well

Saturday, 23 of February , 2008 at 10:43 am

Question: A quantum particle is inside a one-dimensional infinitely deep potential well.

Find the wavefunction that satisfies Schrödinger’s equation.

i \hbar \frac{\partial}{\partial t} \Psi (\vec{r}, t)= \frac{-\hbar^2}{2m} \nabla^2 \Psi (\vec{r}, t) + V(\vec{r}) \Psi (\vec{r}, t)

Answer:

First assume that \Psi (\vec{r}, t) can be represented as \Psi (\vec{r}, t) = \phi (\vec{r}) \Phi (t). This means that Schrödinger’s equation can be manipulated as followed:

i \hbar \frac{\partial}{\partial t} \Psi (\vec{r}, t)= \frac{-\hbar^2}{2m} \nabla^2 \Psi (\vec{r}, t) + V(\vec{r}) \Psi (\vec{r}, t)
i \hbar \phi (\vec{r}) \frac{\partial}{\partial t} \Phi (t)= \frac{-\hbar^2}{2m}\Phi (t) \nabla^2 \phi (\vec{r}) + V(\vec{r}) \phi (\vec{r}) \Phi (t)
\frac{i \hbar}{\Phi (t)} \frac{\partial}{\partial t}\Phi (t)= \frac{-\hbar^2}{2m \phi (\vec{r})} \nabla^2 \phi (\vec{r})  + V(\vec{r})

Since the this equation holds for all \vec{r} and t, both sides of the equation must equal a constant.

\frac{i \hbar}{\Phi (t)} \frac{\partial}{\partial t}\Phi (t)= \frac{-\hbar^2}{2m \phi (\vec{r})} \nabla^2 \phi (\vec{r})  + V(\vec{r}) = E

Time Component
Next, we will solve for the time component of the above equation.

\frac{i \hbar}{\Phi (t)} \frac{\partial}{\partial t}\Phi (t) = E
i \hbar \int \frac{d\Phi}{\Phi (t)} = E \int dt
i \hbar ln(\Phi (t)) = E t
\Phi (t) = e^{\frac{-iE}{\hbar}t}

Time-Independent Component
The time-independent component of the Schrödinger equation would be:

\frac{-\hbar^2}{2m} \nabla^2 \phi (\vec{r})  + \phi (\vec{r})V(\vec{r}) = E\phi (\vec{r})

The solution to this problem can be easily solved for the case x \le 0 and  x \ge L. Since V(x) = \infty, the only way to solve

\frac{-\hbar^2}{2m} \frac{d^2}{dx^2} \phi (x)  + \phi (x)V(x) = E\phi (x)

is to have \phi (x) = 0.

For the case when 0 < x < L, we know that V(x) =0. Therefore, the time-independent equation will become:

\frac{-\hbar^2}{2m} \frac{d^2}{dx^2} \phi (x) = E\phi (x)

This equation should look rather familiar because it is the differential equation describing a simple harmonic oscillator. Therefore, the general solution to this differential equation would be:

\phi (x) = A sin(\frac{\sqrt{2mE}}{\hbar}x) + B cos(\frac{\sqrt{2mE}}{\hbar}x)

Therefore, the solution would be:

\phi (x)=\begin{cases}0 & x \le 0~and~x \ge L \\A sin(\frac{\sqrt{2mE}}{\hbar}x) + B cos(\frac{\sqrt{2mE}}{\hbar}x)& 0<x<L\end{cases}

If we add a requirement that \phi (x) needs to be piecewise-smooth, we can add boundary conditions \phi (0) = 0 and \phi (L) = 0 to the problem:

\phi (x) = A sin(\frac{\sqrt{2mE}}{\hbar}x) + B cos(\frac{\sqrt{2mE}}{\hbar}x)

Therefore, when \phi (0), we can see that B=0 because

\phi (x) = A sin(0) + B cos(0) = B = 0

Now that we know B=0, we can apply the second boundary condition \phi (L)=0 to the remaining portion of the equation.

\phi (L) = A sin(\frac{\sqrt{2mE}}{\hbar}L) = 0
\therefore ~ \frac{\sqrt{2mE}}{\hbar}L = n \pi where n \in  \mathbb N

This implies

E = \frac{n^2 \pi^2 \hbar^2}{2mL^2}

Therefore, we can see that the general solution can be reduced to:

\phi (x)=\begin{cases}0 & x \le 0~and~x \ge L \\A sin(\frac{n\pi}{L}x) & 0<x<L\end{cases}

The last step is to normalize this wave-function

1 = \int_{-\infty}^{\infty} |\phi (x)|^2 dx
= |A|^2 \int_{0}^{L} sin^2(\frac{n\pi}{L}x) dx
= |A|^2 \frac{L}{n\pi}(-\frac{1}{2}cos(\frac{n\pi}{L}x)sin(\frac{n\pi}{L}x) + \frac{1}{2}\frac{n\pi}{L}x)\arrowvert_{0}^{L}
= |A|^2 \frac{L}{n\pi}(\frac{1}{2}n\pi) = |A|^2 \frac{L}{2}

Therefore

A = \sqrt{\frac{2}{L}}

Therefore, the final solution would be

\Psi (x, t)=\begin{cases}0 & x \le 0~and~x \ge L \\ \sqrt{\frac{2}{L}} sin(\frac{n\pi}{L}x)e^{\frac{-iE}{\hbar}t} & 0<x<L\end{cases}
where E = \frac{n^2 \pi^2 \hbar^2}{2mL^2}

Leave a comment

Category: Answers, Quantum Mechanics