Harmonic Cartesian polynomial and rational functions are shown to provide a simple way of obtaining a semi-analytical solution to the uncoupled, two-dimensional problem of thermomagnetoelasticity for a long, transversely isotropic, elastic cylinder carrying an axial, steady electric current. The proposed method involves the solution of a difficult inhomogeneous biharmonic equation for the stress function, and may be invariably used for general geometries of the normal cross-section of the cylinder, for various thermal and mechanical boundary conditions, and also to solve the problem of a long non-conducting cylinder in a transverse magnetic field. At all stages of the solution, there is no need to smoothen the cross-sectional contour in the presence of singular points, as for other methods. Results are provided for the elliptic and rectangular normal cross-sections under the Dirichlet thermal condition and prescribed uniform normal boundary displacement. Quantities of practical interest are represented graphically and discussed. The results may be of interest in determining the deformations occurring in current-carrying metallic parts of structures and machines, and in the central regions of busbars in electric power plants.