Let's revisit the heat equation: The first time the heat equation was introduced, we figured out that it's solution was of the form $u(t,x)=\sum_{n=1}^\infty c_{n}e^{-(n\pi/L)^2Dt}\sin\left( \frac{n\pi x}{L} \right)$ Now that we learned about fourier series and eigen value problems, we can finally solve it! (for a given specific case.) IBVP of heat eq: $\frac{ \partial u }{ \partial t }=D\frac{ \partial^{2} u }{ \partial x^{2} }$ for $0\leq x\leq L$ for $t>0$ $u(t,0)=u(t,L)=0, \quad t>0$ $u(0,x)=f(x), \quad 0\leq x\leq L$ lets choose $L=\pi$ $f(x)=\begin{cases}-x & 0\leq x\leq \frac{\pi}{2} \\1-x & \frac{\pi}{2}"\[...\]. Very interesting problem." -Prof (I agree.) If we made this a series, where would it converge? Well it's continuous from 0 to pi and its windowed form when repeated will be convergent everywhere, this is good news for us. Separation of variables: $u(t,x)=T(t)X(x)$ theres a theorem that this will give a unique solution. $T'X=DTX''$ $\frac{T'}{DT}=\frac{X''}{X}$ LHS is a function of t only , RHS is function of x only. "I don't know what is time, I know space, I can take a step and see the step I take, but can you see time? Can you see the future? Some can but I can't." -prof. Very philosophical. $X''+\lambda X=0$ where $X(0)=X(L=\pi)=0$ $u(t,0)=T(t)X(0)=0$ case 1) $\lambda<0$, $r_{1,2}=\pm \sqrt{ -\lambda }$ $X(x)=c_{1}e^{ \sqrt{ -\lambda }x }+c_{2}e^{ -\sqrt{ -\lambda }x }$ $X(0)=c_{1}+c_{2}=0$ $X(\pi)=c_{1}e^{ \sqrt{ -\lambda }\pi }+c_{2}e^{ -\sqrt{-\lambda }\pi }=0$ $c_{1}=c_{2}=0$ we will continue the problem in the next lecture. #end of lec 30 #start of lec 31 "Can we skip the assignment?" Petar replies: You have a choice, not just in math but in life, confusions says there's three things you cant take back opportunity to do something, time, and your word so do your last assignment and don't pass up the opportunity! recall last lec: $\frac{ \partial u }{ \partial t }=\frac{ \partial u^2 }{ \partial x^2 }, 0\leq x\leq \pi, t>0$ $u(t,0)=u(t,\pi)=0, t>0$ <- Dirichlet (french mathematician) IVP. $u(0,x)=f(x), \quad 0\leq x<\pi$ $f(x)=\begin{cases}-x, & 0\leq x\leq \frac{\pi}{2} \\x-\pi, & \frac{\pi}{2}{\leq x\leq \pi}\end{cases}$ graph of tube when t=0. here. $u(t,x)=T(t)X(x)$ $=X+\lambda X=0, \quad X(0)=X(\pi)=0$ case 1) $\lambda<0 \implies$ $X(x)=0$ case 2) $\lambda=0 \implies X(x)==0$ $X(0)=0=c_{2}$ $X(\pi)=0=c_{1}\pi$ case 3) $\lambda>0$ $X(x)=c_{1}\cos(\sqrt{ \lambda }x)+c_{2}\sin(\sqrt{ \lambda }x)$ $X(0)=c_{1}=0$ $X(\pi)=0=c_{2}\sin(\sqrt{ \lambda }\pi)\implies \sqrt{ \lambda }\pi=n\pi\quad n=1,2,\dots$ $\lambda_{n}=n^2$ a countable infinitely many lambdas (taggable with an index) real numbers are uncountable "what is a point? a point on a screen on a peice of paper?" (We have lost our minds) $X_{n}(x)=c_{2}\sin(nx)$ but obviously, we don't need the multiples of an eigen value so we set $c_{2}=1$ (or any arbitrary non zero constant) $X_{n}(x)=\sin(nx)$ $u(t,x)=T(t)X(x)$ $\frac{T'}{T}=-n^2$ integrate both sides: $T_{n}(t)=b_{n}e^{-n^2t}$ $u_{n}(t,x)=b_{n}e^{-n^2t}\sin(nx), n=1,2,\dots$ $u(t,x)=\sum_{n=1}^\infty b_{n}e^{-n^2t}\sin(nx)$ $u(0,x)=f(x)=\sum_{n=1}^\infty b_{n}\sin(nx)$ $b_{n}=\frac{2}{\pi}\int _{0}^\pi f(x)\, dx$ $b_{n}=\frac{2}{\pi}[-\int _{0} ^\frac{\pi}{2} x\sin(nx) \, dx+\int _{\frac{\pi}{2}} ^\pi x\sin(nx) \, dx-\pi \int _{\frac{\pi}{2}} ^\pi \sin(nx)\, dx]$ $\int x\sin(nx) \, dx=-\frac{1}{n}\left( x\cos(nx)-\int \cos(nx) \, dx \right)$ $=-\frac{1}{n}\left( x\cos(nx)-\frac{1}{n}\sin(nx) \right)=\frac{1}{n^2}\sin(nx)-\frac{1}{n}x\cos(nx)$ bla bla bla, we get that $b_{n}$ is: $b_{n}=\frac{2}{\pi}\left[ \frac{\pi}{2n}\cos \frac{n\pi}{2}-\frac{1}{n^2}\sin \frac{n\pi}{2}-\frac{1}{n^2}\sin \frac{n\pi}{2}-\frac{\pi}{n}(-1)^n +\frac{\pi}{2n}\cos \frac{n\pi}{2}+\frac{\pi}{n}(-1)^n-\frac{\pi}{n}\cos \frac{n\pi}{2} \right]$ $b_{n}=-\frac{4}{n^2\pi}\sin \frac{n\pi}{2}, \quad n=1,2,\dots$ $n=2k\implies b_{2k}=0, \quad k=1,2,\dots$ $n=2k-1\implies b_{2k-1}=-\frac{4}{(2k+1)^2\pi}(-1)^{k+1}, \quad k=1,2,\dots$ $b_{2k-1}=\frac{4}{(2k+1)^2\pi}(-1)^{k}$ $$u(t,x)=\sum_{n=1}^\infty \frac{(-1)^k}{(2k-1)^2}e^{-(2k-1)^2t}\sin((2k-1)x)$$ notice that the limit of the sum as $t\to \infty$ is $0$ graph time! But oh no! He forgot the plot from the last lecture, i went to grab it for him. While I was gone, I heard he shared stories about his family. Unfortunately I missed it. if you imagine the plot was showing conc. of co2 in a room, it follows a similar curve as time goes on as the gas diffuses. (5 more lectures, left) $k\frac{ \partial u }{ \partial x }=0$ where $k$ is the thermal conductivity, $\frac{ \partial u }{ \partial x }=0|_{00$ $\frac{ \partial u }{ \partial x }(t,0)=\frac{ \partial u }{ \partial x }(t,L)=0, \quad t>0$ $u(0,x)=f(x) \quad 0\leq x\leq \pi$ #end of lec 31 #start of lec 32 back to the heat problem we do the Neumann problem, start with separation of variables. assume we can seperate the variable into two different functions: $u(t,x)=T(t)X(x)$ plug into: $\frac{ \partial u }{ \partial t }=D\frac{ \partial^2 u }{ \partial x^2 }$ $T'X=DTX''$ $\frac{T'}{DT}=\frac{X''}{X}=-\lambda$ $X''+\lambda X=-\lambda$ second order DE. $u(t,x)=T(t)X(x) \implies$ $T'(0)\cancel{ T(t) }=0$ divide out $T$ then the boundary conditions are $X''+\lambda X=0 \quad X'(0)=0 \quad X'(L)=0$ reminisient of dirchett problem conditions. the two edges are insulated here.
case 1) $\lambda<0 \implies X(x)=c_{1}e^{\sqrt{ -\lambda }x}+c_{2}e^{-\sqrt{ -\lambda }x}$ $X'(0)=0+c_{1}\sqrt{ -\lambda }-c_{2}\sqrt{ -\lambda }=0$ $X'(L)=0$ $c_{1}\sqrt{ -\lambda }e^{\sqrt{ -\lambda }L}-c_{2}\sqrt{ -\lambda }e^{-\sqrt{ -\lambda }L}$ $\implies c_{1}=c_{2}$
case 2) $\lambda=0$ $X(x)=c_{1}x+c_{2}$ $X'(0)=c_{1}=0$ $X'(L)=c_{1}=0$ $\implies X_{0}(x)=1$ the rest are constant multiples, we could pick any non zero constant.
case 3) $\lambda>0$ $X(x)=c_{1}\cos(\sqrt{ \lambda }x)+c_{2}\sin(\sqrt{ \lambda }x)$ $X'(0)=-c_{1}\sqrt{ \lambda }\sin(0)+c_{2}\sqrt{ \lambda }\cos(\sqrt{ \lambda }0)=0 \implies c_{2}=0$ $X'(L)=-c_{1} \sqrt{ \lambda }\sin(\sqrt{ \lambda }L)=0 \implies c_{1}\sin(\sqrt{ \lambda }L)=0$ $$\implies \lambda_{n}=\left( \frac{n\pi}{L} \right)^2 \qquad n=1,2,\dots$$ $$X_{n}(x)=\cancel{ c_{1} }\cos\left( \frac{n\pi x}{L} \right)$$ Any constant multiple of an eigen function is an eigen function so we get rid of the $c_{1}$. This is a different result than what we got last time, good to note.
$\frac{T_{n}'}{DT_{n}}=-(\frac{n\pi}{L})^2$ for $n=0,1,2,\dots$ $T_{n}(t)=c_{n}e^{-D(n\pi/L)^2t}$ $u(t,x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}e^{-D(n\pi/L)^2t}\cos\left( \frac{n\pi x}{L} \right)$ $a_{0}=2c_{0}$ $a_{n}=c_{n}$ $u(0,x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n }\cos\left( \frac{n\pi x}{L} \right)=f(x)$ this is a fourier cos series, last time we had a fourier sin series. $a_{0}=\frac{2}{L}\int _{0}^Lf(x) \, dx$ $a_{n}=\frac{2}{L}\int _{0}^L f(x)\cos\left( \frac{n\pi x}{L} \right)\, dx$ plug these into the solution kaboom we have a solution to the problem in the form of a fourier series. $u(t,x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}e^{-D(n\pi/L)^2t}\cos\left( \frac{n\pi x}{L} \right)$ and this is called a formal solution. do you remember the two rules for convergance for fourier series? theorems are not rules they are not axioms. a rule is given, you dont prove it, theorems are what you prove. $D=1, L=\pi, f(x)=\begin{cases}1, & 0\leq x\leq \frac{\pi}{2} \\0, & \frac{\pi}{2}0$ $e^x$ is called a source term, a source of heat. $u(t,0)=-1 \quad u(1,t)=-e \qquad t>0$ $u(0,x)=\sin(\pi x)+e^x, \qquad 0\leq x\leq 1$ we expect that the solution is two solutions, that are summed together due to superposition. where one of the terms does not depend on time. ie: $u(t,x)=w(t,x)+v(x)$ v is the steady state term, w is transient. plug in: $\frac{ \partial w }{ \partial t }=\frac{ \partial^2 w }{ \partial x^2 }+v''(x)+e^x$ v double prime because v is a function of one variable. $w(t,0)+v(0)=-1$ $w(t,1)+v(t)=-e$ and $w(t,x)\to_{t\to \infty}0$ (transient term decays to zero.) $\frac{ \partial w }{ \partial t }, \frac{ \partial w }{ \partial x }\underset{ t\to \infty }{ \to }0$ $\frac{ \partial w }{ \partial t }=\frac{ \partial^2 w }{ \partial x^2 }+v''(x)+e^x\to_{t\to \infty}v''+e^x=0$ and the boundaries as t->infty: $v(0)=-1$ $v(1)=-e$ $v''=-e^x, \qquad v(0)=-1 \quad v(1)=-e$ do you agree? please be awake this is an important class. $w(t,0)=w(t,1)=0$ $t>0$ integrate twice: $v(x)=-e^x+c_{1}x+c_{2}$ $v(0)=-1+c_{2}=-1$ $\implies c_{2}=0$ $v(1)=-e=-e+c_{1}$ $c_{1}=0$ $v(x)=-e^x$ $u(0,x)=\sin(\pi x)+e^x$ $w(0,x)-e^x=\sin(\pi x)+e^x$ $w(0,x)=\sin(\pi x)+2e^x$ <- a new condition. we have thus transformmed the problem to a problem we can solve with previous tools: $\frac{ \partial u }{ \partial t }=\frac{ \partial^2 u }{ \partial x^2 } \quad 0\leq x\leq 1 \quad t>0$ $w(t,0)=w(t,1)=0\quad t>0$ $w(0,x)=\sin(\pi x)+2e^x, \quad 0\leq x\leq 1$ solve this with seperation of variables, solve the eigen value problem. $w(t,x)=T(t)X(x)$ $\frac{T'}{T}=\frac{X''}{X}=-\lambda$ skip some steps and the eigen value and functions are: $\lambda_{n}=(n\pi)^2, n=1,2,\dots$ $X_{n}(x)=\sin(n\pi x)$ $\frac{T_{n}'}{T_{n}}=-(n\pi)^2\implies T_{n}(t)=b_{n}e^{-(n\pi)^2t}\sin(n\pi x)$ "each time we introduce the heat equation, we are adding one extra step at a time, really everything else is the same and after you practice 2 or 3 times youll get it."" $w(t,x)=\sum_{n=1}^\infty b_{n}e^{-(n\pi)^2t}\sin(n\pi x)$ $w(0,x)=\sin \pi x+2e^x=\sum_{n=1}^\infty b_{n}\sin(n\pi x)$ that series is nothing but: $b_{1}\sin(\pi x)+b_{2}\sin(2\pi x)+\dots$ move sinpix to RHS: $2e^x=(b_{1}-1)\sin(\pi x)+b_{2}\sin(2\pi x)+b_{3}\sin(3\pi x)+\dots$ or you could say: $=\sum_{n=1}^\infty c_{n}\sin(\pi x)$ $c_{1}=b_{1}-1$ $c_{k}=b_{k}, \quad k=2,3,\dots$ we do this because by combining the sin term we get to skip an integral to compute. "if you start paniking on the exams youre done. your fried." now we need the fourier sin series of $2e^x$ $c_{n}=2\cdot\frac{2}{1}\int_{0}^1 e^x\sin(n\pi x) \, dx$ we have to solve this by integration by parts how's math 209 going? "stokes theorem i mean for electrical engineers its a must." $c_{n}=4(e^x\cancelto{ 0 }{ \sin(n\pi x) }|_{0} ^1-n\pi \int _{0}^1 e^x\cos(n\pi x)\, dx$ $=-4n\pi\left( e^x\cos(n\pi x)|_{0}^1+n\pi \int _{0}^1 e^x\sin(n\pi x)\, dx \right)=-4n\pi(e(-1)^n-1)-4n^2\pi^2\int _{0}^1 e^x\sin(n\pi x)\, dx$ $(1+n^2\pi^2)\int_{0}^1 e^x\sin(n\pi x) \, dx=n\pi(1-)$...(missed) $c_{n}=4\int _{0}^1 e^x\sin(n\pi x)\, dx=\frac{4n\pi(1-e(-1)^n)}{1+(n\pi)^2}$ $b_{1}=c_{1}+1=\frac{4\pi(1+e)}{1+\pi^2}+1$ $b_{n}=\frac{4n\pi(1-e(-1)^n)}{1+(n\pi)^2}, \quad n=2,3,\dots$ $$u(t,x)=-e^x+w(t,x)=-e^x+\sum_{n=1}^\infty b_{n}e^{-(n\pi)^2t}\sin(n\pi x)$$ 41 minutes to solve, maybe 5 minutes more for solving the eigen value part. might take 15 on an exam setting. back in the day written exam there was 4 hours, 2to3 questions and then there was an oral exam with your professoor to explain what you wrote. one time he stayed for 8 hours, being cycled back and forth through the line until the professor was satisfied with minev's answer. almost everyone would take above undergrad degree, 3yrs to finish undergrad +2 more years total. (if i didnt mishear him) "first year was the most difficult by ffar, a massacure, half of us would fail. your chances in an exam were 1 of 2." ok i spent 5 minutes talking nonsense but you complaining that your exams are hard theyre not hard. I'm talking about 40 years ago, no computers no cellphones, and it wasnt so bad because we had to use our brain more. now we consider a guitar string: ![[Partial differential equations (lec 30-32) 2023-12-01 13.49.58.excalidraw]] assuming the thickness of the string is much smaller than the length of the string, which is true. $\frac{ \partial u^2 }{ \partial t^2 }=\alpha^2 \frac{ \partial^2 u }{ \partial x^2 } \quad 0\leq x\leq L, t>0$ ^ Reminds me of the wave equation from phys 130. $u(t,0)=u(t,L)=0 \qquad t>0$ $u(0,x)=f(x)$ $0\leq x\leq L$ $\frac{ \partial u }{ \partial t }(0,x)=g(x)$ $0\leq x\leq L$ #end of lec 33