This is a PDE from a Maple document. Mathematica DSolve can not solve it right now.

I wanted to review the Maple solution with NDSolve. This is a string of length 1, which is fixed on the left and can move freely to the right. Give a starting position and let go.

Here are the specifications of the PDE

Solve for $ 0 <x<1, t>0 $ the wave PDE

$$

-u_ {tt} + u (x, t) = u_ {xx} + 2e ^ {- t} left (x – frac {1} {2} x ^ 2 + frac {1} {2} t – 1 right)

$$

With boundary condition

begin {align *}

u (0, t) & = 0 \

frac { partial u (1, t)} { partial x} & = 0

end {align *}

And initial conditions

begin {align *}

u (x, 0) & = x ^ 2-2 x \

u (x, 1) & = u left (x, frac {1} {2} right) + e ^ {- 1} left ( frac {1} {2} x ^ 2-x right ) – left ( frac {3} {4} x ^ 2- frac {3} {2} x right) e ^ { frac {-1} {2}}

end {align *}

The tricky thing is that no initial speed is given. But only starting position $ t = 0 $, and then instead a relation to the solution is given at 2 different times.

`NDSolve`

Complain with this dreaded mistake

The boundary condition is not indicated on a single edge of the border

the computational domain.

And I do not know how to get rid of it. Here is the code

```
Delete everything[u, x, t];
pde = -D[u[x, t], {t, 2}]+[x, t] ==
D[u[x, t], {x, 2}]+ 2 * exp[-t]* (x - (1/2) * x ^ 2 + (1/2) * t - 1);
bc = {u[0, t] == 0, derivative[1, 0][u][1, t] == 0};
ic = {u[x, 0] == x ^ 2 - 2 * x,
u[x, 1] == u[x, 1/2] + ((1/2) * x ^ 2 - x) * Exp[-1] - ((3 * x ^ 2) / 4 - (3/2) * x) * Exp[-2^(-1)]};
sol = NDSolve[{pde, ic, bc}, u, {x, 0, 1}, {t, 0, 1}]
```

Here's the Maple code and the analytic solution it contains

```
pde: = -diff (u (x, t), t, t) + u (x, t) =
diff (u (x, t), x, x) + 2 * exp (-t) * (x- (1/2) * x 2 + (1/2) * t-1);
ic: = u (x, 0) = x ^ 2-2 * x,
u (x, 1) = u (x, 1/2) + (1/2) * x ^ 2-x) * exp (-1) - (3/4 * (x ^ 2) -3/2 * x) * exp (-1/2);
bc: = u (0, t) = 0, eval (diff (u (x, t), x), {x = 1}) = 0;
pdsolve ([pde, ic, bc], u (x, t))
```

$$

u (x, t) = – frac {e ^ {- t}} {2} (x ^ 2-2 x) (t-2)

$$

Here is an animation of the Maple solution that I wanted to review

```
mapleSol[x_, t_] : = - (Exp[-t]/ 2) (x ^ 2 - 2 x) (t - 2)
Manipulate[
plot[mapleSol[mapleSol[mapleSol[mapleSol[x, t], {x, 0, 1}, PlotRange -> {{0, 1}, {-1, .1}}].
{{t, 0, "time"}, 0, 10, .1}
]
```

Any suggestion how to fix the bug of NDSolve?

Using V 12 on Windows 10. ps. I also solved this by hand, but I can not find a Maple solution, and my solution looks wrong. I still have to find out why.