Now, let's translate the theory into a concrete example. The equations of motion of the pendulum system in Cartesian coordinate are
where is the tension from the string, is the gravitational acceleration, is the length of the string, and we assume the mass of the object is 1. Physically, we know that must be uniquely determined from and . However, computing is not obvious given the above equations. Let's use the mathematical tools that we defined earlier to analyze this system.
The highest order derivative terms are . Note that is one of the highest order derivative terms because no derivative of appears in the system. The exact rank of is too difficult to compute because it's time-varying. In practice, we use the sparsity pattern or the structure of the Jacobian to determine its structural rank — a weak version of the numerical rank. We can use a bipartite graph to represent the sparsity pattern. We define the structural rank as the maximum cardinality of the bipartite matching. If we assume that no cancellations among the non-zero entries are possible, then the structural rank is exactly the numerical rank.
The structure of from the pendulum system is
which is clearly singular. Hence, we cannot use Newton's method to compute from given and . Since only the last row of the matrix is problematic, we just need to use differentiations to introduce , or into the last equation to make the Jacobian structurally fully ranked. Differentiating the last equation twice, we get
Now, the structure of is
which has full structural rank. Note that we can simplify the differentiated equation by substituting the differential equations into it, which gives us
The resulting system is
We can use the initial condition of , , , and to uniquely determine the initial condition of the tension , because is invertible. This also means that the resulting system is an index 1 DAE, and the original pendulum system is index 3, since we differentiated the last equation twice. Lastly, as an exercise, we can get the underlying ODE by differentiating the last equation one more time
Hence, the ODE system is then