Maple 2019.1 finds its weak solution by

```
pdsolve({diff(u(x, t), t) = diff(u(x, t), x, x), u(0, t) = f(t), u(L, t) = f(t), u(x, 0) = g(x)}, u(x, t));
```

, producing
$$ u \left( x,t \right) =\sum _{n=1}^{\infty } \left( -2\,{\frac {1}{L}
\sin \left( {\frac {\pi\,nx}{L}} \right) {{\rm e}^{-{\frac {{\pi}^{2}{
n}^{2}t}{{L}^{2}}}}}\int_{0}^{L}\! \left( -g \left( \tau \right) +f
\left( 0 \right) \right) \sin \left( {\frac {\pi\,n\tau}{L}}
\right) \,{\rm d}\tau} \right) +\\\int_{0}^{t}\!\sum _{n=1}^{\infty }2
\,{\frac { \left( {\frac {\rm d}{{\rm d}\tau}}f \left( \tau \right)
\right) \left( \left( -1 \right) ^{n}-1 \right) }{\pi\,n}\sin
\left( {\frac {\pi\,nx}{L}} \right) {{\rm e}^{-{\frac {{\pi}^{2}{n}^{
2} \left( t-\tau \right) }{{L}^{2}}}}}}\,{\rm d}\tau+f \left( t
\right)
$$
In particular,

```
pdsolve({diff(u(x, t), t) = diff(u(x, t), x, x), u(0, t) = 0, u(1, t) = 0, u(x, 0) = (x - 1/2)^2 - 1/4}, u(x, t));
```

$$u \left( x,t \right) =\sum _{n=1}^{\infty }4\,{\frac {\sin \left( n\pi
\,x \right) {{\rm e}^{-{\pi}^{2}{n}^{2}t}} \left( \left( -1 \right) ^
{n}-1 \right) }{{n}^{3}{\pi}^{3}}}
$$
and

```
plot3d(Sum(4*sin(n*Pi*x)*exp(-Pi^2*n^2*t)*((-1)^n - 1)/(n^3*Pi^3), n = 1 .. infinity), x = 0 .. 1, t = 0 .. 2, grid = [60, 60]);
```

Addition. Mathematica produces the same answer by

```
DSolve[{D[u[x, t], t] == D[u[x, t], {x, 2}], u[0, t] == 0,
u[1, t] == 0, u[x, 0] == (x - 1/2)^2 - 1/4}, u[x, t], {x, t}]
```

$$u(x,t)\to \underset{K[1]=1}{\overset{\infty }{\sum }}\frac{4 \left(-1+(-1)^{K[1]}\right) e^{-\pi ^2 t K[1]^2} \sin (\pi x K[1])}{\pi ^3 K[1]^3} $$