# What's the need of boundary and initial conditions in a PDE

I am studying numeric methods for differential equations and I don't quite understand the purpose for the boundary and initial conditions in the heat equation.

I see that we have three boundary condition, one initial condition for time and two for space. I understand that the time initial condition is for the starting time of the heating, and the two boundary conditions are for the boundaries to which we look the heating in space.

In the ODE case I understood that we are given initial condition because there are many solutions and many functions differing with a constant from each other which satisfy the differential equation. Are the initial and boundary conditions in the PDE case (Heat equation) having a similar purpose or are they solely for restricting the space and time dimensions and the uniqueness being a consequence of that?

Why do people solve differential equations? Well, usually differential equations model something: the flow of heat, the vibration of a string or a surface, an electrical current, the motion of planets, something. The equation codifies the rules of evolution of the system you are studying but it should be obvious to you that to know what is actually going to happen with the heat, or the string, or the planet, you are going to know something about the initial condition (where is it now?) That is what the initial condition and the boundary conditions mean.

To specifically address the heat equation.. say we have $u_t = u_{xx}$ on $0 < x < L$. We can start with separation of variables (it isn't necessary to know this method to understand my answer), so we say $u(x,t) = X(x)T(t)$. Putting this into the PDE eventually gives us $\dfrac{X''}X = \dfrac{\dot T}T = \lambda$, and so $X'' - \lambda X = 0$ and $\dot T - \lambda T = 0$. The standard way to proceed is to do three separate cases: assume $\lambda > 0$ and solve, then assume $\lambda = 0$ and solve, then assume $\lambda < 0$ and solve.

For the heat equation it turns out the only valid case we get is when $\lambda < 0$. But we can't know that without boundary conditions on the PDE. Further, we need those boundary conditions to determine the arbitrary constants we get when we solve the ODE for $X$. And the initial condition is needed to determine the constant we get from solving the ODE for $T$. (I swept a lot of details under the rug in the previous sentence but on a very high level that's basically what's happening.)

To summarize: Solving a PDE with separation of variables means we turn the PDE into a system of ODEs. The boundary conditions on the PDE become boundary conditions on the spatial ODE(s). The initial conditions on the PDE become initial conditions on the temporal ODE. So, we need boundary and initial conditions on PDEs for the exact same reason we need them on ODEs.

But even if we don't use separation of variables, the BCs and ICs are still necessary for the same reason as they are in ODEs. Without them, the best we can do is get a general expression with arbitrary constants.

Solutions of PDEs without BCs or ICs contain arbitrary functions. Compare this with solving ODEs where the solution contains arbitrary constants.

e.g. for the wave equation $u_{tt}=u_{xx}$ a solution is any function of the form $f(x+t)$

The BCs and ICs determine the arbitrary function. For the heat equation you may for example have a metal rod whose ends are being held at particular temperatures - the boundary conditions, and the initial temperature distribution along the entire length of the rod may be a particular given function of distance - the initial condition. These conditions arise naturally out of the physical situation in this case and they will determine the specific solution as opposed to a very general solution.

• +1 Thank you! Your answer gave me some idea of what's happening and it's close to what I don't understand. I'm still curious, is the second boundary condition necessary for the uniqueness of solution? May 29, 2017 at 19:39
• @NikolaShahpazov Chapter 5 of these notes discuss the equation and different BCs more fully. I hope they are helpful. www1.maths.leeds.ac.uk/~kersale/Teach/M3414/Notes/m3414_1.pdf
– PM.
May 30, 2017 at 7:58