The coupled differential equations of a shaft, homogeneous in axial direction, are derived under the assumption of the Bernoulli beam hypothesis and internal damping (Kelvin material). Second order theory is applied. The loads are distributed and discrete longitudinal forces and torsional moments. External damping and the effect of flow in the rotor along the axis are taken into account. The derived system of differential equations has non-constant coefficients. Compared with the commonly used ones it is extended with regard to the named actions. After linearisation and separation of torsion solutions are described with complex series of the axis coordinate x. The accuracy of the solutions depends on computer and software. Eigenvalues and characteristic functions are calculated and compared with known results. For a turbine shaft and a drill pipe critical combinations of loads and rotational speeds are exemplarily investigated.