Boundary conditions in a heat equation

Hi... I've been set this question as homework, and I'm really struggling with it - I'd really appreciate any pointers that anyone could give me - I'm NOT asking for the answer, but instead would appreciate any methodological hints.

It's about a bar adjusting to ambient temperature.

The equation is:

with boundary conditions:

is just a constant, but using the substitution , I've gotten:

with boundary conditions:

(first part of the Dirichlet conditions)

I'm also going to make the ansatz that , implying:

I'm aware that there are obviously differing cases of to deal with (positive, negative, and zero), but I'm stuck when dealing with the boundary conditions - I'm assuming I have to somehow show that the Dirichlet conditions hold for each case (or that it is trivial), but I can't see how to use to show that for each case of .

Does anybody have any ideas? I just can't see how to use this information to solve the equations - without proper boundary conditions, I can't solve anything at all, and I've been at this for a few hours now.