Cnoidal waves can be derived directly from the inviscid, irrotational and incompressible flow equations, and expressed in terms of three invariants of the flow, as shown by  in their research on undular bores. In a frame of reference moving with the phase speed, in which reference frame the flow becomes a steady flow, the cnoidal wave solutions can directly be related to the mass flux, momentum flux and energy head of the flow. Following —using a stream function description of this incompressible flow—the horizontal and vertical components of the flow velocity are the spatial derivatives of the stream function Ψ(ξ,z): +&part;Ψ and −&part;Ψ, in the ξ and z direction respectively (ξ = x−ct). The vertical coordinate z is positive in the upward direction, opposite to the direction of the gravitational acceleration, and the zero level of z is at the impermeable lower boundary of the fluid domain. While the free surface is at z = ζ(ξ); note that ζ is the local water depth, related to the surface elevation η(ξ) as ζ = h + η with h the mean water depth.
In this steady flow, the discharge Q through each vertical cross section is a constant independent of ξ, and because of the horizontal bed also the horizontal momentum flux S, divided by the density ρ, through each vertical cross section is conserved. Further, for this inviscid and irrotational flow, Bernoullis principle can be applied and has the same Bernoulli constant R' everywhere in the flow domain. They are defined as:
For fairly long waves, assuming the water depth ζ is small compared to the wavelength λ, the following relation is obtained between the water depth ζ(ξ) and the three invariants Q, R and S:
This nonlinear and first-order ordinary differential equation has cnoidal wave solutions. 
For very long waves of infinitesimal amplitude on a fluid of depth h and with a uniform flow velocity v, the flow constants are according to the shallow water equations:
:    and  
Equation () can be brought into non-dimensional form by use of the discharge Q and gravitational acceleration g, and defining the critical depth h:
related to the critical flow demarcation between subcritical flow and supercritical flow (see also Froude number). Consequently, the non-dimensional form of the equation is
with
:      and