I have this 1D oscillator whose equations of motion is given by- $m \ddot{y}=-ky$ and when written is terms of conjugate variables $(p,q)$ in matrix form, we have $$\begin{bmatrix}\dot{q} \\ \dot{p}\end{bmatrix}=\underbrace{\begin{bmatrix} 0 & \frac{1}{m} \\ -k &0 \end{bmatrix}}_{A}\begin{bmatrix}q \\ p\end{bmatrix}$$ Now the author have presented three approaches
(1) Explicit Euler : According to this form $x_{n+1}=x_n+h f(x_n)$ we have $$\begin{bmatrix}q_{n+1}\\ p_{n+1}\end{bmatrix}=\begin{bmatrix}1 & \frac{h}{m}\\-kh & 1 \end{bmatrix}\begin{bmatrix} q_n \\p_n \end{bmatrix}=\left(I+Ah \right)\begin{bmatrix}q_n \\p_n\end{bmatrix}$$
(2) Implicit Euler : with respect to the form $x_{n+1}=x_n+h f(x_{n+1})$ we have $$\begin{bmatrix}q_{n+1}\\ p_{n+1}\end{bmatrix}=\frac{1}{1+h^2\tfrac{k}{m}}\begin{bmatrix}1 & \frac{h}{m}\\-kh & 1 \end{bmatrix}\begin{bmatrix} q_n \\p_n \end{bmatrix}=\left(I-Ah \right)^{-1}\begin{bmatrix}q_n \\p_n\end{bmatrix}$$
(3) Symplectic Euler : The symplectic Euler VT $$\begin{bmatrix}q_{n+1}\\ p_{n+1}\end{bmatrix}=\begin{bmatrix}q_n+h \frac{p_{n+1}}{m} \\p_n-hkq_n \end{bmatrix}=\begin{bmatrix}1-h^2\frac{k}{m} & \frac{h}{m}\\-kh & 1 \end{bmatrix}\begin{bmatrix} q_n \\p_n \end{bmatrix}$$ and the symplectic Euler TV : $$\begin{bmatrix}q_{n+1}\\ p_{n+1}\end{bmatrix}=\begin{bmatrix}q_n+h \frac{p_{n}}{m} \\p_n-hkq_{n+1} \end{bmatrix}=\begin{bmatrix}1 & \frac{h}{m}\\-kh & 1-h^2\frac{k}{m} \end{bmatrix}\begin{bmatrix} q_n \\p_n \end{bmatrix}$$ All of these are okay so far, now the author claims for following differential equations--
$(1)~~\dot{q}=p+\frac{h}{2}q~,~\dot{p}=-q+\frac{h}{2}p~~(2)~~ \dot{q}=p-\frac{h}{2}q~,~\dot{p}=-q+\frac{h}{2}p$
$(3)~~\dot{q}=p-\frac{h}{2}q~,~\dot{p}=-q-\frac{h}{2}p ~~(4)~~\dot{q}=p+\frac{h}{2}q~,~\dot{p}=-q-\frac{h}{2}p$
with $k=m=1$ the exact solutions of (1) and (3) will follow the numerical solutions obtained by explicit and implicit euler methods, and solutions of (2) and (4) follows the results of symplectic euler methods. I'm not able to understand from where the differential equations are arising and how their exact solutions replicate the numerical euler solutions ?
The claim is indeed somewhat overreaching, you can at most claim that the distance from the solution of the modified system to the numerical solution is one order more accurate than the error of the numerical method.
For the explicit Euler method, you get by comparing $x_{k+1}=x_k+f(x_k)h$ with the expansion of some other equation $\dot x=g_h(x)$ where $x_k$ corresponds to $x(t)$ and $x_{k+1}$ to $x(t+h)$ $$ x(t+h)=x(t)+g_h(x(t))h+\frac12g_h'(x)g(x)h^2+O(h^3). $$ Thus in first order $g_h(x)=f(x)+O(h)$ to capture the same main dynamic. Exhibiting the next order term we get $g(x)=f(x)+hu(x)+O(h^2)$. On the other hand for the equality of the Euler iteration and the exact solution we need $$ f(x)=g_h(x)+\frac12g_h'(x)g(x)h+O(h^2). $$ Now insert the ansatz $g=f+uh$ on the right side $$ f(x)=f(x)+u(x)h+\frac12(f'(x)+u'(x)h)(f(x)+u(x)h)h+O(h^2)\\ \\ \implies u(x)=-\frac12f'(x)f(x) $$ in the terms linear in $h$, ignoring quadratic or higher degree terms.
Now in the present example with $f(x)=Ax$, we get $u(x)=-\frac12A^2x$.
As the implicit Euler method is the time reversed version of explicit Euler, you get $g_h(x)=f(x)+\frac12f'(x)f(x)h$ which implies that there is a sign error in the formulas you wrote down (more precisely, the case (3) formulas are for implicit Euler, switched with case (2)).
The computation for the symplectic Euler methods could follows similar lines, but is a bit more complicated. In the linear case it is easier to take the logarithm of the step matrix $\log(I+hB)=hB-\frac12h^2B^2+O(h^3)$. In the case (3) VT this gives \begin{align} B&=\begin{bmatrix}-h&1\\-1&0\end{bmatrix}, \\ \log(I+hB)&=h\begin{bmatrix}-h&1\\-1&0\end{bmatrix} -\frac12h^2\begin{bmatrix}h^2-1&-h\\h&-1\end{bmatrix}+O(h^3) \\ &=h\begin{bmatrix}-\frac h2&1\\-1&\frac h2\end{bmatrix}+O(h^3), \end{align} or $\dot q = p-\tfrac h2q$, $\dot p = -q+\tfrac h2 p$.
The case (4) TV is analogueous, here you just have to exchange $p$ and $q$.