Time dependent parameter for heat equation :\begin{cases} u_{t}=ku_{xx} & (x, t) \in [0, \infty) \times (0, \infty) \\ 
u(x,0)=g(x) & IC \\ u(0,t)=0 & BC \end{cases} 
What is the solution for $k$ as a function of $t$. I suspect it requires having to integrate $k(t)$ over the time to find the mean value 
 A: Of course use separation of variables:
Let $u(x,t)=X(x)T(t)$ ,
Then $X(x)T'(t)=k(t)X''(x)T(t)$
$\dfrac{T'(t)}{k(t)T(t)}=\dfrac{X''(x)}{X(x)}=-s^2$
$\begin{cases}\dfrac{T'(t)}{T(t)}=-s^2k(t)\\X''(x)+s^2X(x)=0\end{cases}$
$\begin{cases}T(t)=c_3(s)e^{-s^2\int_0^tk(r)~dr}\\X(x)=\begin{cases}c_1(s)\sin xs+c_2(s)\cos xs&\text{when}~s\neq0\\c_1x+c_2&\text{when}~s=0\end{cases}\end{cases}$
$\therefore u(x,t)=\int_0^\infty C_1(s)e^{-s^2\int_0^tk(r)~dr}\sin xs~ds+\int_0^\infty C_2(s)e^{-s^2\int_0^tk(r)~dr}\cos xs~ds$
$u(0,t)=0$ :
$\int_0^\infty C_2(s)e^{-s^2\int_0^tk(r)~dr}~ds=0$
$C_2(s)=0$
$\therefore u(x,t)=\int_0^\infty C_1(s)e^{-s^2\int_0^tk(r)~dr}\sin xs~ds$
$u(x,0)=g(x)$ :
$\int_0^\infty C_1(s)\sin xs~ds=g(x)$
$\mathcal{F}_{s,s\to x}\{C_1(s)\}=g(x)$
$C_1(s)=\mathcal{F}^{-1}_{s,x\to s}\{g(x)\}$
$\therefore u(x,t)=\int_0^\infty\mathcal{F}^{-1}_{s,x\to s}\{g(x)\}e^{-s^2\int_0^tk(r)~dr}\sin xs~ds$
A: By an odd extension $g(x):=-g(-x)$ for $x<0$, you can solve the heat equation on the whole real line (which I assume you know how to do?). Then restrict this solution to the half line.
