The existence of a homoclinic orbit is proved in the paper for a Hamiltonian system
where and . Furthermore, and with uniformly in as , is 1-periodic in and asymptotically linear at infinity, and is a hyperbolic matrix. has additional properties. A variational method is used to get an abstract theorem which is applied for showing a homoclinic orbit of (1). That theorem is also used to show a decaying solution of an asymptotically linear Schrödinger equation for , and .