When there are no non-conservative forces, the equations of motion can be derived by first determining our system's Lagrangian and then applying a set of partial differential equations known as the Euler-Lagrange equations to this Lagrangian. The Euler-Lagrange equations are:
dtd∂q˙i∂L−∂qi∂L=0,i∈{1,2,3,...,n}.(1) qi are the n degrees of freedom of our problem and q˙i are their time derivatives. The dtd is not a partial derivative and this is purposeful, as when we differentiate ∂q˙i∂L with respect to t, we treat qi and q˙i as functions of t and wherever they appear in ∂q˙i∂L we differentiate them against t.
Next, I should explain what "degrees of freedom" are. They are also known as generalized coordinates and they are essentially our variables of interest. For simpler problems, the degrees of freedom in our problem are often the spatial dimensions of our problem. For instance, if we were to study an object in free fall and we were to try to simplify our problem as much as possible and not consider any movement in the horizontal directions then n could be 1 and q1 would just be the height of the object above ground level.
Likewise, when we study the simple pendulum — which is a problem in which we have an idealized rigid pendulum whose rod has zero mass, zero friction and for which there is absolutely no air resistance — typically we only consider a single degree of freedom, which is the angle our pendulum's rod makes with either the negative y axis or the positive x axis, depending on the preferences of whoever is setting up the problem.