Posted on

## 分离变量法IV：齐次方程，常数项非齐次边界

$\begin{cases}u_t-u_{xx},\qquad &0<x<\frac{\pi}{2}\\ u(0,t)=0,&u(\frac{\pi}{2})=1\\ u(x,0)=x\end{cases}$

$u_{\infty}(x)=\frac{2}{\pi}x$

$\begin{cases}v_t-v_{xx}=0,\qquad & 0<x<\frac{\pi}{2}\\ v(0,t)=0,& v(\frac{\pi}{2},t)=0\\ v(x,0)=(1-\frac{2}{\pi})x\end{cases}$

$v(x,t)=\sum_{n=1}^{\infty}b_ne^{-4n^2t}\sin(2nx)$

$u(x,t)= \frac{2}{\pi}x + \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} (1-\frac{2}{\pi}) e^{-4n^2t}\sin(2nx)$

Posted on

## 分离变量法III：齐次边界，非齐次方程，非齐次项与时间相关

$\begin{cases}u_t-u_{xx}=xt(2-t),\quad &0<x<\pi\\ u(0,t)=0,&u(\pi,t)=0 \\ u(x,0)=\sin(2x)\end{cases}$

\begin{align*}&u(x,t)=\sum_{n=1}^{\infty}T_n(t)\sin (nx)\\ &x^2t=\sum_{n=1}^{\infty}f_n(t)\sin(nx)\\ &x=\sum_{n=1}^{\infty}B_n\sin(nx)\end{align*}

\begin{align*}f_n(t)&=\frac{2}{\pi}\int_{0}^{\pi}xt(2-t)\sin(nx)dx\\ &=\frac{2}{\pi}t(2-t) \int_{0}^{\pi}x\sin(nx)dx \\ &= \frac{2}{\pi}t(2-t) \left(-\frac{x}{n}\cos(nx)+\frac{1}{n^2}\sin(nx)\right)\Bigg|_{0}^{\pi}\\ &=\frac{2(-1)^{n+1}}{n}t(2-t)\end{align*}

$B_n=\frac{2}{\pi}\int_0^{\pi}\sin(2x)\sin(nx)dx=\begin{cases}1,\quad &n=2\\ 0,& n\ne 2\end{cases}$

$u_t=\sum_{n=1}^{\infty}T'(t)\sin(nx),\quad u_{xx}=\sum_{n=1}^{\infty}-n^2T_(t)\sin(nx)$

$\sum_{n=1}^{\infty}(T’_n(t)-n^2T_n(t))\sin(nx)=\sum_{n=1}^{\infty} \frac{2(-1)^{n+1}}{n}t(2-t) \sin(nx)$

$T’_n(t)-n^2T_n(t)= \frac{2(-1)^{n+1}}{n}t(2-t), \quad n=1,2,3,\cdots$

$T_n(t)= e^{n^2t} \left(-\frac{1}{n^2}e^{-n^2t}t(2-t)-\frac{1}{n^4}e^{-n^2t}(2-2t)-\frac{2}{n^6}e^{-n^2t}+C_n\right)$

$u=\sum_{n=1}^{\infty} \left(-\frac{1}{n^2}t(2-t)-\frac{1}{n^4}(2-2t)-\frac{2}{n^6}+C_n e^{n^2t} \right) \sin(nx)$

$u(x,0)= \sum_{n=1}^{\infty}\left(-\frac{2}{n^4}-\frac{2}{n^6}+C_n\right) \sin(nx)=\sin(2x)$

\begin{align*}u(x,t)&=(4e^t+t^2-4)\sin x+\left(\frac{37}{32}e^4t-\frac{1}{4}t(2-t)-\frac{1}{16}(2-2t)-\frac{1}{32}\right)\sin 2x\\ &+\sum_{n=3}^{\infty}\left( \frac{2}{n^4}e^{n^2t}+\frac{2}{n^6} e^{n^2t} -\frac{1}{n^2}t(2-t)-\frac{1}{n^4}(2-2t)-\frac{2}{n^6} \right)\sin(nx)\end{align*}.

$u_x(0,t)=0, u_x(L,t)=0\Longrightarrow X_n(x)=\cos(\frac{n\pi x}{L})$

$u(0,t)=0, u_x(L,t)=0\Longrightarrow X_n(x)=\sin(\frac{(2k+1)\pi}{2L}x)$

$u_x(0,t)=0, u(L,t)=0\Longrightarrow X_n(x)=\cos(\frac{(2k+1)\pi}{2L}x)$

Posted on

## 分离变量法 II：齐次边界，非齐次方程，非齐次项与时间 $$t$$ 无关

$\begin{cases}u_t=\alpha^2u_{xx}+x, \qquad & 0<x<L\\ u(0,t)=0,& u(L,t)=0\\ u(x,0)=g(x)\end{cases}$

$\begin{cases}0=\alpha^2u_{\infty}^{\prime\prime}+x, \qquad & 0<x<L\\ u_{\infty}(0,t)=0,& u_{\infty}(L,t)=0\end{cases}$

$u_{\infty}^{\prime\prime}=-\frac{x}{\alpha^2}, \qquad u_{\infty}=-\frac{x^3}{6\alpha^2}+Ax+B$

$B=0, A=\frac{L^2}{6\alpha^2}, \Longrightarrow u_{\infty}= -\frac{x^3}{6\alpha^2} + \frac{L^2x}{6\alpha^2}$

$\begin{cases}v_t=\alpha^2u_{xx}, \qquad & 0<x<L\\ v(0,t)=0,& v(L,t)=0\\ v(x,0)=g(x)+ \frac{x^3}{6\alpha^2} – \frac{L^2x}{6\alpha^2} \end{cases}$

$v=\sum_{n=1}^{\infty}a_ne^{-(\frac{n\pi}{L})^2}\sin \frac{n\pi x}{L}$

$u= -\frac{x^3}{6\alpha^2} + \frac{L^2x}{6\alpha^2} + \sum_{n=1}^{\infty}a_ne^{-(\frac{n\pi}{L})^2}\sin \frac{n\pi x}{L}$

Posted on

## 分离变量法 I: 齐次方程，齐次边界条件

$\begin{cases} u_{t}-a^2u_{xx}=0,\quad & 0\le x\le L, t\geq 0 \\ u(0,t)=0, u(L,t)=0,&t\geq 0\\ u(x,0)=x,& 0\leq x\leq L \end{cases}$

$T'(t)X(x)-a^2T(t)X^{\prime\prime}(x)=0$

$\frac{T'(t)}{a^2T(t)}=\frac{X^{\prime\prime}(x)}{X(x)}$

$\frac{T'(t)}{a^2T(t)}=\frac{X^{\prime\prime}(x)}{X(x)}=-\lambda$

$\begin{array}{l} X^{\prime\prime}(x)+\lambda X(x)=0\\ T'(t)+a^2\lambda T(t)=0 \end{array}$

$\begin{cases} X^{\prime\prime}(x)+\lambda X(x)=0, 0\le x\le L\\ X(0)=0, X(L)=0 \end{cases}$

$r^2+\lambda=0$

$r_{1,2}=\pm\sqrt{-\lambda}$

$X(x)=C_1e^{\mu x}+C_2e^{-\mu x}$

$X(x)=C_1\sinh(\mu x)+C_2\cosh(\mu x)$

$X(x)=C_1x+C_2.$

$X(x)=C_1\cos(\mu x)+C_2\sin(\mu x)$

$\mu=\frac{n\pi}{L}, n=1,2,\cdots$

$X_n=\sin(\frac{n\pi x}{L}),$

$\begin{cases} X”(x)+\lambda X(x)=0, 0\le x\le L\\ X(0)=0, X(L)=0 \end{cases}$

$T'(t)+a^2\lambda T(t)=0$

$T'(t)+a^2(\frac{n\pi}{L})^2 T(t)=0$

$T_n(t)=A_ne^{-\frac{a^2n^2\pi^2}{L^2}t}$

$u_n=T_n(t)X_n(x)=A_ne^{-\frac{a^2n^2\pi^2}{L^2}t}\sin(\frac{n\pi x}{L})，n=1,2,\cdots$

$u(x,t)=\sum_{n=1}^{\infty}u_n=\sum_{n=1}^{\infty}A_ne^{-\frac{a^2n^2\pi^2}{L^2}t}\sin(\frac{n\pi x}{L})$

$f(x)=\sum_{n=1}^{\infty}A_n\sin(\frac{n\pi x}{L})$

$A_n=\frac{2}{L}\int_0^L f(x)\sin(\frac{n\pi x}{L})dx$

$u(x,t)=\sum_{n=1}^{\infty}u_n=\sum_{n=1}^{\infty}(\frac{2}{L}\int_0^L f(x)\sin(\frac{n\pi x}{L})dx)e^{-\frac{a^2n^2\pi^2}{L^2}t}\sin(\frac{n\pi x}{L})$