The dynamics of massless planetesimals in the gravitational field of a star with a planet in a circular orbit is considered. The invariant of this problem is the Jacobi integral. Preserving the value of the Jacobi integral can be a test for numerical algorithms solving the equation of motion. The invariant changes for particles in the planetary chaotic zone due to numerical errors that occur during close encounters with the planet. The limiting distances from the planet, upon reaching which the value of the Jacobi integral changes, are determined for Bulirsch-Stoer algorithm. It is shown that violation of the Jacobi integral can be used to define the boundaries of the planetary chaotic zone.