# Question:why pdsolve numeric fail when spacestep smaller than 1/11 in this example?

## Question:why pdsolve numeric fail when spacestep smaller than 1/11 in this example?

Maple 2019

from help, it says about option of 'spacestep'=numeric to pdsolve numerical solver the following

```Specifies the spacing of the spatial points on the discrete mesh on which the solution
is computed, and defaults to 1/20th of the spatial range of the problem,
r-L, where L is the left boundary, and r is the right. Note: The spacing must
be small enough that a sufficient number of points are in the spatial domain
for the given method, boundary conditions, and spatial interpolation (see below).
If the given value of spacestep does not fit into the input domain an integral
number of times, the closest smaller step size that does is used. For problems
using error estimates, or an adaptive approach, the total number of spatial
points must be odd, so again, if this is not the case for the specified
spacestep, then it is reduced to satisfy this requirement.
```

In this problem, the domain is [-1,1]. So the default is 1/20 of this which is 1/10.  Why is it when using spacestep smaller than 1/11, the animator generated from the solution does not work right?  i.e. playing the animate does not produce correct result as the case when using spacestep=1/11 or spacestep=1/10?

When using spacestep=1/16 or 1/15 or 1/14 or 1/13 or 1/12, it all produce bad animation.  I do not see why that is.

Any ideas?  Am I doing something wrong?

 > pde := diff(u(x,t),t\$2)=diff(u(x,t),x\$2): bc  := u(-1,t)=u(1,t),D[1](u)(-1,t)=D[1](u)(1,t): f:=x->piecewise(-1/2

 > sol:-animate(t=1,frames=50,title="time = %f");

 > sol:=pdsolve(pde,{bc,ic},u(x,t),numeric,time=t,range=-1..1,  timestep=1/16,spacestep=1/12): sol:-animate(t=1,frames=50,title="time = %f");

 > sol:=pdsolve(pde,{bc,ic},u(x,t),numeric,time=t,range=-1..1,  timestep=1/16,spacestep=1/11): sol:-animate(t=1,frames=50,title="time = %f");

 >