Thank You for answer.

I know about Neumann, Dirichlet and mixed BCs.

Dirichlet BC: u(0,t) = g1(t), u(1,t) = g2(t),

and g1(t)=g2(t)=2 here?

my first steps with BC:

a)T(t,0)-2=0

b)T(t,L)-2=0

cause we need zero in separating variables

**Separating variables:**

left side of heat equation: X(x)Y'(t) is dT/dt=d/dt[X(x)Y(t)]

right side: X''(x)Y(t) is d^2T/dx^2=d^2/dx^2[X(x)Y(t)]

Both sides are equal:

X(x)Y'(t)=X''(x)Y(t)

X''(x)/X(x)=Y'(t)/Y(t)=-lambda

so

X''(x)+lambdaX(x)=0 and Y'(t)+lambdaY(t)=0

If lambda is not 0, general solution is:

**X(x)=Acos(sqrt(lambda)x)+Bsin(sqrt(lambda)x)**

Y(t)=Ce^(-lambda*t)

And from BC:

a)T(t,0)-2=0

b)T(t,L)-2=0

for a)

X(0)-2=0

A*1-0=2, A=2

for b)

X(0)-2=0

Is it correct thinking and where to go...?