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, we can compute the values of $c_{n}$ and finally solve it!
#ex #PDE
Solve the following PDE (find $u(t,x)$)
IBVP of heat eq:
$$\begin{cases}\frac{ \partial u }{ \partial t }=D\frac{ \partial^{2} u }{ \partial x^{2} } \text{ for } 0\leq x\leq L, \quad t>0\\u(t,0)=u(t,L)=0, \quad t>0\\u(0,x)=f(x), \quad 0\leq x\leq L\quad\end{cases}$$
>Psst, There's a shortcut, we have the same boundary conditions, the exact same IBVP that we solved for a general case. We can just plug in using the formula we derived earlier.
>All you have to do now is compute the Fourier transform of $f(x)$ to find the $c_{n}$ coefficients.
>Besides, the computations below for finding the eigen values and eigen function follow the exact same steps we had in lectures 26 and 27. So if you saw that and understood it, feel free to skip ahead to where we compute $c_{n}$
The initial temperature of the tube (at $t=0$) looks like this:
So we have a non-uniformly heated rod with both ends held at zero temperature. What happens to the temperature inside the rod over time? <i>"[...]. Very interesting problem."</i> -Prof (I agree.)
If we expressed $f(x)$ as a Fourier series, where would it converge? Well it's continuous from $0$ to $\pi$ and its windowed form when repeated will be continuous on $(-\infty,\infty)$ furthermore, the derivative of this function is piecewise continuous on $[-\pi,\pi]$ therefore, it will be convergent everywhere (second convergence theorem). This is good news for us.
We do separation of variables as we did before: $u(t,x)=T(t)X(x)$
There's a theorem that this will give a unique solution. (Not proved in class.)
Plug into $\frac{ \partial u }{ \partial t }=D\frac{ \partial^{2} u }{ \partial x^{2} }$ where in this case, $D=1$
$T'X=DTX''$
$\frac{T'}{DT}=\frac{X''}{X}=-\lambda$
LHS is a function of $t$ only , RHS is function of $x$ only. The only time they can ever equate to each other if both of them equal some constant value(s) $\lambda$. The reason it's $-\lambda$ is because it doesn't matter, it's a constant and making it negative helps make rearranging the equation easier.
<i>"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."</i> -prof.
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,
Confucius 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 } \qquad 0\leq x\leq \pi \qquad t>0$
Notice that the limit of the sum as $t\to \infty$ is $0$. The bar cools down eventually.
Graph time! But oh no! He forgot the plot from the last lecture, I went to grab it for him.
(Image below is shown with explicit permission granted. I like how it captures the ambiance of being in a lecture. I feel like it makes my notes feel more real. And look at my prof!!! He looks killer in that knitted argyle sweater.)
![image](drawings/heat.jpg)
While I was gone, I heard he shared stories about his family. Unfortunately I missed it.
You can see that the original spike quickly gets rounded over as the temperature across the tube smooths out and eventually approaches $0$ everywhere. Energy is not conserved in this system as it is not a closed system. The outside world is holding the two ends at a constant $0$ temperature.
If you imagine the plot was showing the concentration of CO$_{2}$ in a room, it follows a similar curve as time goes on and the gas diffuses. Isn't that neat?
By the way, there are only 5 more lectures left.
</br>
Imagine instead of holding the two ends of the rod with a temperature of zero, we insulated the two ends.
How do we insulate the ends? Set the heat flux at the ends to $0$:
$k\frac{ \partial u }{ \partial x }(t,0)=k\frac{ \partial u }{ \partial x }(t,L)=0$ <-$k$isthethermalconductivityofthetube.
This gives a new equation type: Neumann type. (Neumann type means information about the derivative is specified, rather than the actual value. There's also such thing as a mixed boundary condition, where maybe one end of the tube is insulated and the maybe other end is held at $0$.)
We don't need the multiples of an eigen value, so we can set $c_{n}=1$ (or any arbitrary non zero constant). However, I will keep it just so you can see how it's redundant and gets removed in a later step anyways.
>This result is different than what we got last time, for comparison, the Dirichlet problem gave us the same expression for $\lambda_{n}$ however the $X_{n}(x)$ was $X_{n}(x)=c_{n}\sin\left( \frac{n\pi x}{L} \right)$
We are done, and we didn't need to take out the zero terms but if you want to be diligent, then there you go.
Plot (only showing 100 harmonics, that's why the red line looks a lil' wiggly):
![plot](drawings/insulatedheat.png)
"Can we just memorize the formula and plug in the values?"
His reply was something along the lines of:
No! Please don't, you'll put in some arbitrary values with the wrong boundary conditions and arrive with some crap result. You would need to redo the calculations and get completely new eigen values and eigen functions. I know how much you guys love formulas. But you need to understand what's happening, I don't know who thought it would be a good idea to make people memorize formulas, certainly not my idea. I want to be confident in the future engineers and the bridges that are built.
...
Reminds me of what he said when he was talking about George Green/Stokes, and how nowadays everything is McDonalds style, even our education. Maybe this is what he is referring to.
#end of lec 32
#start of lec 33 (Dec 1)
#ex
Imagine along the wire we produce some heat somehow:
$$\frac{ \partial u }{ \partial t }=\frac{ \partial^2 u }{ \partial x^2 }+\underbrace{ e^x }_{\text{ heat} } \quad 0\leq x\leq 1 \quad t>0$$
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$doubleprimebecause$v$isafunctionofonevariable.
$w(t,0)+v(0)=-1 \qquad w(t,1)+v(1)=-e$
and $w(t,x)\underset{ _{t\to \infty} }{ \longrightarrow }0$ (transient term decays to zero.)
Which implies the derivatives also equal zero: $\frac{ \partial w }{ \partial t }, \frac{ \partial w }{ \partial x }\underset{ t\to \infty }{ \longrightarrow }0$
$\frac{ \partial w }{ \partial t }=\frac{ \partial^2 w }{ \partial x^2 }+v''(x)+e^x\underset{ t\to \infty }{ \longrightarrow } v''(x)+e^x=0$
$\implies v''(x)=-e^x$
and the boundary conditions as $t\to\infty$ give: $v(0)=-1$ $v(1)=-e$
Do you agree? Please be awake this is an important class.
plugging those values into the equations $w(t,0)+v(0)=-1$ and $w(t,1)+v(1)=-e$ gives:
$w(t,0)=w(t,1)=0 \qquad \text{for}\quad t>0$
</br>
integrate $v''$ twice:
$v(x)=-e^x+c_{1}x+c_{2}$
$v(0)=-1=-1+c_{2}$
$\implies c_{2}=0$
$v(1)=-e=-e+c_{1}$
$\implies c_{1}=0$
$\implies v(x)=-e^x$
</br>
$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$ <-anewinitialcondition.
Lastly, notice that $u(t,x)=w(t,x)+v(x)=w(t,x)-e^x$
$\implies \frac{ \partial w }{ \partial t }=\frac{ \partial^2 w }{ \partial x^2 }-\cancel{ e^x }+\cancel{ e^x }$
We have thus transformed the problem to a problem we can solve with previous tools:
$\frac{ \partial w }{ \partial t }=\frac{ \partial^2 w }{ \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 separation of variables, then solve the eigen value problem just like we have done before. Alternatively, this IBVP matches the general IBVP formula we derived earlier, so we can just plug in:
"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 you'll get it."
That took 41 minutes to solve, maybe 5 minutes more if we solved the eigen value part. Overall, it might take 15 on an exam setting.
Back in the day, written exams were 4 hours long, with 2 to 3 questions and then there was an oral exam with your professor 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 didn't mishear him)
"First year was the most difficult by far, a massacre, 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, they're not hard. I'm talking about 40 years ago, no computers, no cellphones, and it wasn't so bad because we had to use our brain more.