Quantum Angular Momentum and $\mathfrak{su}(2)$ Representation

In classical mechanics, the angular momentum of a body is given by
$$L=r\times p$$ where $r$ and $p$ denote radius arm and linear momentum respectively. In quantum mechanics, the angular momentum of a spinning particle can be obtained by replacing linear momentum $p$ by momentum operator $-i\hbar\nabla$. As a result, the components of quantum mechanical angular momentum $L$ is given by
\begin{align*}
L_x&=-i\hbar\left(y\frac{\partial}{\partial z}-z\frac{\partial}{\partial y}\right)\\
L_y&=-i\hbar\left(z\frac{\partial}{\partial x}-x\frac{\partial}{\partial z}\right)\\
L_z&=-i\hbar\left(x\frac{\partial}{\partial y}-y\frac{\partial}{\partial x}\right)
\end{align*}

It is interesting to see that the quantum mechanical angular momentum can be obtained purely from algebra, more specifically from representation theory. The relevant representations are the representations of the special unitary group $\mathrm{SU}(2)$ and its Lie algebra $\mathfrak{su}(2)$. This hints us that the symmetry of the background space plays a crucial role in quantum mechanics.

The rotations in $\mathbb{R}^3$ form the special orthogonal group $\mathrm{SO}(3)$. $\mathrm{SO}(3)$ is not simply connected (see [3] for detalis) and the special unitary group $\mathrm{SU}(2)$ is the universal covering group of $\mathrm{SO}(3)$. ($\mathrm{SU}(2)=S^3$ so it is simply connected.) The covering map $\mathrm{SU}(2)\longrightarrow\mathrm{SO}(3)$ is a $\mathrm{SU}(2)$ representation. To see this, note that Euclidean 3-space $\mathbb{R}^3$ can be identified with the set of $2\times 2$ hermitian matrices of the form
$$\underline{X}=\begin{pmatrix}
z & x-iy\\
x+iy & -z
\end{pmatrix}$$
with the inner product $\langle\ ,\ \rangle$ defined by
$$\langle\underline{X},\underline{Y}\rangle=\frac{1}{2}\mathrm{tr}(\underline{X}\cdot\underline{Y})$$
In particular
$$|\underline{X}|^2=\frac{1}{2}\mathrm{tr}\underline{X}^2=-\det\underline{X}$$
Here the hermitian matrix $\underline{X}$ is identified with the vector $(x,y,z)\in\mathbb{R}^3$. Since $|X|^2=-\det\underline{X}$, the identification is an isometry. $\mathrm{SU}(2)$ acts on $\mathbb{R}^3$ isometrically by the action
$$\mathrm{SU}(2)\times\mathbb{R}^3\longrightarrow\mathbb{R}^3;\ (U,X)\longmapsto U^{-1}XU$$
For a fixed $U\in\mathrm{SU}(2)$, the map
$$\mathbb{R}^3\longrightarrow\mathbb{R}^3;\ X\longmapsto U^{-1}XU$$
is an orientation preserving isometry of $\mathbb{R}^3$. Thus the Lie group action induces a Lie group representation $\rho:\mathrm{SU}(2)\longrightarrow\mathrm{SO}(3)$. Since both $U$ and $-U$ result the same isometry, the representation $\rho$ is a 2:1 map. The kernal of $\rho$ is $\mathbb{Z}_2=\{\pm I\}$, so we have $\mathrm{SU}(2)/\mathbb{Z}_2=\mathrm{SO}(3)$. The quotient group $\mathrm{SU}(2)/\mathbb{Z}_2$ is denoted by $\mathrm{PSU}(2)$ is called the projective special unitary group. The double cover of the special orthogonal group $\mathrm{SO}(n)$ is called the spin group and is denoted by $\mathrm{Spin}(n)$. Hence, the double cover $\mathrm{SU}(2)\longrightarrow\mathrm{SO}(3)$ is the spin group $\mathrm{Spin}(3)$.

Let $\mathcal{H}$ be the Hilbert space of states $\psi$ as smooth functions on $\mathbb{R}^3$. Define a map $\Pi:\mathrm{SU(2)}\longrightarrow\mathrm{GL(\mathcal{H})}$ as follows: For each $U\in\mathrm{SU}(2)$, $\Pi(U):\mathcal{H}\longrightarrow\mathcal{H}$ is an isomorphism defined by
$$[\Pi(U)\psi](v)=\psi(\rho(U)^{-1}v),\ v\in\mathbb{R}^3$$
where $\rho$ is the universal covering map $\rho: \mathrm{SU}(2)\stackrel{2:1}{\longrightarrow}\mathrm{SO}(3)$. $\Pi$ is indeed a group homomorphism: For $U_1,U_2\in\mathrm{SU}(2)$,
\begin{align*}
\Pi(U_1)[\Pi(U_2)\psi](v)&=\Pi(U_2\psi)(\rho(U_1)^{-1}v)\\
&=\psi(\rho(U_2)^{-1}\rho(U_1)^{-1}v)\\
&=\psi((\rho(U_1)\rho(U_2))^{-1}v)\\
&=\psi(\rho(U_1U_2)^{-1}v)\\
&=[\Pi(U_1U_2)\psi](v)
\end{align*}
Hence, $\Pi$ is an infinite dimensional real representation of $\mathrm{SU}(2)$. Here the fact that $\rho$ is a group homomorphism is used. We can also obtain the corresponding representation $\pi$ of the Lie algebra $\mathfrak{su}(2)$. $\pi$ can be computed as
$$\pi(X)=\frac{d}{dt}\Pi(e^{tX})|_{t=0}$$
So,
\begin{align*}
[\pi(X)\psi](v)&=\frac{d}{dt}[\Pi(e^{tX})\psi](v)|_{t=0}\\
&=\frac{d}{dt}\psi(\rho(e^{tX})^{-1}v)|_{t=0}
\end{align*}
The Lie algebra $\mathfrak{su}(2)$ has the canonical basis
\begin{align*}
X_1&=\frac{i}{2}\sigma_1=\frac{i}{2}\begin{pmatrix}
0 & 1\\
1 & 0
\end{pmatrix}\\
X_2&=\frac{i}{2}\sigma_2=\frac{i}{2}\begin{pmatrix}
0 & i\\
-i & 0
\end{pmatrix}\\
X_3&=\frac{i}{2}\sigma_3=\frac{i}{2}\begin{pmatrix}
1 & 0\\
0 & -1
\end{pmatrix}
\end{align*}
Let us calculate $\pi$ for the basis member $X_3$. $e^{\theta X_3}=\begin{pmatrix}
e^{i\theta/2} & 0\\
0 & e^{-i\theta/2}
\end{pmatrix}$ and $\rho(e^{\theta X_3})=R_\theta^z$ where $R_\theta^z=\begin{pmatrix}
\cos\theta & -\sin\theta & 0\\
\sin\theta & \cos\theta & 0\\
0 & 0 & 1\end{pmatrix}$ is rotation in $\mathbb{R}^3$ about the $z$-axis by angle $\theta$. Let $v(\theta)$ be a curve in $\mathbb{R}^3$ defined by
$$v(\theta)=\rho(e^{\theta X_3})^{-1}v=(R_\theta^z)^{-1}v$$ so that $v(0)=v$. Write $v(\theta)=(x(\theta),y(\theta),z(\theta))$ and $v=(x,y,z)$. Then by the chain rule,
\begin{align*}
[\pi(X_3)\psi](v)&=\frac{\partial\psi}{\partial x}\frac{dx}{d\theta}|_{\theta=0}+\frac{\partial\psi}{\partial y}\frac{dy}{d\theta}|_{\theta=0}+\frac{\partial\psi}{\partial z}\frac{dz}{d\theta}|_{\theta=0}\\
&=y\frac{\partial\psi}{\partial x}-x\frac{\partial\psi}{\partial y}
\end{align*}
Hence,
$$\pi(X_3)=y\frac{\partial}{\partial x}-x\frac{\partial}{\partial y}$$
Using
\begin{align*}
e^{\phi X_2}&=\begin{pmatrix}
\cos\frac{\phi}{2} & -\sin\frac{\phi}{2}\\
\sin\frac{\phi}{2} & \cos\frac{\phi}{2}
\end{pmatrix},\ \rho(e^{\phi X_2})=R_\phi^y=\begin{pmatrix}
\cos\phi & 0 & -\sin\phi\\
0 & 1 & 0\\
\sin\phi & 0 & \cos\phi
\end{pmatrix}\\
e^{\sigma X_1}&=\begin{pmatrix}
\cos\frac{\sigma}{2} & i\sin\frac{\sigma}{2}\\
i\sin\frac{\sigma}{2} & \cos\frac{\sigma}{2}
\end{pmatrix},\ \rho(e^{\sigma X_1})=R_\sigma^x=\begin{pmatrix}
1 & 0 & 0\\
0 & \cos\sigma & -\sin\sigma\\
0 & \sin\sigma & \cos\sigma
\end{pmatrix}
\end{align*}
one can find similar formulas for $\pi(X_2)$ and $\pi(X_1)$:
\begin{align*}
\pi(X_2)&=z\frac{\partial}{\partial x}-x\frac{\partial}{\partial z}\\
\pi(X_1)&=z\frac{\partial}{\partial y}-y\frac{\partial}{\partial z}
\end{align*}
Note that
\begin{align*}
i\hbar\pi(X_1)&=L_x=-i\hbar\left(y\frac{\partial}{\partial z}-z\frac{\partial}{\partial y}\right)\\
-i\hbar\pi(X_2)&=L_y=-i\hbar\left(z\frac{\partial}{\partial x}-x\frac{\partial}{\partial z}\right)\\
i\hbar\pi(X_3)&=L_z=-i\hbar\left(x\frac{\partial}{\partial y}-y\frac{\partial}{\partial x}\right)
\end{align*}
i.e. the angular momenta about the $x$-axis, $y$-axis and $z$-axis respectively.

References:

[1] Walter Greiner, Quantum Mechanics, An Introduction, 4th Edition, Springer-Verlag 2000

[2] Brian C. Hall, Lie Groups, Lie Algebras, and Representations: An Elementary Introduction, Springer-Verlag 2004

[3] Shlomo Sternberg, Group Theory and Physics, Cambridge University Press 1994

The Semi-Homogeneous Heat Problem

In this lecture, we study how to solve the semi-homogeneous heat problem:
$$
\begin{aligned}
&u_t=\alpha^2 u_{xx}+F(x,t),\ 0<x<L,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
-k_1u_x(0,t)+h_1u(0,t)&=0,\ t>0\\
k_2u_x(L,t)+h_2u(L,t)&=0,
\end{aligned}
\right.\\
&{\rm IC:}\ u(x,0)=\phi(x),\ 0<x<L\ \ \ \ \ (1)
\end{aligned}
$$

We consider a solution of the form
$$u(x,t)=\sum_{n=0}^\infty T_n(t)X_n(x)$$
In addition, we assume that
$$F(x,t)=\sum_{n=0}^\infty F_n(t)X_n(x)$$
Let $A_n:=T_n(0)$. Then
$$\phi(x)=\sum_{n=0}^\infty A_nX_n(x)$$
For each $n=0,1,2,\cdots$, $X_n(x)$ is the solution of the Sturm-Liouville problem:
$$
\begin{aligned}
&X_n^{\prime\prime}=-\lambda_n^2X_n\\
&{\rm BCs:}\ \left\{\begin{aligned}
-k_1X_n'(0)+h_1X_n(0)&=0\\
k_2X_n'(L)+h_2X_n(L)&=0
\end{aligned}
\right.\ \ \ \ \ (2)
\end{aligned}
$$
and $T_n(t)$ satisfies the first order ODE with initial condition:
$$\left\{\begin{aligned}
\dot{T}_n+\lambda_n^2\alpha^2T_n=F_n\\
T_n(0)=A_n.
\end{aligned}
\right.\ \ \ \ \ (3)$$
Then $T_n(t)$ is given by
$$
T_n(t)=\left[A_n+\int_0^t F_n(s)e^{\lambda_n^2\alpha^2 s}ds\right]e^{-\lambda_n^2\alpha^2 t}.
$$
Finally, $F_n(t)$ and $A_n$ are to be determined by
\begin{align*}
F_n(t)&=\frac{1}{L_n}\int_0^L F(x,t)X_n(x)dx\ \ \ \ \ (3)\\
A_n&=\frac{1}{L_n}\int_0^L\phi(x)X_n(x)dx\ \ \ \ \ (4)
\end{align*}
As a summary we have the recipe for solving the semi-homogeneous heat IBVP (1):

  1. Find the eigenvalue $\lambda_n$ and the corresponding eigenfunction $X_n$ by solving the Sturm-Liouville problem (2)
  2. Find the coefficients $F_n(t)$ and $A_n$ using the formulae (4) and (5) respectively.
  3. For each $n=0,1,2,\cdots$, find $T_n(t)$ using the formula (3)
  4. Put all things together as $$u(x,t)=\sum_{n=0}^\infty T_n(t)X_n(x)$$

Example. Solve the semi-homogeneous heat IBVP:
\begin{align*}
&u_t=\alpha^2 u_{xx}+b\sin\pi x,\ 0<x<1,\ 0<t<\infty\\
&{\rm BCs:}\ \left\{\begin{aligned}
u(0,t)&=0,\ 0<t<\infty\\
u(1,t)&=0,
\end{aligned}
\right.\\
&{\rm IC:}\ u(x,0)=1,\ 0<x<1
\end{align*}

Solution:

Step 1. The eigenfunctions are
$$X_n(x)=\sin n\pi x,\ n=1,2,3,\cdot.$$

Step 2. \begin{align*}
F_n(t)&=2b\int_0^1\sin\pi x\sin n\pi xdx\\
&=\left\{\begin{array}{ccc}
b & {\rm if} & n=1\\
0 & {\rm otherwise}.\end{array}\right.\\
A_n&=2\int_0^1\sin n\pi xdx\\
&=\frac{2[1-(-1)^n]}{n\pi}
\end{align*}
For $n=1,2,3,\cdots$, $A_{2n}=0$ and $A_{2n-1}=\frac{4}{2(n-1)\pi}$

Step 3. \begin{align*}
T_1(t)&=\left[\frac{4}{\pi}+\int_0^t be^{\alpha^2\pi^2s}ds\right]e^{-\alpha^2\pi^2t}\\
&=\frac{b}{\alpha^2\pi^2}+\left(\frac{4}{\pi}-\frac{b}{a^2\pi^2}\right)e^{-\alpha^2\pi^2t}
\end{align*}
For $n=2,3,\cdots,$
$$T_{2n-1}(t)=\frac{4}{(2n-1)\pi}e^{-\alpha^2(2n-1)^2\pi^2t}$$

Step 4. The solution is therefore
\begin{align*}
u(x,t)=\left[\frac{b}{\alpha^2\pi^2}+\left(\frac{4}{\pi}-\frac{b}{a^2\pi^2}\right)e^{-\alpha^2\pi^2t}\right]\sin\pi x\\
+\sum_{n=2}^\infty \frac{4}{(2n-1)\pi}e^{-\alpha^2(2n-1)^2\pi^2t}\sin(2n-1)\pi x
\end{align*}

The eventual temperature is
$$\lim_{t\to\infty}u(x,t)=\frac{b}{\alpha^2\pi^2}\sin\pi x$$

References:

David Betounes, Partial Differential Equations for Computational Science with Maple and Vector Analysis, TELOS, Springer-Verlag

Solving Heat Equation with Non-Homogeneous BCs 2: Time-Dependent BCs

Consider the heat IBVP:
\begin{align*}
&u_t=\alpha^2 u_{xx},\ 0<x<L,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
&u(0,t)=g_1(t),\ t>0\\
&u_x(L,t)+hu(L,t)=g_2(t),
\end{aligned}
\right.\\
&{\rm IC:}\ u(x,0)=\phi(x),\ 0<x<L.
\end{align*}
Again we seek a solution of the form:
$$u(x,t)=S(x,t)+U(x,t)$$
where $S(x,t)$ satisfies the non-homogeneous BCs:
\begin{align*}
S(0,t)&=g_1(t)\ \ \ \ \ (1)\\
S_x(L,t)+hS(L,t)&=g_2(t)
\end{align*}
Suppose that
$$S(x,t)=A(t)x+B(t)$$
From the BCs (1) we obtain
$$S(x,t)=\frac{g_2(t)-hg_1(t)}{1+hL}x+g_1(t)$$
$U(x,t)$ satisfies the semi-homogeneous heat IBVP:
\begin{align*}
&U_t=\alpha^2 U_{xx}-S_t,\ 0<x<L,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
&U(0,t)=0,\ t>0\\
&U_x(L,t)+hU(L,t)=0,
\end{aligned}
\right.\\
&{\rm IC:}\ U(x,0)=\phi(x)-S(x,0),\ 0<x<L.
\end{align*}
Since $u(x,t)\approx S(x,t)$ for large time, the eventual temperature is $\lim_{t\to\infty}S(x,t)$. The homogeneous BCs are pretty much similar to the ones we studied here but the heat equation is non-homogeneous. Such a problem (non-homogeneous heat equation + homogeneous BCs) is called a semi-homogeneous IBVP. Unfortunately, we cannot solve the semi-homogenous heat IBVP yet. We will discuss how to solve semi-homogeneous IBVPs later.

Example. Solve the heat IBVP:
\begin{align*}
&u_t=\alpha^2 u_{xx}-ae^{-t}x,\ 0<x<1,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
&u(0,t)=1,\ t>0\\
&u(1,t)=ae^{-t},
\end{aligned}
\right.\\
&{\rm IC:}\ u(x,0)=0,\ 0<x<1.
\end{align*}

Solution: Let $u(x,t)=S(x,t)+U(x,t)$
where $S(x,t)=A(t)x+B(t)$ satisfies the BCs. Then
$S(x,t)=(ae^{-t}-1)x+1$. $U(x,t)$ satisfies the homogeneous heat IBVP:
\begin{align*}
&U_t=\alpha^2 U_{xx},\ 0<x<1,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
&U(0,t)=0,\ t>0\\
&U(1,t)=0,
\end{aligned}
\right.\\
&{\rm IC:}\ U(x,0)=-(a-1)x-1,\ 0<x<1.
\end{align*}
We know how to solve this problem and the solution $U(x,t)$ is given by
$$U(x,t)=\sum_{n=1}^\infty A_n e^{-\alpha^2n^2\pi^2t}\sin n\pi x$$
where for each $n=1,2,\cdots$
\begin{align*}
A_n&=2\int_0^1[-(a-1)x-1]\sin n\pi xdx\\
&=2\frac{a(-1)^n-1}{n\pi}
\end{align*}
That is,
$$U(x,t)=2\sum_{n=1}^\infty\frac{a(-1)^n-1}{n\pi}e^{-\alpha^2n^2\pi^2t}\sin n\pi x$$
Therefore, the solution to the original heat problem is
$$u(x,t)=(ae^{-t}-1)x+1+2\sum_{n=1}^\infty\frac{[a(-1)^n-1]}{n\pi}e^{-\alpha^2 n^2\pi^2 t}\sin n\pi x.$$
The eventual temperature is
$$\lim_{t\to\infty}S(x,t)=-x+1$$

References:

David Betounes, Partial Differential Equations for Computational Science with Maple and Vector Analysis, TELOS, Springer-Verlag

Solving Heat Equation with Non-Homogeneous BCs 1: Time-Indepdendent BCs

Consider the following 1-dimensional heat IBVP:
\begin{align*}
&u_t=\alpha^2 u_{xx},\ 0<x<L,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
u(0,t)&=c_1,\ t>0\\
u(L,t)&=c_2,
\end{aligned}
\right.\\
&{\rm IC:}\ u(x,0)=\phi(x),\ 0<x<L.
\end{align*}
Since the BCs are not homogeneous, the method of separation of variables cannot be used. Let us assume that $u(x,t)$ can be decomposed to
$$u(x,t)=S(x,t)+U(x,t)$$
where $S(x,t)$ satisfies the non-homogeneous BCs i.e.
\begin{align*}
S(0,t)&=c_1\ \ \ \ \ (1)\\
S(L,t)&=c_2
\end{align*}
This implies that $U(x,t)$ satisfies the homogeneous BCs
$$U(0,t)=U(L,t)=0$$
We don’t know the function $S(x,t)$ but we can make a guess. We can first try a possibly simplest one, a linear function in $x$
$$S(x,t)=A(t)x+B(t)$$
If this works, it is our luck day. If not, try something else that is next simplest one, say a quadratic function in $x$. It turns out that our guess works! This means that we can determine the coefficients $A(t)$ and $B(t)$ from the BCs (1) and we find that
$$A(t)=\frac{c_2-c_1}{L},\ B(t)=c_1$$
Thus
$$S(x,t)=\frac{c_2-c_1}{L}x+c_1$$
$U(x,t)$ satisfies the homogeneous IBVP:
\begin{align*}
&U_t=\alpha^2 U_{xx},\ 0<x<L,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
U(0,t)&=0,\ t>0\\
U(L,t)&=0,
\end{aligned}
\right.\\
&{\rm IC:}\ U(x,0)=\phi(x)-S(x,0)=\phi(x)-\frac{c_2-c_1}{L}x-c_1,\ 0<x<L.
\end{align*}
We already know how to solve the homogeneous IBVP (see here) and
$$U(x,t)=\sum_{n=1}^\infty A_ne^{-\alpha^2\frac{n^2\pi^2}{L^2}t}\sin\frac{n\pi}{L}x$$
where
$$A_n=\frac{2}{L}\int_0^L[\phi(x)-\frac{c_2-c_1}{L}x-c_1]\sin\frac{n\pi}{L}xdx,\ n=1,2,\cdots$$

Note that $\lim_{t\to\infty}U(x,t)=0$ and so $\lim_{t\to\infty}u(x,t)=S(x)$. $U(x,t)$ is called the transient and $S(x)$ is called the steady state. The steady state is eventual state for large time.

Example. Solve the IBVP:
\begin{align*}
&u_t=\alpha^2 u_{xx},\ 0<x<1,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
u(0,t)&=c_1,\ t>0\\
u(1,t)&=c_2,
\end{aligned}
\right.\\
&{\rm IC:}\ u(x,0)=0,\ 0<x<1.
\end{align*}

Solution: First we solve
\begin{align*}
&U_t=\alpha^2 U_{xx},\ 0<x<1,\ t>0\\
&{\rm BCs:}\ \left\{\begin{aligned}
U(0,t)&=0,\ t>0\\
U(1,t)&=0,
\end{aligned}
\right.\\
&{\rm IC:}\ U(x,0)=-c_1-(c_2-c_1)x,\ 0<x<1.
\end{align*}
The transient $U(x,t)$ is given by
$$U(x,t)=\sum_{n=1}^\infty A_ne^{-\alpha^2n^2\pi^2 t}\sin n\pi x$$
where
\begin{align*}
A_n&=-2\int_0^1[c_1+(c_2-c_1)]\sin n\pi xdx\\
&=\frac{2}{n\pi}[c_2(-1)^n-c_1].
\end{align*}
Hence the solution is
$$u(x,t)=(c_2-c_1)x+c_1+2\sum_{n=1}^\infty\frac{[c_2(-1)^n-c_1]}{n\pi}e^{-\alpha^2n^2\pi^2 t}\sin n\pi x$$

References:

David Betounes, Partial Differential Equations for Computational Science with Maple and Vector Analysis, TELOS, Springer-Verlag

1-Dimensional Heat Initial Boundary Value Problems 3: An Example of Heat IBVP with Mixed Boundary Conditions (Insulated and Specified Flux)

Let us consider the heat IBVP:
\begin{align*}
u_t=\alpha^2u_{xx},\ 0<x<1,\ t>0\\
u_x(0,t)=0,\ t>0\\
u_x(1,t)+u(1,t)=0,\ t>0\\
u(x,0)=1,\ 0<x<1.
\end{align*}
First we solve the Sturm-Liouville problem:
\begin{align*}
X^{\prime\prime}=kX\ \mbox{with BCs}\\
\left\{
\begin{aligned}
&X'(0)=0\\
&X'(1)+X(1)=0.
\end{aligned}
\right.
\end{align*}
The two cases $k=0$ and $k=\lambda^2>0$ are left to be checked for students. Note that the case $k=0$ leads to a trivial solution and for $k=\lambda^2>0$ case there is no solution. Let $k=-\lambda^2$. Then
$$X(x)=A\cos\lambda x+B\sin \lambda x$$
and
$$X'(x)=-A\lambda\sin\lambda x+B\lambda\cos\lambda x.$$
We obtain $B=0$ from the condition $X'(0)=0$. So $X'(x)=-A\lambda\sin\lambda x$. The BC $X'(1)+X(1)=0$ then implies that the eigenvalues $\lambda$ satisfies
$$\lambda=\cot\lambda\ \ \ \ \ (1)$$


The roots of (1) can be found by the Newton’s method. In Maxima, the Newton’s method can be performed as follows.

First we define $\cot(x)-x$ as a function $f(x)$:

(%i1) f(x):=cot(x)-x;

Newton’s method applied to f(x) is performed by

(%i2) newton(t):=subst(t,x,x-f(x)/diff(f(x),x));

To use Newton’s method we need the initial approximation. We can make a guess from its graph. As you can see the first zero is near 0.5, so we choose $x_0=0.5$.

If you just run

(%i3) newton(0.5);

Maxima will return the output

(%o3)                              0.74865744241706

In order to calculate next approximation $x_1$, simply run

(%i4) newton(%);

(%o4)                              0.85239848545338

For the next approximation $x_2$, again run

(%i5) newton(%);

(%o5)                              0.86029880244504

By running the same command, the next approximation $x_3$ is obtained as $x_3=0.86033358835819$. This value is accurate to eight decimal places. If you think this is good enough, you can stop.

Similarly we obtain $\lambda_n$ for $n=2,3,4,\cdots$:
$$\begin{array}{|c||c|c|}
\hline
n & \lambda_n & \frac{(2n-1)\pi}{2}\\
\hline
1 & .8603358 & 1.570796327\\
\hline
2 & 3.425618 & 4.712388981\\
\hline
3 & 6.437298 & 7.853981635\\
\hline
4 & 9.529334 & 10.99557429\\
\hline
5 & 12.645287 & 14.13716694\\
\hline
\cdots & \cdots & \cdots\\
\hline
\end{array}$$
The table shows that as $n$ increases $\frac{(2n-1)\pi}{2}$ gets closer to $\lambda_n$. So for a practical purpose one may use the approximation
$$\lambda_n\approx \frac{(2n-1)\pi}{2},\ \lambda_n=1,2,3,\cdots$$
The temperature distribution $u(x,t)$ is then given by
$$u(x,t)=\sum_{n=1}^\infty A_ne^{-\alpha^2\lambda_n^2t}\cos\lambda_n x$$
The $L_n$’s and $A_n$’s are computed to be:
\begin{align*}
L_n&=\int_0^1\cos^2\lambda_nxdx\\
&=\frac{1}{2}\int_0^1[\cos(2\lambda_nx)+1]dx\\
&=\frac{1}{2}\left[\frac{\sin 2\lambda_n}{2\lambda_n}+1\right]\\
&=\frac{1}{2}\left[\frac{\sin\lambda_n\cos\lambda_n}{\lambda_n}+1\right]\ (\sin2\lambda_n=2\sin\lambda_n\cos\lambda_n)\\
&=\frac{1}{2}\left[\frac{\sin\lambda_n\cos\lambda_n+\lambda_n}{\lambda_n}\right]
\end{align*}
and
\begin{align*}
A_n&=\frac{1}{L_n}\int_0^1\phi(x)\cos\lambda_nxdx\\
&=\frac{2\lambda_n}{\sin\lambda_n\cos\lambda_n+\lambda_n}\int_0^1\cos\lambda_nxdx\\
&=\frac{2\sin\lambda_n}{\sin\lambda_n\cos\lambda_n+\lambda_n}.
\end{align*}

This calculation is done by assuming that $\cos\lambda_n x$, $n=1,2,\cdots$ are orthogonal functions. In fact they are orthogonal functions if $\lambda_n=\frac{(2n-1)\pi}{2}$, $n=1,2,\cdots$.

Finally we have
$$u(x,t)=\sum_{n=1}^\infty\frac{2\sin\lambda_n}{\sin\lambda_n\cos\lambda_n+\lambda_n}e^{-\alpha^2\lambda_n^2 t}\cos\lambda_n x.$$
For an approximation one may take
$$u(x,t)\approx\sum_{n=1}^\infty\frac{4(-1)^{n-1}}{(2n-1)\pi}e^{-\alpha^2\frac{(2n-1)^2\pi^2}{4}t}\cos\frac{(2n-1)\pi x}{2}\ \ \ \ \ (2)$$

The 3D plot of $u(x,t)$ in (2) is



References:

David Betounes, Partial Differential Equations for Computational Science with Maple and Vector Analysis, TELOS, Springer-Verlag