Prerequisites

Before applying the algorithm to the problem let's first calculate some needed things.

Derivation of States with respect to Input-Vector

Using the Numerator layout for gradients with Respekt to the Input-Vector result in: