The Magnetic field for an n-cusped Epi- and Hypo-Cycloids loop current

We calculate the magnetic field generated by a steady current that takes the shape of two types of special curves: hypocycloids and epicycloids with n numbers of sides. The computation was performed in the center of the referred curves. For this purpose, we use the Biot-Savart law which is studied in every introductory-level electricity and magnetism course. The result is quite general because it is obtained as a function of the number of sides of the curve and in terms of a parameter that identifies the type of curve considered ( = −1 hypocycloids and = +1 epicycloids).


Introduction
The calculation of the magnetic field due to a steady current in a circuit is one of the exercises that all students in the first-level course of electricity and magnetism must confront. For this purpose, introductory physics textbooks present Biot-Savart's (BS) law and Ampere's law [1][2][3]. Although these laws are equivalents [4], the elementary texts usually begin the magnetic field calculations using the BS law. This is because BS law provides students a general tool for calculating the magnetic field due to a current-carrying wire of arbitrary shape while Ampere's law can only be used when the symmetry of the problem allows extracting B of the integral B · dl [5].
Additionally, the BS law is introduced first because there is a theoretical evolution between it and Ampere's law. The BS law can be obtained by making a parallel with the integral that is used to calculate the electric field of a charge distribution, and the Ampere law has a correspondence with the Gauss law.
In most situations, textbooks focus on magnetic field caculations to straight wire conductors, curved wire segments, circular current loops, or combinations of these cases, excluding the rest of the geometric shapes of the study. Miranda [6] extends the calculation of the magnetic field using the BS law to conic curves, spirals, and harmonically deformed circular circuits at a point that lies in the same plane as the current filament, finding that in most cases the calculation is straightforward but some particular types of expressions called elliptic integrals appear [7,8]. In this paper we are going to extend the study carried out by Miranda, * Correspondence email address: davidromeroabad@gmail.com considering two additional groups of plane curves, the epicycloids and the hypocycloids [9][10][11]. These types of curves appear in different branches of physics, such as Mechanics [12,13], Optics [14], and Cosmology [15]. Although the employment of special functions and parameterization of particular curves could make it laborious to calculate the magnetic field, computational tools such as those offered by Mathematica [16] and Maple [17] allow us to simplify the problem and examine the solutions obtained. Since the magnetic field is expressed in terms of elliptical integrals, we believe that this exercise is a good opportunity to introduce students to these special functions [18]. This calculation uses physical concepts and mathematical techniques that would be accessible to an average freshman student.

Epicycloids and hypocycloids
An epicycloid is a plane curve generated by a fixed point P on the edge of a circle of radius b rolling externally upon a fixed circle of radius a with a > b. A hypocycloid is obtained similarly except that the circle of radius b rolling internally upon a fixed circle of radius a [9][10][11] as can be seen in Figure 2.
The parametric equations of the epicycloid and hypocycloid curves are [9][10][11]: where = +1 corresponds to an epicycloid and = −1 corresponds to a hypocycloid. These expressions were derived in Appendix. To obtain a closed and nonintersecting curve, we set the relationship a/b = n, where Copyright by Sociedade Brasileira de Física. Printed in Brazil.

e20200482-2
The Magnetic field for an n-cusped Epi-and Hypo-Cycloids loop current n is an integer number, and correspond with the number of sides of the geometric shape. Then, we get: x = a n + n cos θ − a n cos ((n + ) θ) (3) y = a n + n sin θ − a n sin ((n + ) θ) where θ varies from 0 to 2π. Figure 2 and Figure 3 show some epicycloid and hypocycloid curves generated with the above parametric equations for different integer values of n.

The Magnetic Field Calculation
To determine the magnetic field in the center of the loop which carries a steady current I, we will apply the BS law [5] for a line current where µ 0 is the permeability of free space. Using Eq. (3) and (4) we find the infinitesimal length element if we consider that the observation point is the center of the curve (origin of coordinates), we have: where the x and y values are giving in Eqs (3) and (4). We calculate  and | r − r | 3 = − a 2 n 2 2 (n + ) (cos(θ n) − 1) − n 2 3/2 (9) As can be observed from Fig. 2 and Fig. 3 the n-cusped epi and hypo-cycloids are symmetrical under rotations of the angle 2π/n around the z-axis. Since the magnetic field is a vector, it also has components along the x and y-axis. Under finite rotations these components could change even though the source remains symmetric. The only possibility that the components do not change under finite rotations is that they will be zero, as can be seen in Eq. (8).

Results
Thus, replacing Eq. (8) and Eq. (9) in Eq. (5), and performing the integration with Mathematica [16], we obtain the magnetic field in the origin where = +1 corresponds to an epicycloid curve and = −1 corresponds to a hypocyloid curve. In addition,

F (φ, k) is the elliptic integral of the first kind and E(φ, k)
is the elliptic integral of the second kind [7,8]. To form a closed curve and consequently generate an electric current, the integral was carried out in the interval [0, 2π] and for n > 2. This expresion is quite general because represent the magnetic field in the center of any (epi)hypocycloid with n > 2. From Eq. (10) it can be verified that for large values of n, the magnitude of the magnetic field tends to µ 0 I/2a, which corresponds to the magnetic field in the center of a circular loop.
Additionally, the Figure 4 shows the behavior of the

Conclusion
In this work, we derive a general expresion to compute the magnetic field produced by current-carrying wires with planar hypocycloids and epicycloids shapes. The calculation of the magnetic field is carried out in the center of the geometric shape, and the current flowing through the cables is considered stable. We have analyzed the asymptotic behavior of our result for very large values of n and we have been able to verify that the expression tends to that generated by a circular loop as would be expected from Figure 2 and Figure 3. We show that using an adequate parametrization of the curves, and with the help of computational tools such as the Mathematica package we could calculate the magnetic field, visualize the results and compare among different types of curves. The derivation of the magnetic field contains only basic geometric ideas, making it accessible to an average introductory electricity and magnetism student. The present work is intended to serve as an example for future attempts to evaluate the magnetic field in non-standard cases using the BS law. A different approach to calculate the magnetic field of a loop at any point of space using a regular n-sided polygon and the superposition principle is discussed in [19].