I'm trying to get the 2nd order coefficient of the Taylor expansion in $ pmb {x} = pmb {0} $ of

```
F[{x1_, x2_}] = {{c1 x1 ^ 2 + c2 x1 x2 + c3 x2 ^ 2}, {d1 x1 ^ 2 + d2 x1 x2 + d3 x2 ^ 2}}
```

Then, considering these notes, I calculated the Hesse matrix,

```
x1 /: Dt[x1, x2] = 0;
x2 /: Dt[x2, x1] = 0;
H = Dt[f[{x1, x2}], {{x1, x2}, 2}, Constants -> {c1, c2, c3, d1, d2, d3}](* {{{{{{2 * c1, c2}, {c2, 2 * c3}}}, {{{2 * d1, d2}, {d2, 2 * d3}}}} *)
```

and, as described in the notes, multiplied it by $ pmb {x ^ T} $ to the left and $ pmb {x} $ on the right

```
X = {{x1}, {x2}}
Expand[X[Transpose].H.X](* {{{{{{{{2 * c1 * x1 ^ 2 + c2 * x2 * x1 + 2 * d1 * x2 * x1 + d2 * x2 ^ 2}, {c2 * x1 ^ 2 + 2 * c3 * x2 * x1 + d2 * x2 * x1 + 2 * d3 * x2 ^ 2}}}} *)
```

but the result is not as expected, since it should be equal to $ pmb {f} $ (ignoring the factor 1/2).

**I think I followed the rules of the Mathematica matrix / vector product, so what do I lack?**

**Note: I am aware that there are other simpler solutions like**

```
Normal[Series[f[{(x1 - 0) t, (x2 - 0) t}], {t, 0, 2}]]/. t -> 1
(* {c1 x1 ^ 2 + c2 x1 x2 + c3 x2 ^ 2, d1 x1 ^ 2 + d2 x1 x2 + d3 x2 ^ 2} *)
```

**but I still want to know what I could have done wrong.**