Question: Why does a[1] change to a(1)?

I seem to recall that a[k] and a(k) are treated interchangeably within a proc.  But I did not expect that to happen at the top level.  See the worksheet below.  Is there a way to keep indexed quantities as indexed?

restart;

kernelopts(version);

`Maple 2025.0, X86 64 LINUX, Mar 24 2025, Build ID 1909157`

A := piecewise(x<0, a[1], a[2]);

A := piecewise(x < 0, a[1], a[2])

int(1/A, x=-1..1);

1/a(1)+1/a(2)

Download mw.mw

Please Wait...