# L14 ###### tags: `微分方程特論` ###### date: `10 June 2020` ## Non-homog. S-L BVP :film_frames: https://reurl.cc/E7vzLm 00:00 If we define the linear operator $L[y]\equiv-(py')'+qy$, then the non-homog. S-L BVP can be written as $$L[y]=\mu ry+f,\tag{1}$$ where $r=r(x)>0$, $f=f(x)$, $\mu$ is const., $p=p(x)>0$, $q=q(x)$; B.C.s are - $\alpha_1y(0)+\alpha_2y'(0)=0$, - $\beta_1y(1)+\beta_2y'(1)=0$. ### Method Consider $$L[y]=\lambda r y\tag{2}$$ $r=r(x)$, $\lambda$ is const. e-val: $\lambda_n,\ n=1,2,3,\dots$ e-func. : $\phi_n,\ n=1,2,3,\dots$ (orthogonal w.r.t $r$; may be orthonormal ) Let $y=\phi$ be a sol. of Eqn. (1), Then $$\phi=\sum^\infty_{n=1} b_n\phi_n,$$ with $$b_n=\int^1_0\phi(x) \phi_n(x) r(x)\text{d}x.$$ But this is useless, cuz. $\phi$ is unknown. Eqn. (1) $\implies$ $$\dfrac{1}{r}L[y]=\mu y+\dfrac{f}{r}\tag{3}$$ We can expand $\dfrac{f}{r}$ with $\phi_n$: $\displaystyle\dfrac{f}{r}=\sum^\infty_{n=1} c_n\phi_n$, and the coefficients are $\displaystyle\require{cancel}c_n=\int^1_0\dfrac{f(x)}{\cancel{r(x)}} \phi_n(x)\cancel{r(x)}\text{d}x=\int^1_0f(x)\phi_n(x)\text{d}x$ Sub. $\phi$ into Eqn. (3), then - LHS of Eqn. (3) $=\displaystyle\frac{1}{r}L[\phi]=\frac{1}{r}L\left[\sum^\infty_{n=1} b_n\phi_n\right]=\frac{1}{r}\sum^\infty_{n=1}b_nL[\phi_n]=\frac{1}{\cancel{r}}\sum^\infty_{n=1}b_n\lambda_n \cancel{r}\phi_n=\sum^\infty_{n=1}b_n\lambda_n \phi_n$ - RHS of Eqn. (3) $=\displaystyle \mu \phi+\dfrac{f}{r}=\mu\sum^\infty_{n=1}\left(b_n\phi_n\right)+\sum^\infty_{n=1}\left(c_n\phi_n\right)=\sum^\infty_{n=1}\left(\mu b_n+c_n\right)\phi_n$ - Thus, Eqn. (3) yields $$\begin{align}\sum^\infty_{n=1}b_n\lambda_n \phi_n=\sum^\infty_{n=1}\left(\mu b_n+c_n\right)\phi_n\\\implies\sum^\infty_{n=1}\left[(\mu-\lambda_n)b_n+c_n\right]\phi_n=0.\tag{4}\end{align}$$ :film_frames: https://reurl.cc/E7vzLm 15:26 Coefficients should vanish: $$(\mu-\lambda_n)b_n+c_n=0.\tag{5}$$ Here, - $\mu$ is given, - $\lambda_n$ are calculated out of Eqn. (2) (homog. S-L B.V.P.), and - $c_n$ are obtained by expanding $f(x)/r(x)$, while - only $b_n$ are unknown. Solve Eqn. (5): 1. If $\mu\neq\lambda_n$ for all $n=1,2,\ldots$, then $b_n=\dfrac{c_n}{\lambda_n-\mu}$, (i.e. every $b_n$ is calculable.) 2. If $\mu=\lambda_n$ for some $n=m$, then $\underbrace{(\mu-\lambda_m)}_{=\,0}b_m+c_m=0$ and: 1. if $c_m\neq 0$, then there is inconsistency and no solution of $\phi$ exists; 2. if $c_m=0$, then $b_m$ is arbitrary, and as for other $n\neq m$, we always have $b_n=\dfrac{c_n}{\lambda_n-\mu}$; hence, there are infinite many solutions of $\phi$. ### Example :film_frames: https://reurl.cc/E7vzLm 23:00 (Example , p. ) $\left\{\begin{array}{l}y''+2y=-x\quad(0<x<1);\\y(0)=0,\quad y(1)+y'(1)=0\end{array}\right.\tag{6}$ #### Solution 1. Comparing Eqn. (6) with Eqn. (1), we recognize $\underbrace{-y''}_{\equiv\,L[y]}=\underbrace{2}_{\equiv\,\mu}y+\underbrace{x}_{\equiv\,f(x)}=0$; $(r(x)\equiv 1)$. 2. Consider the homog. S-L B.V.P. $$\left\{\begin{array}{l}-y''=\lambda y\quad(0<x<1);\\y(0)=0,\quad y(1)+y'(1)=0\end{array}\right.,\tag{7}$$ of which solution is - eigenvalues: $\boxed{\lambda_n},\ (n=1,2,\ldots)$ that satisfies $$\sin\left(\sqrt{\lambda_n}\right)+\sqrt{\lambda_n}\cos\left(\sqrt{\lambda_n}\right)=0;$$ - (orthonormal) eigenfunctions: $\phi_n(x)=k_n\sin\left(\sqrt{\lambda_n}x\right)$, with $k_n=\sqrt{\dfrac{2}{1+\cos^2\sqrt{\lambda_n}}},\ (n=1,2,\ldots)$ 3. :film_frames: https://reurl.cc/E7vzLm 28:24 Let $\phi$ be a solution of Eqn. (6) and expand $\phi(x)$ and $f(x)/r(x)$ in terms of $\{\phi_n\}$ by $$\phi(x)=\sum^\infty_{n=1}b_n\phi_n(x),\\\dfrac{f(x)}{r(x)}=\sum^\infty_{n=1}c_n\phi_n(x);$$ where $b_n$ are underdetermined and $c_n$ are calculated by $$\begin{align}c_n&=\int^1_0 f(x)\phi(x)\text{d}x\\&=\int^1_0 xk_n\sin\left(\sqrt{\lambda_n}x\right)\text{d}x\\&=k_n\int^1_0 x\sin\left(\sqrt{\lambda_n}x\right)\text{d}x=\cdots\\&=\dfrac{2\sqrt{2}\sin\left(\sqrt{\lambda_n}\right)}{\lambda_n\left[1+\cos^2\left(\sqrt{\lambda_n}\right)\right]^{1/2}}\end{align}$$ 4. Since $\lambda_n>\mu=2$ for all $n$ $(\lambda_1\approx 4.116, \lambda_2\approx24,14,\ldots)$, $b_n$ are determined by $$\boxed{b_n=\dfrac{c_n}{\lambda_n-\mu}=\dfrac{2\sqrt{2}\sin\left(\sqrt{\lambda_n}\right)}{(\lambda_n-2)\lambda_n\left[1+\cos^2\left(\sqrt{\lambda_n}\right)\right]^{1/2}}},$$ and $\phi(x)=\sum^\infty_{n=1}b_n\phi_n(x)$ is a solution. $\blacksquare$ --- ### Non-homog. Heat Equation :film_frames: https://reurl.cc/E7vzLm 37:21 $\left\{\begin{array}{l}u_t=u_{xx}+f(x,t),\quad(0<x<1,\ t>0);\\\text{two boundary conditions},\\u(x,0)=g(x).\end{array}\right.\tag{8}$ #### Method :film_frames: https://reurl.cc/E7vzLm 38:50 1. Solve the homog. S-L B.V.P. $$\left\{\begin{array}{l}v_t=v_{xx},\quad(0<x<1,\ t>0);\\\text{two boundary conditions}.\end{array}\right.\tag{9}$$ 1. Use the separation of variables $v(x,t)=X(x)T(t)$ to write $$X''(x)+\lambda X(x)=0,\\T'(t)+\lambda T(t)=0.$$ 2. Solve $$\left\{\begin{array}{l}X''(x)+\lambda X(x)=0,\quad(0<x<1);\\\text{two boundary conditions for } x.\end{array}\right.\tag{9}$$ and find - e-val. $\lambda_n,\ (n=1,2,\ldots)$ - (orthonormal) e-func. $\phi_n(x),\ (n=1,2,\ldots)$ 2. Suppose $$\boxed{u(x,t)=\sum^\infty_{n=1}b_n(t)\phi_n(x)}$$ is a solution of Eqn. (9) and suppose $$f(x,t)=\sum^\infty_{n=1}\gamma_n(t)\phi_n(x),$$ where $$\boxed{\gamma_n(t)=\int^1_0f(x,t)\phi_n(x)\,\text{d}x}$$ 3. Substitute the above into $u_t=u_{xx}+f(x,t)$: $$\begin{align}&\sum^\infty_{n=1}b'_n(t)\phi_n(x)=\sum^\infty_{n=1}b_n(t)\underbrace{\phi''_n(x)}_{=-\lambda_n\phi_n(x)}+\sum^\infty_{n=1}\gamma_n(t)\phi_n(x)\\&\implies \sum^\infty_{n=1}\left[b'_n(t)+\lambda_n b_n(t)-\gamma_n(t)\right]\phi_n(x)=0\\&\implies b'_n(t)+\lambda_n b_n(t)-\gamma_n(t)=0.\tag{11}\end{align}$$ Eqn. (11) is a first-order ODE of $t$. 4. Let $b_n(0)\equiv B_n$ and apply I.C. $u(x,0)=g(x)$: $$u(x,0)=\sum^\infty_{n=1}b_n(0)\phi_n(x)=\sum^\infty_{n=1}B_n\phi_n(x)=g(x),$$ with $$\boxed{B_n=\int^1_0g(x)\phi_n(x)\text{d}x}.$$ 5. For $n=1,2,\ldots$, Eqn. (11) accompanied with $b_n(0)=B_n$ forms an I.V.P. $$\left\{\begin{array}{l}b'_n(t)+\lambda_n b_n(t)-\gamma_n(t)=0,\quad(t>0);\\b_n(0)=B_n.\end{array}\right.\tag{12}$$ Use the calculated $\gamma_n$ and $B_n$ to solve Eqn. (12) to obtain $\boxed{b_n(t)}$. And finally, the supposed $u(x,t)$ is a solution of Eqn. (8). $\blacksquare$ --- ### Example :film_frames: https://reurl.cc/4RMalX 00:00 $\left\{\begin{array}{l}u_t=u_{xx}+\underbrace{3-3|1-2x|}_{\equiv\,f(x,t)},\quad(0<x<1,\ t>0)\\u(0,t)=0,\quad u(1,t)=0,\\u(x,0)=0.\end{array}\right.\tag{13}$ #### Solution 1. Solve the homog. S-L B.V.P. $$\left\{\begin{array}{l}v_t=v_{xx},\quad(0<x<1,\ t>0)\\v(0,t)=0,\quad v(1,t)=0.\end{array}\right.\tag{14}$$ 1. Let $v(x,t)=X(x)T(t)$ to write $$X''(x)+\lambda X(x)=0,\\T'(t)+\lambda T(t)=0.$$ 2. $u(0,t)=0\implies X(0)=0$, $u(1,t)=0\implies X(1)=0$. 3. Solve $$\left\{\begin{array}{l}X''(x)+\lambda X(x)=0,\quad(0<x<1);\\X(0)=0,\quad X(1)=0\end{array}\right.\tag{15}$$ and find - e-val.: $\boxed{\lambda=(n\pi)^2},\ (n=1,2,\ldots)$ - (orthonormal) e-func.: $\phi_n(x) =\sqrt{2}\sin(n\pi x),\ (n=1,2,\ldots)$ 2. Suppose $$\boxed{u(x,t)=\sum^\infty_{n=1}b_n(t)\phi_n(x)}$$ is a solution of Eqn. (9) and suppose $$f(x,t)=3-3|1-2x|=\sum^\infty_{n=1}\gamma_n(t)\phi_n(x),$$ where ([graph](https://www.desmos.com/calculator/1tccotl1tc) of $f(x,t)\phi(x)$) $$\begin{align}\boxed{\gamma_n(t)}&=\int^1_0 f(x,t)\phi_n(x)\,\text{d}x\\&=\int^1_0\left(3-3|1-2x|\right)\sqrt{2}\sin(n\pi x)\,\text{d}x\\&=6\sqrt{2}\int^1_{1/2}\left(2x\right)\sin(n\pi x)\,\text{d}x\\&=\boxed{\dfrac{12\sqrt{2}\sin\left(\frac{n\pi}{2}\right)}{n^2\pi^2}},\quad n=1,2,\ldots,\end{align}$$ which happens to not depend on $t$. 3. Substitute the above into $u_t=u_{xx}+f(x,t)$: $$\begin{align}&\sum^\infty_{n=1}b'_n(t)\phi_n(x)=\sum^\infty_{n=1}b_n(t)\underbrace{\phi''_n(x)}_{=-\lambda_n\phi_n(x)}+\sum^\infty_{n=1}\gamma_n\phi_n(x)\\&\implies \sum^\infty_{n=1}\left[b'_n(t)+\lambda_n b_n(t)-\gamma_n\right]\phi_n(x)=0\\&\implies b'_n(t)+\lambda_n b_n(t)-\gamma_n=0,\end{align}$$ which is a first-order ODE of $t$. 4. :film_frames: https://reurl.cc/4RMalX 09:48 Apply I.C. $u(x,0)=0$: $$u(x,0)=\sum^\infty_{n=1}b_n(0)\phi_n(x)=\sum^\infty_{n=1}b_n(0)\sin(n\pi x)=0,$$ there follows $b_n(0)=0$ for all $n$. 5. Thus we solve $b_n(t)$ with the I.V.P. $$\begin{align}&\left\{\begin{array}{l}b'_n(t)+\lambda_n b_n(t)-\gamma_n=0,\quad(t>0);\\b_n(0)=0\end{array}\right.\tag{15}\\\implies&b_n(t)=e^{-\int \lambda_n\text{d}t}\left[\int\left(-\gamma_ne^{\int \lambda_n\text{d}t}\right)\text{d}t+C_n\right]\\&\phantom{b_n(t)}=-\gamma_n \cancel{e^{-\lambda_n t}}\dfrac{\cancel{e^{\lambda_n t}}}{\lambda_n}+C_ne^{-\lambda_n t}\\&\phantom{b_n(t)}=-\dfrac{\gamma_n}{\lambda_n}+C_ne^{-\lambda_n t};\end{align}$$ but $b_n(0)=0\implies C_n=\dfrac{\gamma_n}{\lambda_n}$. Thus, $$\boxed{b_n(t)=\dfrac{\gamma_n}{\lambda_n}\left(-1+e^{-\lambda_n t}\right)},\ n=1,2,\ldots$$ and the supposed $u(x,t)$ is a solution of Eqn. (13). $\blacksquare$