# Dirichlet boundary conditions in the 1D Heat Equation

I am confused about the functions $$g_L(t)$$, $$g_R(t)$$ and $$\eta(x)$$. What are they and how do I find them... My question:

Is it possbile to find out how $$g_L(t)$$, $$g_R(t)$$ and $$\eta(x)$$ look like purely based on this formulation?

In order to solve this problem I need to know what the functions look like but unfortunately I don't how to determine the functions.

(EDIT: If those are not given; How can I find suitable function so I can make an numeric implementation?)

I am using the book Finite Difference Methods for Ordinary and Partial Differential equations by LeVeque. In chapter 9 it is presented how to solve the Heat equation but all the methods are based on knowing $$g_L(t)$$, $$g_R(t)$$ and $$\eta(x)$$ beforehand, which means I have overlooked some simple theory about Dirichlet boundary conditions?.

• Those boundary condition and initial condition functions are part of the definition of the specific problem that you are solving. That is, you must know (or be given) these functions in order to have a complete, solvable problem definition. The equations you show above show the general form of a 1D heat transfer problem-- not a specific solvable problem. May 12 '19 at 11:32

No, you did not overlook anything. You actually have to know specific

• $$g_L(t)$$ - boundary condition at the left boundary ($$x=-1$$)
• $$g_R(t)$$ - boundary condition at the right boundary ($$x=1$$)
• $$\eta(x)$$ - initial condition at $$t=0$$

So, depending on what those functions are, you will get different solutions. The assignment is just given in general terms. When you would be asked to do a numerical implementation, you will be either given those boundary conditions, or you will come up with your own selection.

One simple choice would be to keep outer boundaries at a constant temperature: $$g_L(t)=g_R(t) = T$$ and make the initial temperature at all the interior of the problem $$T_0\neq T$$, except the boundaries (to not contradict the boundary conditions above): $$\eta(x) = \begin{cases} T_0,&x\in(-1,1),\\ T, &x\in \{-1,1\} \end{cases}$$

Then, you start with two "walls" kept at a constant temperature of $$T$$, and with time, your domain should reach the equilibrium state from $$T_0$$ to $$T$$.

• My problem is that this is information is all I have. LeVeque's book does not really provide information on how to come up with those condition. I have now edited my question May 12 '19 at 12:38
• @k.dkhk I updated the answer with a sample setup. May 12 '19 at 12:50
• Thanks! I did implement FTCS and got decent results May 12 '19 at 14:33