Maple 15

Hi, currently im using maple 15

the coding did work but it is not the same with the answer
here, i attach the coding with the answer

coding:
derivation := proc (A, n)
local i, j, k, t, s1, s2, m, D, sols, eqns, Andre;
eqns := {};
D := matrix(n, n);
Andre := matrix(n, n);
for i to n-1 do
for j from i+1 to n do
for m to n do
s1 := sum(A[i, j, k]*D[m, k], k = 1 .. n);
s2 := sum(A[k, j, m]*D[k, i]+A[i, k, m]*D[k, j], k = 1 .. n);
eqns := `union`(eqns, {s1 = s2})
end do end do end do;
sols := [solve(eqns)];
t := nops(sols);
for i to t do
for j to n do
for k to n do
Andre[k, j] := subs(sols[i], D[k, j])
end do end do;
print(Andre)
end do end proc

the maple result showing:

> AS1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 2) = 1]);

> derivation(AS1, 2);
[D11 0]
[D21 D22]

> AS2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1]);
> derivation(AS2, 2);
[0 D12]
[D21 D22]

the maple should showing

> derivation(AS1, 2);
[D11 0]
[D21 2D11]

> AS2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1]);
> derivation(AS2, 2);
[0 0]
[D21 D22]