I am learning to use PDEs to solve the heat equation. I am following along with example 1 on this website. I am having trouble implementing the boundary conditions. The problem is:

\begin{equation} u_{t} = ku_{xx}\\ \end{equation}

\begin{equation} u(x,0) = f(x) \\ u(0,t) = u(L,t) = 0 \end{equation}

I completely understand the derivation and solution up until they implement the boundary conditions. They argue:


This is all well and good for $u(0,t) = u(L,t) = 0$, but I am trying to extend this problem. What if $u(0,t) = u(L,t) = T$? Can you still use this argument? Or, is there a better argument to be had?

Implementing boundary conditions is the part that I struggle the most with.


1 Answer 1


Unfortunately the answer here depends quite strongly on the particular boundary conditions of interest. Sometimes, especially with inhomogeneous boundary conditions, there is no easy answer, other times there is one. In your particular case, you can observe that $u(t,x)=T$ is a solution to the heat equation, so you can introduce $v(t,x)=u(t,x)-T$, then $v(t,x)$ will solve the heat equation with homogeneous boundary conditions instead. But if instead you had time dependent boundary conditions or something like that, this recipe would generally not work.

  • $\begingroup$ It is pretty much always possible to come up with a function $w(x,t)$ such that $v(x,t)=u(x,t)-w(x,t)$ has zero boundary conditions. In general, however, the new equation for $v$ will be non-homogeneous, but still is amenable to the separation of variables. $\endgroup$
    – Artem
    Commented Feb 24, 2016 at 23:19
  • $\begingroup$ Just a question about terminology: are any boundary conditions where $u(0,t) = u(L,t) \neq 0$ called inhomogeneous? eg. in this case where $u(0,t) = u(L,t) = \text{const}$. I initially thought these would be homogeneous BC because they are equal to the same constant. $\endgroup$
    – Wise Owl
    Commented Feb 25, 2016 at 0:27
  • $\begingroup$ @WiseOwl Whenever it's nonzero you say the conditions are inhomogeneous. When all the boundary conditions and the equation itself are homogeneous, multiples of solutions are solutions, which is really the whole point of the term. $\endgroup$
    – Ian
    Commented Feb 25, 2016 at 0:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .