Solve the following equation $$\frac{\partial ^2u}{\partial x^2}=\frac{\partial u}{\partial t}.\quad 0<x<1, 0<t,$$ with
$$u(0,t)=-1\\ -\frac{\partial u(1,t)}{ \partial x}=(u(1,t)-1) \\ u(x,0)=x-1.$$
by using variable and separable method Let $ u(x,t)=X(x)T(t) \implies u_{xx}(x,t)=X''(x)T(t), u_t(x,t)=X(x)T(t)$
then given equation be $\frac{X''(x)}{X(x)}=\frac{T'(t)}{T(t)}=k \implies X''(x)-kX(x)=0, T'(t)-kT(t)=0$
This implies $X(x)=c_1e^{\sqrt{k}x}+c_2e^{-\sqrt{k}x}, T(t)=c_3e^{kt}$
I don't know how to use these boundary and initial conditions,,Any help?
To apply the method of separation of variables, you need to have homogeneous boundary conditions, otherwise you can't linearly combine the separated solutions $u_n(x,t) = X_n(x) T_n(t)$ to obtain the sought solution $u(x,t) = \sum_n c_ n u_n(x,t)$ that also matches the initial condition.
Start by finding the equilibrium solution (the time-independent heat distribution that you expect $u$ to tend to as $t \to \infty$). If we call it $U(x)$, it's determined by $U_{xx}(x)=0$ for $0<x<1$, with boundary conditions $U(0)=-1$ and $-U_x(1)=U(1)-1$. Once you've calculated $U$, let $v(x,t) = u(x,t)-U(x)$, i.e., consider the difference between the temperature and the equilibrium that it tends to. Write down the corresponding initial-boundary value problem for $v$; it should have homogeneous boundary conditions. Then you can start thinking about separation of variables (if needed; in this case, the problem for $v$ turns out to be so easy that that's not even necessary).