Are Hamilton's equations really form invariant under canonical transformations? Let under a canonical transformation $(q,p,t)\to(Q,P,t)$, the Hamiltonian is changed from $H(q,p,t)\to \tilde{H}(Q,P,t)$. But in general, the functional forms of $H$ and $\tilde{H}$ are different. This means, for example, if $H(q,p)$ were $\frac{1}{2}(q^2+p^2)$, there is no reason why $\tilde{H}(Q,P)$ be equal to  $\frac{1}{2}(Q^2+P^2)$ under a general CT. Hence, the transformed Hamilton's equations though superficially look the same as old Hamilton's equations, the partial differential equations in terms of $q,p$ can be very different than in terms of $Q, P$. Can we call it the form invariance of Hamilton's equations?
 A: By the form invariance, we mean that under the transformation if under some transformation
$$q\rightarrow Q$$
$$p\rightarrow P$$
$$\mathcal{H}\rightarrow \mathcal{K}$$
Then if the transformation is canonical then
$$\dot{q}=\frac{\partial \mathcal{H}}{\partial p}\rightarrow \dot{Q}=\frac{\partial \mathcal{K}}{\partial P}$$
$$\dot{p}=-\frac{\partial \mathcal{H}}{\partial q}\rightarrow \dot{P}=-\frac{\partial \mathcal{K}}{\partial Q}$$
That's what we meant by the form invariance under canonical transformation.
A: Whatever facts you have mentioned is very correct. Here lets understand what it means for the Hamiltonian to have such an invariance.
Its important to look at what we are aiming at by using Hamiltonian or Lagrangian or even Newtons Laws, at the end of the day what we are essentially looking for is the Equations of Motion.
Now let see what this invarience of Hamiltonian mean. It simply means that if you do this particular coordinate changes, it doesnt effect the end result i.e. the equations of motion!
In a very simple sense its like solving a two body equation using Newtons Laws first in Cartesian System and then in Spherical Polar coordinates - although explicitly the forms might look different but you will agree that they are equivalent because changing our reference doesnt change the physics.
This is exactly the reason why its called Invariant in our context.
