The article is devoted to the calculation of normal modes of the closed waveguides with an arbitrary filling , μ in the system of computer algebra Sage. Maxwell equations in the cylinder are reduced to the system of two bounded Helmholtz equations, the notion of weak solution of this system is given and then this system is investigated as a system of ordinary differential equations. The normal modes of this system are an eigenvectors of a matrix pencil. We suggest to calculate the matrix elements approximately and to truncate the matrix by usual way but further to solve the truncated eigenvalue problem exactly in the field of algebraic numbers. This approach allows to keep the symmetry of the initial problem and in particular the multiplicity of the eigenvalues. In the work would be presented some results of calculations. © 2018 SPIE.