Let
d
-- x = f(x)
dt
an autonomous ordinary differential equation in Rn with f: Rn -> Rn a vector field on Rn.
A function V: Rn -> R is called a Ljapunov function iff for all x in Rn
/ d              \
| -- V(x) , f(x) | <= 0 
\ dx             /
where the brackets denote the standard inner product on Rn.
The above condition means that the values of the Ljapunov function are constant or decreasing (monotonically decreasing) on any trajectory of the ODE.
You can also restrict the definition of Ljapunov functions to open sets.

Ljapunov functions are useful for reason about the dynamics of the ODE without knowing any exact solutions. An example for this is LaSalle's invariance principle.

For a given ODE there is no algorithmic way of determining a Ljapunov function, you get one usually but the ancient mathematical principle of guessing.


You can of course make this definition on any Hilbert space (o.k. in fact anywhere where you can define vector fields and derivatives). But I don't know if you would get any useful results in such spaces.