Consider an infinitesimal transformation:
$$(q_{i},p_{j}) \quad\longrightarrow \quad(Q_{i},P_{j}) ~=~ \left(q_{i} + \alpha F_{i}(q,p),~p_{j} + \alpha E_{j}(q,p)\right) $$
where $α$ is considered to be infinitesimally small.
Now, if we construct Jacobian matrix, we will have:
$$ \jmath =\begin{pmatrix} \delta_{ij}+ \alpha{\frac{\partial F_{i} }{\partial q_{j}}} & \alpha{\frac{\partial F_{i} }{\partial p_{j}}} \\ \alpha{\frac{\partial E_{i} }{\partial q_{j}}} & \delta_{ij}+ \alpha{\frac{\partial E_{i} }{\partial p_{j}}} \end{pmatrix}.$$
What functions $F_{i} (q, p)$ and $E_{i} (q, p)$ are allowed for this to be a canonical transformation?
To be canonical transformation, it's required to hold: $$\jmath j \jmath^{T} = j$$ in which $ j = \begin{pmatrix} 0 & 1\\ -1&0 \end{pmatrix}$. To hold the canonical transformation, there should be: $$\frac {\partial F_{i}}{\partial q_{j}} = - \frac {\partial E_{i}}{\partial p_{j}} $$
which is true if
$$F_{i} = \frac {\partial G}{\partial p_{i}} \; \; , \; \; E_{i} = - \frac {\partial G}{\partial q_{i}} $$
for some function $G(q, p)$.
Now my problem is that by calculating everything I can't figure out how to reach to last two formulas. The formulas which shows the possibilities for $F_{i}$ and $E_{i}$?