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)$