{"id":58,"date":"2021-02-04T14:24:45","date_gmt":"2021-02-04T19:24:45","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/?post_type=chapter&#038;p=58"},"modified":"2026-01-23T14:18:36","modified_gmt":"2026-01-23T19:18:36","slug":"lagrangian-mechanics","status":"publish","type":"chapter","link":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/chapter\/lagrangian-mechanics\/","title":{"raw":"Lagrangian Mechanics","rendered":"Lagrangian Mechanics"},"content":{"raw":"<h1>2.1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Overview<\/h1>\r\n[caption id=\"attachment_93\" align=\"alignright\" width=\"266\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/joseph-louis-lagrange\/\" rel=\"attachment wp-att-93\"><img class=\"size-medium wp-image-93\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-266x300.png\" alt=\"\" width=\"266\" height=\"300\" \/><\/a> Joseph-Louis Lagrange (1736\u20131813)[\/caption]\r\n\r\nIn general, it is easier to perform engineering\/technical calculations using a scalar quantity rather than a tensor\/vector type quantity, mainly because a vector\u2019s components depend on the selected coordinates system, and hence, more quantities to deal with. This was the main motivation for Joseph-Louis Lagrange (1736\u20131813), <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R7\"><strong>[7]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R8\"><strong>[8]<\/strong><\/a> to start looking into the Newtonian mechanics close to a century after Newton developed his laws. Consequently, Lagrange developed a new formulation, so-called <em>Lagrangian mechanics<\/em> (1788).\r\nLagrange\u2019s approach has advantages over that of Newton\u2019s, specifically for analyzing complex multi-domain, multi-component systems. Lagrange\u2019s approach releases us from having to consider a single inertia coordinates system and inter-component constraint forces. In addition, Langrangian method is faster and more efficient in terms of computation time and effort required to analyze and model engineering systems.\r\n\r\nIn Newtonian mechanics, a local condition, e.g., initial position and velocity (or momentum), is required for calculating the future states of a system. Using Newton\u2019s law of motion, for a system or components of a system, the sum of forces (both applied, $\\vv{F}_a$ and constrained\/internal, $\\vv{F}_c$), is equal to the time rate of change of the momentum, $\\vv{p}$.\r\n\r\n\\begin{equation}\r\n\r\n\\sum(\\vv{F}_a + \\vv{F}_c) = \\frac{d\\vv{p}}{dt}\r\n\r\n\\tag{2.1}\r\n\r\n\\end{equation}\r\n\r\nIn order to identify the constraints, we usually isolate the components one by one from the rest of the system, while keeping the related dynamical equilibrium intact. This operation gives us the free-body diagram of each desired component, useful for analyzing the system\u2019s motion dynamics and calculating inter-component constraint forces. However, in the Lagrangian approach, we consider a quantity that is like energy in dimension, the Lagrangian $L$, and use a set of partial differential equations (PDEs)\u2014<em>Euler-Lagrange<\/em> or <em>Lagrange\u2019s<\/em> equations\u2014 to analyze the system dynamics.\r\n\r\nThe latter is much more effective approach for analyzing the systems with many degrees of freedom and for dealing with multi-domain systems. In general, <em>L<\/em> is a function of coordinates considered and their time derivatives and, as well, could explicitly depend on time. For example, in a one-dimensional system, with designated coordinate <em>x<\/em>, the Lagrangian is written as $L=L(x,\\dot x,t).$ We can visualize $L$ as the topography of a surface represented by $L$ as a function of $x$ and $\\dot x$, as shown in <a href=\"#F2-1\">Figure 2-1<\/a>. This surface can vary with time, hence explicit dependence of $L$ on time, or it could be stationary. An example of the former is the motion of a mass particle on the surface of a moving sphere. Similarly, the Lagrangian of such a system is stationary if the sphere is not moving. The visualization presented in reference <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R9\"><strong>[9]<\/strong><\/a> may help readers with understanding Lagrangian surface.\r\n\r\n[caption id=\"attachment_94\" align=\"aligncenter\" width=\"459\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-1\/\" rel=\"attachment wp-att-94\"><img class=\"wp-image-94 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-1.jpg\" alt=\"\" width=\"459\" height=\"344\" \/><\/a> Figure 2-1 Lagrangian surface visualized in x-$\\dot x$ space[\/caption]\r\n\r\nThe foundation of Lagrangian mechanics rests on the principle of <em>stationary action integral<\/em> (also referred to as Hamilton\u2019s principle) . This principle simply states that a system\u2019s motion from a given state to another is such that a specific quantity (i.e., the system\u2019s Lagrangian function) related to its motion is extremized (i.e., minimized or maximized); hence, the value of its integral (i.e., the action integral, $\\mathcal{A}$) remains invariant <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R10\"><strong>[10]<\/strong><\/a>.\r\n<div class=\"textbox\">The motion of a system from $t_1$ to $t_2$ is such that the action integral has a stationary value for the actual path of the motion<\/div>\r\nIn other words, among all possible paths available for the motion of the system to go through, there exists one specific path that minimizes\/maximizes (for most systems minimizes; hence, this is also referred to a <em>principle of least action<\/em>) the integral of the corresponding Lagrangian with respect to time. Mathematically, the stationary action integral can be stated as\r\n\r\n\\begin{equation}\r\n\r\n\\delta \\mathcal{A} = \\delta \\left[ \\int_{t_1}^{t_2} L(x,\\dot x, t)dt \\right] = 0\r\n\r\n\\tag{2.2}\r\n\r\n\\end{equation}\r\n\r\nUsing calculus of variations <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R12\"><strong>[12]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a> and Equation (2.2) it can be shown (see <a href=\"#S2-5\">section 2.5<\/a>) that <em>L<\/em> should satisfy Lagrange\u2019s equation, or\r\n\r\n\\begin{equation}\r\n\r\n\\frac{d}{dt} \\left(\\frac{\\partial L}{\\partial \\dot x} \\right) - \\frac{\\partial L}{\\partial x} = 0\r\n\r\n\\tag{2.3}\r\n\r\n\\end{equation}\r\n\r\nwhere <em>L<\/em> is defined as $L=T-V$, with $T$ being the kinetic energy and $V$ the potential energy functions. With reference to <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-1\">Figure 2-1<\/a>, $\\dfrac{\\partial L}{\\partial x} \\big|_{\\dot x=const}$ is the slope at a selected point on the curve at the cross-section of surface $L$ and a plane parallel to $x$-plane at desired $\\dot x$, and $\\dfrac{d}{dt} \\left(\\dfrac{\\partial L}{\\partial \\dot x}\\right) \\big|_{x=const}$ is the rate of change in the slope at the same selected point on the curve at the cross-section of a plane parallel to $\\dot x$-plane drawn from and including the selected point the same point. In other words, we draw two planes parallel to the $x$ and $\\dot x$ planes and equate their corresponding slopes at their intersectional point. Therefore, for a stationary point, these two quantities should be equal, as given by Euler\u2019s equation (2.3). This is shown in the following sketch, see <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-2\">Figure 2-2<\/a>. <a id=\"F2-2\"><\/a>\r\n\r\n[caption id=\"attachment_109\" align=\"aligncenter\" width=\"907\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-2\/\" rel=\"attachment wp-att-109\"><img class=\"wp-image-109 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2.jpg\" alt=\"\" width=\"907\" height=\"657\" \/><\/a> Figure 2 2 A sketch for visualizing Euler-Lagrange's equation[\/caption]\r\n\r\nBy working out a simple example, we show that the Lagrangian approach is equivalent to the Newtonian approach in terms of the system\u2019s equation of motion.\r\n<h1>2.2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Mass-Spring System<a id=\"S2-2\"><\/a><\/h1>\r\nFor this example, we show that Equation (2.3) gives the same results as that of Newton\u2019s law of motion when applied to a simple mass-spring system, as sketched in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-3\">Figure 2-3<\/a>.<a id=\"F2-3\"><\/a>\r\n\r\n[caption id=\"attachment_113\" align=\"aligncenter\" width=\"876\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-3\/\" rel=\"attachment wp-att-113\"><img class=\"wp-image-113 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3.jpg\" alt=\"\" width=\"876\" height=\"343\" \/><\/a> Figure 2-3 A frictionless mass-spring system[\/caption]\r\n\r\nThe kinetic energy for the mass $m$ is $T = \\dfrac{1}{2} m\\dot x^2$ and the spring potential energy (i.e. stored elastic energy) with the spring constant <em>k<\/em> is $V=\\int kxdx = \\dfrac{1}{2} kx^2$. Therefore, using Equation (2.3), we get $\\dfrac{d}{dt} \\left[ \\dfrac{\\partial}{\\partial \\dot x} \\left(\\dfrac{1}{2}m\\dot x^2 - \\dfrac{1}{2}kx^2 \\right) \\right] - \\dfrac{\\partial}{\\partial x} \\left(\\dfrac{1}{2}m \\dot x^2 - \\dfrac{1}{2}kx^2 \\right) = 0$, or $m\\ddot x + kx = 0$. Note that for this analysis we did not need to consider the free-body diagram of mass $m$ nor the spring force as the constraining force acting on it; rather, we used the scalar quantity $(T-V)$. However, the assumption of having a potential function $V$ from which we can calculate the spring force is required (i.e., $-\\nabla V = - \\dfrac{d(\\dfrac{1}{2} kx^2 )}{dx} = -kx$), see <a href=\"#S2-7\">section 2.7<\/a>.\r\n\r\nIn the following sections we expand on the Lagrangian method for discrete systems with related derivation, constraints and definitions for generalized coordinates, forces, and momenta.\r\n<h1><a id=\"S2-3\"><\/a>2.3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Lagrange\u2019s Equations for a Mass System in 3D Space<\/h1>\r\nWe consider a particle with mass $m$ in a 3D space $x_i = (x_1,x_2,x_3) \\equiv (x,y,z)$, Cartesian system. By definition, the Lagrangian function is written as $L=T-V= \\dfrac{1}{2} m(\\dot x^2 + \\dot y^2 + \\dot z^2 ) - V(x,y,z)$. We have assumed that the potential energy function is only a function of the space coordinates, so-called <em>holonomic<\/em> system. We now form two sets of derivatives $\\dfrac{\\partial L}{\\partial \\dot x_i} = p_i$ and $\\dfrac {\\partial L}{\\partial x_i} = F_i$ of the Lagrangian function $L=L( x,y,z,\\dot x, \\dot y, \\dot z)$. Therefore, e.g., in 1D space, we have $\\frac{\\partial L}{\\partial \\dot x} = m\\dot x$ and $\\dfrac{\\partial L}{\\partial x} = - \\dfrac{\\partial V}{\\partial x} = F_x$. Hence $F_x$ is a conservative force (see <a href=\"#S2-7\">section 2.7<\/a>). Now, using Newton\u2019s second law, we can write the equation of motion, its $x$-component, as $m\\ddot x = F_x$ or $\\dfrac{d}{dt} \\left(\\dfrac{\\partial L}{\\partial \\dot x} \\right) = p_i = m \\ddot x$ and $\\dfrac{\\partial L}{\\partial x}\u00a0 = F_x.$ Therefore, $\\dfrac{d}{dt} \\left(\\dfrac{\\partial L}{\\partial \\dot x} \\right) = \\dfrac{\\partial L}{\\partial x}$. Similar derivation can be performed for $y$ and $z$ components of the equation of motion. Therefore, we get the Euler-Lagrange equations\r\n\r\n\\begin{equation}\r\n\r\n\\frac{d}{dt} \\left(\\frac{\\partial L}{\\partial \\dot x_i} \\right) - \\frac{\\partial L}{\\partial x_i} = 0 \\quad, i=1,2,3\r\n\r\n\\tag{2.4}\r\n\r\n\\end{equation}\r\n\r\nThe motion of the particle could be considered, in principle, in another coordinate system, e.g., a cylindrical or spherical system, as well. Therefore, we can define a set of coordinates $q'_i = (q'_1,q'_2,q'_3)$ to represent arbitrary coordinate systems, including Cartesian or curvilinear, and write Equation (2.4) in terms of $q'_i$, as well, for generality.\r\n<h1><a id=\"S2-4\"><\/a>2.4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Generalized Coordinates, Momenta, and Forces<\/h1>\r\nAs mentioned previously, one of the advantages of Lagrangian method is that we do not require consideration of the constrained forces. Therefore, we can include only those coordinates that correspond to the degrees of freedom related to a system. This consideration leads us to the concept of generalized coordinates, which is used in Lagrangian mechanics instead of inertia coordinates used in the Newtonian mechanics.\r\n\r\nWe now define the generalized coordinates. First, we expand the system discussed in <a href=\"#S2-3\">section 2.3<\/a> to include $N$ number of particles that move in $3N$ coordinate space, or $q'_i=(q'_1,q'_2,\\dots,q'_{3N})$. However, in a real-world system we can have restrictions imposed on the system\u2019s motion; hence, some of the coordinates are constrained and do not vary independently. For example, a particle moving in a plane $(x-y)$ is constrained to move in $z$-direction $(z=0)$. Or, the mass bob of a pendulum moving in $(r-\\theta)$ plane is restricted to move out of $z$-plane and if the pendulum rod has a fixed length, then only coordinate $\\theta$ varies during its motion. To capture these constraints, it is common and convenient to define generalized coordinates. Assume that for a $3N$ coordinates system we have $N_c$ number of constraints. Therefore, the number of independent coordinates defining the motion is $n=3N-N_c$. By definition, for holonomic systems this is equal to the number of degrees of freedom <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a>. Now we define the <em>generalized coordinates<\/em> as a subset of the original coordinates, with $q_i=(q_1,q_2,\\dots,q_n)$. Note that $n&lt;3N$ is the number of degrees of freedom which is equal to the number of generalized coordinates, and coordinates of the $q_i$ system are not necessarily the same as those of the $q'_i$, by one-to-one comparison.\r\n\r\nFor derivation of the equations of motion of a system, using Lagrangian approach, we can calculate $n$ number of equations for the system, one by one, related to each generalized coordinate. We can also use the generalized coordinates to define the velocity-phase space, as the combined set of generalized coordinates and their corresponding time derivatives. Therefore, the Lagrangian, as a functional, reads\r\n\r\n\\begin{equation}\r\n\r\nL = L (\\underbrace{q_1,q_2,\\dots,q_n,\\dot q_1,\\dot q_2,\\dots, \\dot q_n}_{\\text{phase space}} ,t)\r\n\r\n\\tag{2.5}\r\n\r\n\\end{equation}\r\n\r\nNote that the time dependence of Lagrangian may be explicit for some systems and implicit for others and that the phase-space coordinates do not necessarily have the same units\/dimensions. For example, $q_1$ could be a displacement and $q_2$ an angle for a system like a pendulum with moving pivot point.\r\n\r\nThe fact that we can neglect the constrained coordinates in Lagrangian formulation is an advantage of this method over Newton\u2019s because we don\u2019t need to calculate the constrained \u201cforces\u201d in order to derive the equations of motion. Of course, the constrained forces can be calculated, if required, after having the solution to the system\u2019s equations of motion.\r\n\r\nLike the generalized coordinates, we also define associated generalized momenta and forces. As mentioned in the previous section, the definition of momentum in Lagrangian mechanics is more general than that of mass times the velocity. For example, it could be angular momentum, instead. Similarly, the definition of forces is not limited to mechanical forces; it can be applied, e.g., to voltage and temperature in electrical and thermal domains. Therefore, for each generalized coordinate we can define the corresponding generalized momentum and force. As given by Equation (2.6), we can write the generalized momenta and generalized force in terms of $L$, as\r\n\r\n\\begin{equation}\r\n\r\n\\begin{cases}\r\n\r\np_i\u00a0 = \\dfrac{\\partial L}{\\partial \\dot q_i}, \\text{generalized momenta}\\\\\r\n\r\n\\\\\r\n\r\nF_i = \\dfrac{\\partial L}{\\partial q_i}, \\text{generalized forces}\r\n\r\n\\end{cases}\r\n\r\n\\quad i = 1,\\dots,n\r\n\r\n\\tag{2.6}\r\n\r\n\\end{equation}\r\n\r\n<a href=\"#S2-7\">Section 2.7<\/a> discusses the topic of generalized force in terms of its types: conservative and non-conservative.\r\n<h1><a id=\"S2-5\"><\/a>2.5\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Hamilton\u2019s Principle and Lagrange\u2019s Equations<\/h1>\r\n[caption id=\"attachment_142\" align=\"alignright\" width=\"219\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/william-rowan-hamilton-portrait\/\" rel=\"attachment wp-att-142\"><img class=\"wp-image-142 size-medium\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/William-Rowan-Hamilton-portrait-219x300.png\" alt=\"\" width=\"219\" height=\"300\" \/><\/a> William Rowan Hamilton (1805\u20131865)[\/caption]\r\n\r\nHamilton\u2019s principle, as given by Equation (2.2), is basically a mathematical expression of calculus of variations application for a system dynamical motion with the realization that Lagrangian functional is the function that should be extremized <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R12\"><strong>[12]<\/strong><\/a>. Therefore, Lagrange\u2019s equations are resulted from the related calculations, naturally. This realization was first expressed by William Rowan Hamilton (1805-1865), <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R14\"><strong>[14]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R15\"><strong>[15]<\/strong><\/a>.\r\nEquation (2.4) can be written in terms of generalized coordinates, as\r\n\r\n\\begin{equation}\r\n\r\n\\frac{d}{dt} \\left(\\frac{\\partial L}{\\partial \\dot q_i} \\right) - \\frac{\\partial L}{\\partial q_i} = 0 \\quad, i = 1,2,\\dots,n\r\n\r\n\\tag{2.7}\r\n\r\n\\end{equation}\r\n\r\nEquation (2.7) shows that Lagrange\u2019s equation is consequence of, and necessary for, making the action integral stationary. We assume that variation $\\delta L$ results from variation in one of the arbitrarily selected coordinates, $\\delta q$ (dropping the subscript index for simplicity without losing the generality) while satisfying the fixed boundary conditions, or $\\delta q(t_1 ) = \\delta q(t_2 ) = 0$. Obviously, the same operation can be performed for all coordinates involved, $i=1,\\dots,n$.<a id=\"F2-4\"><\/a>\r\n\r\n[caption id=\"attachment_374\" align=\"aligncenter\" width=\"816\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-4\/\"><img class=\"size-full wp-image-374\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4.jpg\" alt=\"\" width=\"816\" height=\"594\" \/><\/a> Figure 2-4 Sketch for variation of $L$ for an arbitrary $\\delta q$[\/caption]\r\n\r\nSubstituting Equation (2.7) into Equation (2.2), after dropping the subscript index and assuming $L=L(q,\\dot q)$ for simplicity, we get\r\n\r\n\\begin{equation*}\r\n\r\n\\delta \\mathcal{A} = \\delta \\Big\\{ \\int_{t_1}^{t_2} \\left[ \\frac{d}{dt} \\left( \\frac{\\partial L}{\\partial \\dot q} \\right) - \\frac{\\partial L}{\\partial q} \\right] dt\\Big\\} = \\Bigg\\{ \\int_{t_1}^{t_2} \\delta \\big\\[\\underbrace{\\left[ \\frac{d}{dt} \\left( \\frac{\\partial L}{\\partial \\dot q} \\right) - \\frac{\\partial L}{\\partial q} \\right]}_{L} \\big\\\u00a0 dt \\Bigg\\} = 0\r\n\r\n\\end{equation*}\r\n\r\nBut $\\delta L = \\dfrac{\\partial L}{\\partial q} \\delta q + \\dfrac{\\partial L}{\\partial \\dot q} \\delta \\dot q$ and the last term can be written as $\\dfrac{\\partial L}{\\partial \\dot q} \\delta \\dot q = \\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q} \\delta q \\right) - \\dfrac{d}{dt} \\left(\\dfrac{\\partial L}{\\partial \\dot q} \\right) \\delta q$ and hence, $\\delta L = \\left[ \\dfrac{\\partial L}{\\partial q} - \\dfrac{d}{dt} \\left(\\dfrac{\\partial L}{\\partial \\dot q} \\right) \\right] \\delta q + \\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q} \\delta q \\right)$.\r\n\r\nBack substituting into action integral expression, we get $\\delta \\mathcal{A} = \\int_{t_1}^{t_2} \\left[ \\dfrac{\\partial L}{\\partial q} - \\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q} \\right) \\right] \\delta q \\: dt + \\int_{t_1}^{t_2} \\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q} \\delta q \\right) dt = 0$.\r\n\r\nBut the last integral gives $\\int_{t_1}^{t_2} \\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q} \\delta q \\right) dt = \\dfrac{\\partial L}{\\partial \\dot q} \\delta q \\Big|_{t_1}^{t_2} = \\dfrac{\\partial L}{\\partial \\dot q} \\bigg[ \\underbrace{\\delta q (t_2) - \\delta q(t_1)}_{=0} \\bigg] = 0$.\r\n\r\nTherefore, we have $\\delta \\mathcal{A} = \\int_{t_1}^{t_2} \\left[ \\dfrac{\\partial L}{\\partial q} - \\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q} \\right) \\right] \\delta q \\: dt = 0$. Since $\\delta q$ is arbitrarily selected, the integrand should be equal to zero in order to have the value of the integral null, or $\\dfrac{\\partial L}{\\partial q} = \\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q} \\right)$. This concludes the derivation of Lagrange\u2019s equation using Hamilton\u2019s principle. However, one can derive Lagrange\u2019s equation in a more direct way using calculus of variations or virtual work principles, see <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\">[13]<\/a><\/strong>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R16\">[16]<\/a><\/strong>.\r\n\r\nSo far, we have considered systems that do not involve energy dissipation. In practice, however, we require extra terms in Lagrange\u2019s equation to account for friction existing in real-world systems. Therefore, we expand the discussion to include non-conservative forces, e.g., friction and dampers, and find the corresponding Lagrange equation, including related topics such as cyclic coordinates, symmetry, multi-domain, and higher-order systems, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R8\">[8]<\/a><\/strong>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\">[13]<\/a><\/strong>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R17\">[17]<\/a><\/strong>.\r\n<h1>2.6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cyclic Coordinates<\/h1>\r\nFrom Equation (2.6), it can be shown that if Lagrangian function does not have explicit dependency on one of the coordinates, say $q_k$, among all $q_i$, then the conjugate momentum $p_k$ is conserved. The proof is as follows. Writing the Lagrange\u2019s equation for coordinate $q_k$, we have $\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q_k} \\right) - \\dfrac{\\partial L}{\\partial q_k} = 0$. Since by definition, $L$ is not a function of $q_k$, then $\\dfrac{\\partial L}{\\partial q_k} = 0$. Therefore, $\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot q_k} \\right) = 0$, and written in terms of generalized momentum $p_k$, we get $\\dfrac{d}{dt} (p_k) = 0$, or $p_k$ is invariant with respect to time, hence conserved. It is common to call the coordinate $q_k$, <em>cyclic<\/em> or ignorable.\r\n<h1><a id=\"S2-7\"><\/a>2.7 \u00a0 \u00a0 \u00a0\u00a0 Conservative and Non-Conservative Forces<\/h1>\r\nThe generalized forces can be conservative or non-conservative. Conservative forces are those like gravity, buoyancy, mechanical spring, electrostatic, and magnetic. Non-conservative forces are those like friction, damping, and resistance.\r\n\r\nBy definition, a conservative force is curl free, or $\\vv{\\nabla} \\times \\vv{F} = 0$. Writing this expression in index notation, we have $\\mathcal{E}_{ijk}F_{k,j} = 0$, where $\\mathcal{E}_{ijk}$ is the permutation symbol <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R18\"><strong>[18]<\/strong><\/a>. For example, force under gravity is $(F_x,F_y,F_z)=(0,0,az)$. Calculating the curl gives $\\mathcal{E}_{123}F_{3,2}-\\mathcal{E}_{132}F_{2,3} + \\mathcal{E}_{231}F_{1,3} - \\mathcal{E}_{213}F_{3,1} + \\mathcal{E}_{312}F_{2,1} - \\mathcal{E}_{321}F_{1,2}$. Each term is identically zero; hence, the force under gravity field is conservative. Now, using the vector identity $\\vv \\nabla \\times \\vv \\nabla(V) = 0$ or $\\mathcal{E}_{ijk}V_{,kj} = 0$; i.e., the curl of a gradient of a scalar function is identically zero, and we can write a conservative force as the gradient of a scalar, such as potential function <em>V<\/em> as $\\vv{F_c} = -\\vv{\\nabla}V$. By convention, the negative sign indicates that potential energy increases when work is done against a force field and vice versa.\r\n\r\nWe now, write Equation (2.7), after dropping the index $i$ for simplicity, for $T=T(\\dot q)$ and $V=V(q)$. Therefore, $\\dfrac{d}{dt} \\left(\\dfrac{\\partial (T-V)}{\\partial \\dot q} \\right) - \\dfrac{\\partial(T-V)}{\\partial q} = 0$, or $\\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q} \\right) + \\dfrac{\\partial V}{\\partial q} = 0.$ But $\\dfrac{\\partial V}{\\partial q} = -F_c$ , and we get $\\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q} \\right) = F_c$ . This is the equation of motion (i.e. $\\dfrac{d}{dt} \\bigg( \\dfrac{\\partial (\\dfrac{1}{2} m \\dot q^2)}{\\partial \\dot q} \\bigg) = \\dfrac{d \\dot p}{dt}$). We clearly see that the conservative force is already included in the Lagrange equation given by Equation (2.7). Now, for the case that we have a non-conservative force, or that the potential function is a function of velocity $\\dot q$ and <em>q<\/em>, (i.e. $V=V(q,\\dot q)$ or $V=V(\\dot q)$), then we can write use Equation (2.7) to write $\\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q} \\right) - \\dfrac{d}{dt} \\left( \\dfrac{\\partial V}{\\partial \\dot q} \\right) + \\dfrac{\\partial V}{\\partial q} = 0.$ Re-arranging the term in this expression, we get $\\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q} \\right) = \\dfrac{d}{dt} \\left( \\dfrac{\\partial V}{\\partial \\dot q} \\right) - \\dfrac{\\partial V}{\\partial q}.$ We define the expression on the right-hand side as the non-conservative force, as $F_{nc} = \\dfrac{d}{dt} \\left( \\dfrac{\\partial V}{\\partial \\dot q} \\right) - \\dfrac{\\partial V}{\\partial q}.$ Hence, $\\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q} \\right) = \\dfrac{d \\dot p}{dt} = F_{nc}.$ Again, we have shown that the non-conservative force is already included in the Lagrange equation given by Equation (2.7), provided a modified potential function is defined, as given by $F_{nc}$. See reference listed at <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\">[11]<\/a><\/strong> for more details.\r\n<h1>2.8\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Alternative form of Lagrange\u2019s Equation<\/h1>\r\nIn <a href=\"#S2-7\">section 2.7<\/a>, we discussed the applicability of Lagrange\u2019s equation given by Equation (2.7) for conservative and non-conservative forces. In practice, we could benefit from a more explicit form of the Lagrange equation whose terms can be easily identified for different types of forces, including energy dissipation such as damping and resistance. In this way, we can readily calculate the related terms in the Lagrange equation for modeling and simulation of a desired system.\r\n\r\n[caption id=\"attachment_149\" align=\"alignright\" width=\"243\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/jean-le-rond-dalembert-1717-1783-by-french-school-of-the-18t\/\" rel=\"attachment wp-att-149\"><img class=\"size-medium wp-image-149\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-243x300.jpg\" alt=\"\" width=\"243\" height=\"300\" \/><\/a> Jean le Rond d'Alembert (1717\u20131783)[\/caption]\r\n\r\nThere are several possible ways to derive the Lagrange equation using, e.g., principles of virtual work and d'Alembert's principle, directly from Newton\u2019s second law of motion and first law of thermodynamics or energy conservation (e.g., conservation of sum of kinetic and potential energies) <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R8\"><strong>[8]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R15\"><strong>[15]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R17\"><strong>[17]<\/strong><\/a>.\r\n\r\nWe use the conservation of energy approach to derive the alternative form of Equation (2.7) including its expansion <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R17\"><strong>[17]<\/strong><\/a>.\r\n\r\nWe consider the kinetic energy of a system with generalized coordinates $q_i$ for $(i=1,2,\\dots,n$) (see <a href=\"#S2-4\">section 2.4<\/a>) represented by $T=T(q_i,\\dot q_i)$ and its potential energy by $V=V(q_i,\\dot q_i)$. Note that, as we discussed previously, for many mechanical systems kinetic energy is a function of $\\dot q_i$ and potential energy a function of $q_i$, only. Therefore, the resulted Lagrange equation can be simplified, accordingly. Now, using conservation of total energy of the system, we can write\r\n\r\n\\begin{equation}\r\n\r\nd(T+V)=0\r\n\r\n\\tag{2.8}\r\n\r\n\\end{equation}\r\n\r\nBut $dT = \\dfrac{\\partial T}{\\partial q_i} dq_i + \\dfrac{\\partial T}{\\partial \\dot q_i} d \\dot q_i$ and $dV = \\dfrac{\\partial V}{\\partial q_i} dq_i + \\dfrac{\\partial V}{\\partial \\dot q_i} d \\dot q_i$ , using their functional relationships. After substituting into Equation (2.8), we get $\\dfrac{\\partial T}{\\partial q_i} dq_i + \\dfrac{\\partial T}{\\partial \\dot q_i} d \\dot q_i + \\dfrac{\\partial V}{\\partial q_i} + \\dfrac{\\partial V}{\\partial \\dot q_i} d \\dot q_i = 0$. Note that the Einstein summation convention applies, or $dT = \\dfrac{\\partial T}{\\partial q_1} dq_1 + \\cdots + \\dfrac{\\partial T}{\\partial q_n} dq_n + \\dfrac{\\partial T}{\\partial \\dot q_1} d \\dot q_1 + \\cdots + \\dfrac{\\partial T}{\\partial \\dot q_n} d \\dot q_n$ . Now, using the relation for the kinetic energy of the system, or\r\n\r\n\\begin{equation}\r\n\r\nT=\\frac{1}{2}m_{ij} \\dot q_i \\dot q_j\r\n\r\n\\tag{2.9}\r\n\r\n\\end{equation}\r\n\r\nwhere $m_{ij}$ is defined as the generalized mass matrix, a diagonally nonzero matrix, corresponding to the generalized coordinates. Therefore, its diagonal elements could be mass or moment of inertia when the generalized coordinates are displacement and angle, respectively. For example, for a $n=2$ system, we have:\r\n\r\n$T= \\dfrac{1}{2} m_{ij} \\dot q_i \\dot q_j = \\dfrac{1}{2} (m_{1j} \\dot q_1 \\dot q_j + m_{2j} \\dot q_2 \\dot q_j) $.\r\n\r\nAfter expanding the expression in the bracket on the R.H.S., we get:\r\n\r\n$T=\\dfrac{1}{2}(m_{11} \\dot q_1 \\dot q_1 + m_{12} \\dot q_1 \\dot q_2 +m_{21} \\dot q_2 \\dot q_1 + m_{22} \\dot q_2 \\dot q_2)$.\r\n\r\nWith having $\\dot q_1 = \\dot x$ and $\\dot q_1 = \\dot \\theta$, and $m_{11} = m$, particle mass, $m_{22} = I$ , inertia, and $m_{12} = m_{21} = 0$ we get $T= \\dfrac{1}{2} (m \\dot x^2 + I \\dot \\theta^2 ).$ Now, differentiating <em>T<\/em> with respect to $\\dot q_i$, we get $\\dfrac{\\partial T}{\\partial \\dot q_i} = m_{ij} \\dot q_j$ and substituting into Equation (2.9), we get $T = \\dfrac{1}{2} \\dfrac{\\partial T}{\\partial \\dot q_i} \\dot q_i.$ Now, we calculate total change of <em>T<\/em> using the last expression, or $2dT = d \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\dot q_i \\right) = d \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\right) \\dot q_i + \\dfrac{\\partial T}{\\partial \\dot q_i}.$ But we had, $dT = \\dfrac{\\partial T}{\\partial q_i} dq_i + \\dfrac{\\partial T}{\\partial \\dot q_i} d \\dot q_i}.$ Therefore, subtracting these last two relations, gives, after simplification, $dT = d \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\right) \\dot q_i - \\dfrac{\\partial T}{\\partial q_i} dq_i.$ But we can manipulate the first term on the right-hand side as $d \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\right) \\dot q_i = d \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\right) \\dfrac{dq_i}{dt} = \\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\right) dq_i.$ Substituting into the last relation for <em>dT<\/em>, we get\r\n\r\n\\begin{equation}\r\n\r\ndT = \\left[ \\frac{d}{dt} \\left( \\frac{\\partial T}{\\partial \\dot q_i} \\right) - \\frac{\\partial T}{\\partial q_i} \\right] dq_i\r\n\r\n\\tag{2.10}\r\n\r\n\\end{equation}\r\n\r\nNow, substituting Equation (2.10) into (2.8), we get $\\left[ \\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\right) - \\dfrac{\\partial T}{\\partial q_i} \\right] dq_i + dV = 0.$ Now, if $V=V(q_i),$ i.e. holonomic systems, then we get $dV = \\dfrac{\\partial V}{\\partial q_i}dq_i}$ and, after substitution, we have $\\left[ \\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot q_i} \\right) - \\dfrac{\\partial T}{\\partial q_i} + \\dfrac{\\partial V}{\\partial q_i} \\right]dq_i = 0.$ This expression is true for any arbitrarily selected $dq_i$; therefore, the terms in the bracket should be identically null, or\r\n\r\n\\begin{equation}\r\n\r\n\\frac{d}{dt} \\left( \\frac{\\partial T}{\\partial \\dot q_i} \\right) - \\frac{\\partial T}{\\partial q_i} + \\frac{\\partial V}{\\partial q_i} = 0\r\n\r\n\\tag{2.11}\r\n\r\n\\end{equation}\r\n\r\nEquation (2.11), is an alternative form of Lagrange\u2019s equation and holds when forces associated with the system are conservative, included in the $\\dfrac{\\partial V}{\\partial q_i}$ term. Note that using Lagrangian, $L=T-V$ and Equation (2.11) we can recover Equation (2.7). The inclusion of non-conservative generalized forces, $Q_i$ (usually the loading associated with each coordinate) should be added to the right-hand side of Equation (2.11). Also, energy dissipation due to viscous damping or resistance is usually given as $D=D(\\dot q_i^2)$ and contributes to Lagrange equation as $\\dfrac{\\partial D}{\\partial \\dot q_i}$. Finally, we get the alternative form of Lagrange equation, as\r\n\r\n\\begin{equation}\r\n\r\n\\frac{d}{dt} \\left( \\frac{\\partial T}{\\partial \\dot q_i} \\right) - \\frac{\\partial T}{\\partial q_i} + \\frac{\\partial D}{\\partial \\dot q_i} + \\frac{\\partial V}{\\partial q_i} = Q_i \\quad , \\: i = 1,2,\\cdots,n\r\n\r\n\\tag{2.12}\r\n\r\n\\end{equation}\r\n\r\nRecall the <em>n<\/em> is the number of generalized coordinates. In matrix form, Equation (2.12) can be written as\r\n\r\n\\begin{equation*}\r\n\r\n\\dfrac{d}{dt} \\begin{Bmatrix} \\dfrac{\\partial T}{\\partial \\dot q_1}\\\\ \\vdots \\\\ \\dfrac{\\partial T}{\\partial \\dot q_n} \\end{Bmatrix} - \\begin{Bmatrix} \\dfrac{\\partial T}{\\partial q_1}\\\\ \\vdots \\\\ \\dfrac{\\partial T}{\\partial q_n} \\end{Bmatrix} + \\begin{Bmatrix} \\dfrac{\\partial D}{\\partial \\dot q_1}\\\\ \\vdots \\\\ \\dfrac{\\partial D}{\\partial \\dot q_n} \\end{Bmatrix} + \\begin{Bmatrix} \\dfrac{\\partial V}{\\partial q_1}\\\\ \\vdots \\\\ \\dfrac{\\partial V}{\\partial q_n} \\end{Bmatrix} = \\begin{Bmatrix} Q_i\\\\ \\vdots \\\\ Q_n \\end{Bmatrix}\r\n\r\n\\end{equation*}\r\n<h1>2.9 \u00a0 \u00a0 \u00a0\u00a0 Multi-Domain Systems<\/h1>\r\nLagrangian method can be applied to many kinds of engineering systems, including mechanical, electrical, thermal, hydraulic, and their possible combinations as multi-domain systems. As discussed in the previous sections, the established concept of generalized coordinates, momenta, and force are key tools to model such systems.\r\n<h1>2.10\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Systems with Higher Order Equations<\/h1>\r\nSystem equations are mostly second-order differential equations, like Newton\u2019s second law, and Kirchohff\u2019s law for RCL circuits. Previous sections, e.g., Equation (2.7), presented Lagrange\u2019s equation for such systems. One may require, mostly in continuous systems, to build the Lagrangian function for higher-order systems, e.g., fourth-order bi-harmonic equation for fluid flows or plate displacements. Fortunately, the Lagrangian method can be easily extended to cover the higher-order systems by considering a Lagrangian function, as given by Equation (2.13)\r\n\r\n\\begin{equation}\r\n\r\nL=L(q_i, \\dot q_i, \\ddot q_i, \\dots, t)\r\n\r\n\\tag{2.13}\r\n\r\n\\end{equation}\r\n\r\nUsing the calculus of variations and Hamilton\u2019s principle, we can derive the corresponding Lagrange\u2019s equation <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R9\"><strong>[9]<\/strong><\/a>. This s done by:\r\n\r\n\\begin{equation}\r\n\r\n\\frac{\\partial L}{\\partial q_i} + \\sum_{m=1}^{k} (-1)^m \\frac{d^m}{dt^m} \\left( \\frac{\\partial L}{\\partial q_{i,m}} \\right) = 0 \\quad i = 1,2,\\cdots,n\r\n\r\n\\tag{2.14}\r\n\r\n\\end{equation}\r\n\r\nwhere <em>m<\/em> is the differentiation order; e.g., for $m=3$, we have\r\n\r\n\\begin{equation*}\r\n\r\n\\frac{\\partial L}{\\partial q_i} - \\frac{d}{dt} \\left( \\frac{\\partial L}{\\partial \\dot q_i} \\right) + \\frac{d^2}{dt^2} \\left( \\frac{\\partial L}{\\partial \\ddot q_i} \\right) - \\frac{d^3}{dt^3} \\left(\\frac{\\partial L}{\\partial \\dddot q_i} \\right) = 0\r\n\r\n\\end{equation*}\r\n\r\nWorked-out examples are useful to demonstrate applications of Lagrangian method. These examples, for mechanical and electrical systems, appear below. Each example includes numerical values assigned to the parameters and presents simulation results. Selected examples include accompanying screen-recorded video files demonstrating the solution steps for related system equations using 20-sim. After learning from the related video file, the reader can modify the parameters and run the simulation for specific design cases.\r\n<h1>2.11\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Multi-Mass-Spring System<\/h1>\r\nWe want to find the equations governing its motion dynamics for the system sketched in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-5\">Figure 2-5<\/a>. For this example, we neglect the effect of gravity.<a id=\"F2-5\"><\/a>\r\n\r\n[caption id=\"attachment_115\" align=\"aligncenter\" width=\"590\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-5\/\" rel=\"attachment wp-att-115\"><img class=\"size-full wp-image-115\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-5.jpg\" alt=\"\" width=\"590\" height=\"639\" \/><\/a> Figure 2-5 A mass-spring system with three degrees of freedom[\/caption]\r\n\r\nThis system has three degrees of freedom $(x_1,x_2,x_3 )$ associated with three masses $(m_1,m_2,m_3 )$. For three masses, $N=3$, and each can move vertically; hence, the number of constraints is $N_c=2$ for each mass. This gives $n = 3 \\times 3 - 3 \\times 2 = 3$. The Lagrangian method is used to find the equations of motion, or three coupled second-order differential equations. We start by writing the kinetic and potential energy expressions of the system and forming the corresponding Lagrangian. The kinetic energy of the system is $T= \\dfrac{1}{2} (m_1 \\dot x_1^2 + m_2 \\dot x_2^2 + m_3 \\dot x_3^2$). For the potential energy, we should use the difference in displacements associated with each spring because the neutral position of the unstressed springs do not contribute to the potential energy. For example, for the spring $k_5$, connecting masses $m_1$ and $m_3$, we should use $X =| x_1 - x_3 |$ as the variable, or $\\int k_5XdX = \\dfrac{1}{2} k_5(x_1-x_3)^2$. Therefore, the potential energy of the system consisting of the sum of all springs is $V= \\dfrac{1}{2}(k_1x_1^2 + k_2x_2^2 + k_3x_3^2) + \\dfrac{1}{2}k_4(x_2 - x_3)^2 + \\dfrac{1}{2}k_5(x_1 - x_3)^2 + \\dfrac{1}{2}k_6(x_1 - x_2)^2$. Note that for this system the kinetic energy is a function of only $\\dot x_i$ and potential energy a function of $x_i$. Applying Euler-Lagrange equation to each mass, or degree of freedom, we get a system of ODEs, written in matrix form,\r\n\r\n\\begin{equation*}\r\n\r\n\\begin{bmatrix} m_1 &amp; 0 &amp; 0\\\\ 0 &amp; m_2 &amp; 0\\\\ 0 &amp; 0 &amp; m_3 \\end{bmatrix} \\begin{Bmatrix} \\ddot x_1\\\\ \\ddot x_2\\\\ \\ddot x_3 \\end{Bmatrix} + \\begin{bmatrix} k_1 + k_5 + k_6 &amp; -k_6 &amp; -k_5\\\\ -k_6 &amp; k_2 + k_4 + k_6 &amp; -k_4\\\\ -k_5 &amp; -k_4 &amp; k_3 + k_4 + k_5 \\end{bmatrix} \\begin{Bmatrix} x_1\\\\ x_2\\\\ x_3 \\end{Bmatrix} = \\begin{Bmatrix} 0\\\\ 0\\\\ 0 \\end{Bmatrix}\r\n\r\n\\end{equation*}\r\n\r\nFor example, the Euler-Lagrange equation associated with mass $m_1$ reads $\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot x_1} \\right) - \\dfrac{\\partial L}{\\partial x_1} = 0$. But we have $\\dfrac{\\partial L}{\\partial \\dot x_1} = \\dfrac{\\partial (T-V)}{\\partial \\dot x_1} = \\dfrac{\\partial T}{\\partial \\dot x_1} = m_1 \\dot x_1$ and $- \\dfrac{\\partial L}{\\partial x_1} = - \\dfrac{\\partial (T-V)}{\\partial x_1} = \\dfrac{\\partial V}{\\partial x_1} = k_1x_1 + k_5x_1 + k_6x_1 - k_6x_2 - k_5x_3$. Having information about initial and boundary conditions for displacements and\/or velocities, we can obtain the solution of the system\u2019s equations using 20-sim. An initial velocity of 0.2 $m\/s$ is applied to mass $m_2$, for example. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real m1 = 15.0 {kg};\r\nreal m2 = 30.0 {kg};\r\nreal m3 = 15.0 {kg};\r\nreal k1 = 50.0 {N\/m};\r\nreal k2 = 100.0 {N\/m};\r\nreal k3 = 50.0 {N\/m};\r\nreal k4 = 20.0 {N\/m};\r\nreal k5 = 70.0 {N\/m};\r\nreal k6 = 10.0 {N\/m};<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real x1 {m};\r\nreal x2 {m};\r\nreal x3 {m};\r\nreal x1_dot {m\/s}; \/\/ velocity\r\nreal x2_dot {m\/s}; \/\/ velocity\r\nreal x3_dot {m\/s}; \/\/ velocity\r\nreal x1_dot_dot {m\/s2}; \/\/acceleration\r\nreal x2_dot_dot {m\/s2}; \/\/acceleration\r\nreal x3_dot_dot {m\/s2}; \/\/acceleration\r\nreal Fk1 {N}; \/\/ force spring k1\r\nreal Fk2 {N}; \/\/ force spring k2\r\nreal Fk3 {N}; \/\/ force spring k3<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">x1_dot_dot = -(1\/m1)*((k1+k5+k6)*x1-k6*x2-k5*x3);\r\nx2_dot_dot = -(1\/m2)*((k2+k4+k6)*x2-k6*x1-k4*x3);\r\nx3_dot_dot = -(1\/m3)*((k3+k4+k5)*x3-k4*x2-k5*x1);\r\nx1_dot = int (x1_dot_dot , 0);\r\nx2_dot = int (x2_dot_dot , 0.2); \/\/initial velocity 0.2m\/s\r\nx3_dot = int (x3_dot_dot , 0);\r\nx1 = int (x1_dot , 0.2); \/\/initial displacement 0.2m\r\nx2 = int (x2_dot , 0);\r\nx3 = int (x3_dot , -0.1); \/\/initial displacement -0.1m\r\nFk1 = k1*x1;\r\nFk2 = k2*x2;\r\nFk3 = k3*x3;<\/p>\r\nThe results for displacements of the masses and velocities are shown below, see <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-6\">Figure 2-6<\/a>.<a id=\"F2-6\"><\/a>\r\n\r\n[caption id=\"attachment_116\" align=\"aligncenter\" width=\"559\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-6\/\" rel=\"attachment wp-att-116\"><img class=\"size-full wp-image-116\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-6.jpg\" alt=\"\" width=\"559\" height=\"253\" \/><\/a> Figure 2-6 Sample results as output from 20-sim[\/caption]\r\n\r\nHere is a video showing how to build and run the model for this example in 20-sim:\r\n\r\n&nbsp;\r\n\r\nhttps:\/\/vimeo.com\/522139459\r\n<h1>2.12\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A System with Energy Dissipation and Applied External Force<\/h1>\r\nWe consider a system with two degrees of freedom, as shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-7\">Figure 2-7<\/a>. The damping coefficients $b_1$ and $b_2$ and spring stiffness $k_1$ and $k_2$ are used to calculate the potential and damping functions $V$ and $D$, respectively. <a id=\"F2-7\"><\/a>\r\n\r\n[caption id=\"attachment_375\" align=\"aligncenter\" width=\"1486\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-7\/\"><img class=\"size-full wp-image-375\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7.jpg\" alt=\"\" width=\"1486\" height=\"480\" \/><\/a> Figure 2-7 A mass-spring-damper system with two degrees of freedom[\/caption]\r\n\r\nThe non-conservative Rayleigh energy dissipation function is, $D= \\dfrac{1}{2}b_1 \\dot x_1^2 + \\dfrac{1}{2} b_2( \\dot x_2 - \\dot x_1)^2$. The derivative of this function with respect to $\\dot x_i, \\dfrac{\\partial D}{\\partial \\dot x_i}$ gives the damping forces associated with mass $m_i$. The kinetic energy is $T= \\dfrac{1}{2}(m_1 \\dot x_1^2 + m_2 \\dot x_2^2)$, and potential energy reads $V = \\dfrac{1}{2}k_1x_1^2 + \\dfrac{1}{2}k_2(x_2 - x_1)^2$\r\n\r\nLagrange\u2019s equation for motion of mass $m_1$ reads $\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot x_1} \\right) - \\dfrac{\\partial L}{\\partial x_1} + \\dfrac{\\partial D}{\\partial \\dot x_1} = 0$ and for mass $m_2$ is $\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot x_2} \\right) - \\dfrac{\\partial L}{\\partial x_2} + \\dfrac{\\partial D}{\\partial \\dot x_2} = F(t)$. Performing the derivatives, we get $\\dfrac{\\partial T}{\\partial \\dot x_i} = m_1 \\dot x_1, \\dfrac{\\partial T}{\\partial \\dot x_2} = m_2 \\dot x_2, \\dfrac{\\partial V}{\\partial x_1} = (k_1 + k_2)x_1 - k_2x_2, \\dfrac{\\partial V}{\\partial x_2} = k_2x_2 - k_2x_1, \\dfrac{\\partial D}{\\partial \\dot x_1} = (b_1 + b_2) \\dot x_1 - b_2 \\dot x_2, \\dfrac{\\partial D}{\\partial \\dot x_2} = b_2 \\dot x_2 - b_2 \\dot x_1.$\r\n\r\nUsing Lagrange\u2019s equation, with $L=T-V$, we get the equations of motion of the system in matrix form as\r\n\r\n\\begin{equation*}\r\n\r\n\\begin{bmatrix} m_1 &amp; 0\\\\ 0 &amp; m_2 \\end{bmatrix} \\begin{Bmatrix} \\ddot x_1\\\\ \\ddot x_2 \\end{Bmatrix} + \\begin{bmatrix} b_1 + b_2 &amp; -b_2\\\\ -b_2 &amp; b_2 \\end{bmatrix} \\begin{Bmatrix} \\dot x_1\\\\ \\dot x_2 \\end{Bmatrix} + \\begin{bmatrix} k_1 + k_2 &amp; -k_2\\\\ -k_2 &amp; k_2 \\end{bmatrix} \\begin{Bmatrix} x_1\\\\\u00a0 x_2 \\end{Bmatrix} = \\begin{Bmatrix} 0\\\\ F(t) \\end{Bmatrix}\r\n\r\n\\end{equation*}\r\n\r\nWe use 20-sim to solve the systems equations. A step function is used for applied force. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real m1 = 2.0 {kg};\r\nreal m2 = 1.0 {kg};\r\nreal k1 = 20.0 {N\/m};\r\nreal k2 = 30.0 {N\/m};\r\nreal b1 = 0.1 {N.s\/m};\r\nreal b2 = 0.05 {N.s\/m};\r\nreal start_time = 3 {s};\r\nreal amplitude = 5 {N};<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real x1 {m};\r\nreal x2 {m};\r\nreal x1_dot {m\/s};\r\nreal x2_dot {m\/s};\r\nreal x1_dot_dot {m\/s2};\r\nreal x2_dot_dot {m\/s2};\r\nreal F_applied {N}; \/\/ applied force<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">x1_dot_dot = -(b1+b2)\/m1*x1_dot+b2\/m1*x2_dot-(k1+k2)\/m1*x1+k2\/m1*x2;\r\nx2_dot_dot = -(1\/m2)*(-b2*x1_dot+b2*x2_dot-k2*x1+k2*x2)+F_applied;\r\nx1_dot = int (x1_dot_dot , 0);\r\nx2_dot = int (x2_dot_dot , 0);\r\nx1 = int (x1_dot , 0);\r\nx2 = int (x2_dot , 0);\r\nF_applied = amplitude*step (start_time);<\/p>\r\nThe results for displacements of the masses and applied force are shown below, see <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-8\">Figure 2-8<\/a>.<a id=\"F2-8\"><\/a>\r\n\r\n<img class=\"wp-image-2532 aligncenter\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-300x158.png\" alt=\"\" width=\"719\" height=\"379\" \/>\r\n<p style=\"text-align: center\"><em>Figure 2-8\u00a0 \u00a0Sample results as output\u00a0 from 20-sim<\/em><\/p>\r\nHere is a video showing how to build and run the model for this example in 20-sim:\r\n\r\n&nbsp;\r\n\r\nhttps:\/\/vimeo.com\/522034704\r\n<h1>2.13\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Two-Loop Electrical Circuit<\/h1>\r\nFor this example, we consider an electrical circuit with two loops\/branches. For the system, we have; electric charges $q_1$ and $q_2$; resistors $R_1$ and $R_2$; inductors $L_1$, $L_2$, and $L_3$; and capacitors $C_1$ and $C_2$ as <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-9\">Figure 2-9<\/a> shows. The voltage source is $u(t)$, connected to loop 1. <a id=\"F2-9\"><\/a>\r\n\r\n[caption id=\"attachment_119\" align=\"aligncenter\" width=\"875\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-9\/\" rel=\"attachment wp-att-119\"><img class=\"size-full wp-image-119\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9.jpg\" alt=\"\" width=\"875\" height=\"306\" \/><\/a> Figure 2-9 A two-loop electrical circuit with source[\/caption]\r\n\r\nFor comparison with a typical mechanical system, the equivalent of mass is an inductor; for spring, a capacitor; and for damper, a resistor. Therefore, using the Lagrangian method, we can write the kinetic energy of the system as $T = \\dfrac{1}{2}L_1 \\dot q_1^2 + \\dfrac{1}{2}L_2 \\dot q_2^2 + \\dfrac{1}{2}L_3(\\dot q_1 - \\dot q_2)^2$. Note that electric charge is analogous to mechanical displacement and electric current to velocity, or $q_i \\equiv x_i$ and $\\dot q_i \\equiv \\dot x_i$. Therefore, e.g., the term $\\dfrac{1}{2} L_1 \\dot q_1^2$ represents the stored kinetic energy in the corresponding inductor. Similarly, the potential energy is $V= \\dfrac{1}{2C_1}q_1^2 + \\dfrac{1}{2C_2} q_2^2$. Note that the capacitance is the inverse of stiffness, or $C_i = \\dfrac{1}{k_i}$. The energy dissipation function for the system is $D= \\dfrac{1}{2}R_1 \\dot q_1^2 + \\dfrac{1}{2}R_2 \\dot q_2^2$. Using Langrange\u2019s equation, $\\dfrac{d}{dt} \\left( \\dfrac{\\partial (T-V)}{\\partial \\dot q_i} \\right) - \\dfrac{\\partial (T-V)}{\\partial q_i} + \\dfrac{\\partial D}{\\partial \\dot q_i} = F_i$, gives the electric circuit system equations as\r\n\r\n\\begin{equation*}\r\n\r\n\\left\\{ \\begin{array}\r\n\r\n((L_1 + L_3) \\ddot q_1 - L_3 \\ddot q_2 + R_1 \\dot q_1 + \\dfrac{q_1}{C_1} = u(t)\\\\\r\n\r\n(L_2 + L_3) \\ddot q_2 - L_3 \\ddot q_1 + R_2 \\dot q_2 + \\dfrac{q_2}{C_2} = 0\r\n\r\n\\end{array}\r\n\r\n\\end{equation*}\r\n\r\nOne can use rate of charge or the electric current, I as the variable by replacing $I= \\dot q$ in the system\u2019s equations. This gives $(L_1 + L_3) \\dot I_1 - L_3 \\dot I_2 + R_2I_1 + V_{c1} = u(t)$ and $(L_2 + L_3) \\dot I_2 - L_3 \\dot I_1 + R_2I_2 + V_{c2} = 0$ where $V_{c1}$ and $V_{c2}$ are the voltage across the capacitors, respectively.\r\n\r\nWe use 20-sim to solve the system equations. The script code is as follow\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real L1 = 0.15 {H};\r\nreal L2 = 0.2 {H};\r\nreal L3 = 0.25 {H};\r\nreal C1 = 0.05 {F};\r\nreal C2 = 0.02 {F};\r\nreal R1 = 1 {ohm};\r\nreal R2 = 2 {ohm};\r\nreal omega = 3 {rad\/s};\r\nreal amplitude = 1;<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real q1 {C};\r\nreal q2 {C};\r\nreal q1_dot {A};\r\nreal q2_dot {A};\r\nreal q1_dot_dot ;\r\nreal q2_dot_dot ;\r\nreal Voltage {V}; \/\/ applied voltage<\/p>\r\nequations \/\/ equations are manipulated\r\n<p style=\"padding-left: 40px\">q2_dot_dot*(L1*L2+L2*L3+L1*L3)=-L3*R1*q1_dot-(L1+L3)*R2*q2_dot-L3\/C1*q1-(L1+L3)\/C2*q2+Voltage*L3;\r\nq1_dot_dot*(L3) = (L2+L3)*q2_dot_dot+R2*q2_dot+(1\/C2)*q2;\r\nq1_dot = int (q1_dot_dot , 0);\r\nq2_dot = int (q2_dot_dot , 0);\r\nq1 = int (q1_dot , 0);\r\nq2 = int (q2_dot , 0);\r\nVoltage = amplitude*sin (omega*time);<\/p>\r\nTypical plots for current in each loop is shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-10\">Figure 2-10<\/a> for a sinusoidal voltage.<a id=\"F2-10\"><\/a>\r\n\r\n[caption id=\"attachment_120\" align=\"aligncenter\" width=\"514\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-10\/\" rel=\"attachment wp-att-120\"><img class=\"size-full wp-image-120\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-10.jpg\" alt=\"\" width=\"514\" height=\"313\" \/><\/a> Figure 2-10 Sample results as output from 20-sim[\/caption]\r\n<h1>2.14\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Compound Atwood\u2019s Machine<\/h1>\r\nAtwood\u2019s machine is a collection of pulleys and masses. This example examines and models the dynamical behavior of this machine as shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-11\">Figure 2-11<\/a>.<a id=\"F2-11\"><\/a>\r\n\r\n[caption id=\"attachment_2417\" align=\"aligncenter\" width=\"566\"]<img class=\"wp-image-2417 \" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit-261x300.png\" alt=\"\" width=\"566\" height=\"650\" \/> Figure 2-11 A compound Atwood's machine[\/caption]\r\n\r\nThis system has two degrees of freedom $( \\underbrace{3 \\times 3}_{3N} - \\underbrace{3 \\times 2 - 1}_{N_c} = 2)$ describing the motion of mass $m_1$ and pulley <em>b<\/em>. Therefore, two ODEs describe the system dynamical behaviour. The massless un-stretchable string length hanging over pulley $a$ is $l_a$, and that of pulley $b$ is $l_b$. We measure the potential energy with reference to the top of pulley $a$ with vertical displacement designated with $x$ and similarly from top of pulley $b$ with $y$, as shown in <a href=\"#F2-11\">Figure 2-11<\/a>. The kinetic energy reads $T = \\dfrac{1}{2} (m_1 \\dot x_1^2 + m_2 \\dot x_2^2 + m_3 \\dot x_3^2 )$, where , using the geometrical constraints and string lengths, $x_1 = x, x_2 = (l_a - x_1) + y, x_3 = (l_a - x_1) + (l_b - y)$. Therefore, $\\dot x _1 = \\dot x, \\dot x_2 = - \\dot x + \\dot y, \\dot x_3 = -\\dot x - \\dot y$. Substituting in kinetic energy relation, gives $T= \\dfrac{1}{2} [m_1 \\dot x^2 + m_2 (\\dot y - \\dot x)^2 + m_3 (\\dot y + \\dot x)^2 ]$. The potential energy reads $V = -g(m_1x_1 + m_2x_2 + m_3x_3)$. After substituting for $x_1,x_2$, and $x_3$ and algebraic simplifications we get $V = xg(m_2 + m_3 - m_1) + yg(m_3 - m_2 ) + C$ , where constant <em>C<\/em> is given by $C = -g(m_2l_a + m_3l_a + m_3l_b)$. The Langrange equations in terms of $x$ and $y$ are $\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot x} \\right) - \\dfrac{\\partial L}{\\partial x} = 0$ and\r\n\r\n$\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot y} \\right) - \\dfrac{\\partial L}{\\partial y} = 0$, having\r\n\r\n\\begin{equation*}\r\n\r\nL = T - V = \\dfrac{1}{2} [m_1 \\dot x^2 + m_2 ( \\dot y - \\dot x)^2 + m_3 (\\dot y + \\dot x)^2 ] -xg(m_2 + m_3 - m_1) - yg(m_3 - m_2)\r\n\r\n\\end{equation*}\r\n\r\nWe dropped $C$, since its differentiation is zero. Hence,\r\n\r\n\\begin{equation*}\r\n\r\n\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot x} \\right) = \\ddot x (m_1 + m_2 + m_3 ) + \\ddot y (m_3 - m_2),\r\n\r\n\\end{equation*}\r\n\r\n\\begin{equation*}\r\n\r\n\\dfrac{d}{dt}\\left( \\dfrac{\\partial L}{\\partial \\dot y} \\right) = \\ddot x (m_3 - m_2 ) + \\ddot y (m_2 + m_3),\r\n\r\n\\end{equation*}\r\n\r\n\\begin{equation*}\r\n\r\n\\dfrac{\\partial L}{\\partial x} = g(m_1 - m_2 - m_3)\r\n\r\n\\end{equation*}\r\n\r\n\\begin{equation*}\r\n\r\n\\text{and} \\dfrac{\\partial L}{\\partial y} = g(m_2 - m_3).\r\n\r\n\\end{equation*}\r\n\r\nSubstituting into the corresponding Lagrange equations, we get the system\u2019s equations of motion as\r\n\r\n\\begin{equation*}\r\n\r\n\\left\\{ \\begin{array}\r\n\r\nx \\ddot x(m_1 + m_2 + m_3) + \\ddot y(m_3 - m_32) = g(m_1 - m_2 - m_3)\\\\\r\n\r\n\\ddot x(m_3 - m_2) + \\ddot y(m_2 + m_3) = g(m_2 - m_3)\r\n\r\n\\end{array}\r\n\r\n\\end{equation*}\r\n\r\nTo simplify the equations, eliminate $\\ddot y$ by multiplying the first equation by $(m_2 + m_3)$ and the second one by $(m_2 - m_3 )$. After some manipulations, we get\r\n\r\n\\begin{equation*}\r\n\r\n\\left\\{ \\begin{array}\r\n\r\nx \\ddot x(m_1m_2 + m_1m_3 + 4m_2m_3) = g(m_1 - m_2 - m_3)(m_2 - m_3)\\\\\r\n\r\n\\ddot y(m_2 + m_3) = (\\ddot x + g)(m_2 - m_3)\r\n\r\n\\end{array}\r\n\r\n\\end{equation*}\r\n\r\nWe use 20-sim to solve these system equations. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real m1 = 1.0 {kg};\r\nreal m2 = 2.0 {kg};\r\nreal m3 = 4.0 {kg};\r\nreal g = 9.81 {m\/s2};<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real x {m};\r\nreal y {m};\r\nreal x_dot {m\/s};\r\nreal y_dot {m\/s};\r\nreal x_dot_dot {m\/s2};\r\nreal y_dot_dot {m\/s2};<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">\/* x_dot_dot = (1\/(m1+m2+m3))*(-y_dot_dot*(m3-m2)+g*(m1-m2-m3)); *\/\r\nx_dot_dot = g*(m1-m2-m3)*(m2-m3)\/(m1*m2+m1*m3+4*m2*m3);\r\ny_dot_dot = (1\/(m3+m2))*((x_dot_dot+g)*(m2-m3));\r\nx_dot = int (x_dot_dot , 0);\r\ny_dot = int (y_dot_dot , 0);\r\nx = int (x_dot , 0);\r\ny = int (y_dot , 0.1);<\/p>\r\n\r\n<h1>2.15\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: Atwood\u2019s Machine with Massive String and Pulley<\/h1>\r\nIn the analysis of Atwood\u2019s machine, the pulley and string are usually considered massless. In this example, we include these parts, assuming the string having mass $m_s$, total length $l$, and linear mass density $\\rho = m_s \/ l_s$ and the pulley with mass $M$, radius $R$, and moment of inertia $I$ <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R19\"><strong>[19]<\/strong><\/a>.<a id=\"F2-12\"><\/a>\r\n\r\n[caption id=\"attachment_376\" align=\"aligncenter\" width=\"552\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-12\/\"><img class=\"size-full wp-image-376\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-12.jpg\" alt=\"\" width=\"552\" height=\"678\" \/><\/a> Figure 2-12 Atwood\u2019s machine[\/caption]\r\n\r\n2Datum for potential energy is a horizontal plane at the level of the pulley\u2019s centre. From the datum, the length of hanging string on the two sides of pulley is $- \\pi R$. The potential energy is due to the masses and the string mass, or $V = m_1gx - m_2g(l-x) - \\dfrac{1}{2} \\rho gx^2 - \\dfrac{1}{2} \\rho g(l - x)^2$. Note that <em>x<\/em> is measured downward from the datum toward mass $m_1$. The kinetic energy is due to the masses, string, and the pulley\u2019s angular kinetic energy, $\\dfrac{1}{2} I \\omega^2$ with angular velocity $\\omega = \\dot x\/R$. Therefore, $T = \\dfrac{1}{2} (m_1 + m_2 + m_s ) \\dot x^2 + \\dfrac{1}{2} I ( \\dot x\/R)^2$. The Lagrangian is written as\r\n\r\n\\begin{equation*}\r\n\r\nL = T - V = \\dfrac{1}{2} \\left( m_1\u00a0 + m_2\u00a0 + m_s + \\dfrac{I}{R^2} \\right) \\dot x^2 + \\\\ (m_1 - m_2) gx + \\rho gx^2 - \\rho glx + \\left( \\dfrac{1}{2} \\rho gl^2 + m_2 gl \\right)\r\n\r\n\\end{equation*}\r\n\r\nThe Lagrange is equation reads $\\dfrac{d}{dt} \\left( \\dfrac{\\partial L}{\\partial \\dot x} \\right) - \\dfrac{\\partial L}{\\partial x} = 0$, or $\\ddot x = \\dfrac{(m_1 - m_2 + \\rho x\u00a0 - \\rho l)g}{(m_1 + m_2 + \\rho l + \\rho \\pi R + I\/R^2)}$, after substituting $m_s = \\rho (l + \\pi R)$. The result reduces to the familiar result of $\\ddot x = \\dfrac{(m_1 - m_2 ) g}{(m_1\u00a0 + m_2)}$ for massless string and pulley $( \\rho = 0, I = 0)$.\r\n\r\nWe use 20-sim to solve these system equations. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real Ms = 2.5 {kg}; \/\/ string mass\r\nreal L = 2.0 {m}; \/\/string length\r\nreal M = 3.0 {kg}; \/\/mass of the pulley\r\nreal R = 30.0 {cm}; \/\/radius of the pulley\r\nreal g = 9.81 {m\/s2}; \/\/ grav. acceleration\r\nreal m1 = 4.0 {kg};\r\nreal m2 = 1.5 {kg};<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real x {m}; \/\/vertical displacement\r\nreal I {kg.m2}; \/\/ pulley moment of inertia\r\nreal x_dot {m\/s}; \/\/ vertical velocity\r\nreal x_dot_dot {m\/s2}; \/\/ vertical acceleration<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">I = 0.5*M*R^2;\r\nx_dot_dot = g*(m1-m2+(Ms\/L)*(x-L))\/((m1+m2+(Ms\/L)*(L+ pi*R)+I\/R^2));\r\nx_dot = int (x_dot_dot , 0.0);\r\nx = int (x_dot , 0);<\/p>\r\n\r\n<h1>2.16\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Complex Vibrating Mechanical System<\/h1>\r\nFor this example, we consider a mechanical system with three degrees of freedom, $x_1, x_2, x_3$, associated with three masses,$ m_1, m_2, m_3$. The arrangement of springs and dampers is shown, with their coefficients, in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-13\">Figure 2-13<\/a>, with corresponding stiffness $(k_1, k_2)$ and damping $(b_1, b_2, b_3)$ coefficients. An applied force, $f(t)$ acting on mass $m_2$ and all wall contact surfaces are considered to have negligible friction.<a id=\"F2-13\"><\/a>\r\n\r\n[caption id=\"attachment_123\" align=\"aligncenter\" width=\"855\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-13\/\" rel=\"attachment wp-att-123\"><img class=\"size-full wp-image-123\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13.jpg\" alt=\"\" width=\"855\" height=\"390\" \/><\/a> Figure 2-13 A complex vibrating mechanical system[\/caption]\r\n\r\nThe kinetic energy of the systems reads $T = \\dfrac{1}{2} (m_1 \\dot x_1^2 + m_2 \\dot x_2^2 + m_3 \\dot x_3^2)$ and the potential energy is $V = \\dfrac{1}{2} k_1 x_1^2 + \\dfrac{1}{2} k_2 (x_2 - x_3 )^2$. Similarly, the damping function reads $D = \\dfrac{1}{2} b_1 \\dot x_2^2 + \\dfrac{1}{2} b_2 (\\dot x_2 - \\dot x_1 )^2 + \\dfrac{1}{2} b_3 \\dot x_3^2$. The Lagrange\u2019s equations are $\\dfrac{d}{dt} \\left( \\dfrac{\\partial (T-V)}{\\partial \\dot x_i} \\right) - \\dfrac{\\partial (T-V)}{\\partial x_i} + \\dfrac{\\partial D}{\\partial \\dot x\u0307_i} = F_i (t)$, with $F_i (t) = \\Bigg\\{ \\begin{array} x0\\\\ f(t)\\\\ 0 \\end{array} \\Bigg\\}$\r\n\r\nbecause the applied force is exerted on mass $m_2$. Performing the differentiations, we can write the equations of the system, as\r\n\r\n\\begin{equation*}\r\n\r\n\\dfrac{d}{dt} (m_1 \\dot x_1 ) + k_1 x_1 + b_2 (\\dot x_1 - \\dot x_2 ) = 0, \\dfrac{d}{dt} (m_2 \\dot x_2 ) + \\\\ k_2 (x_2 - x_3 ) + b_1 \\dot x_2 + b_2 (\\dot x_2 - \\dot x_1 ) = f(t)$\r\n\r\n\\end{equation*}\r\n\r\nand $\\dfrac{d}{dt} (m_3 \\dot x_3 ) + k_2 (x_3\u00a0 - x_2 ) + b_3 \\dot x_3 = 0$. In matrix form, the system\u2019s equations are\r\n\r\n\\begin{equation*}\r\n\r\n\\begin{bmatrix} m_1 &amp; 0 &amp; 0\\\\ 0 &amp; m_2 &amp; 0\\\\ 0 &amp; 0 &amp; m_3 \\end{bmatrix} \\begin{Bmatrix} \\ddot x_1\\\\ \\ddot x_2\\\\ \\ddot x_3 \\end{Bmatrix} +\r\n\r\n\\begin{bmatrix} b_2 &amp; -b_2 &amp; 0\\\\ -b_2 &amp; b_1 + b_2 &amp; 0\\\\ 0 &amp; 0 &amp; b_3 \\end{bmatrix} \\begin{Bmatrix} \\dot x_1\\\\ \\dot x_2\\\\ \\dot x_3 \\end{Bmatrix} +\r\n\r\n\\begin{bmatrix} k_1 + &amp; 0 &amp; 0\\\\ 0 &amp; k_2 &amp; -k_2\\\\ 0 &amp; -k_2 &amp; k_2 \\end{bmatrix} \\begin{Bmatrix} x_1\\\\ x_2\\\\ x_3 \\end{Bmatrix} = \\begin{Bmatrix} 0\\\\ f(t)\\\\ 0 \\end{Bmatrix}\r\n\r\n\\end{equation*}\r\n\r\nWe use 20-sim to solve these system equations. The applied force is composed of three impulses applied at 5, 10, and 20 second. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real m1 = 1.0 {kg};\r\nreal m2 = 3.0 {kg};\r\nreal m3 = 2.0 {kg};\r\nreal k1 = 50.0 {N\/m};\r\nreal k2 = 30.0 {N\/m};\r\nreal b1 = 0.1 {N.s\/m};\r\nreal b2 = 0.2 {N.s\/m};\r\nreal b3 = 0.3 {N.s\/m};<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real x1 {m};\r\nreal x2 {m};\r\nreal x3 {m};\r\nreal x1_dot {m\/s};\r\nreal x2_dot {m\/s};\r\nreal x3_dot {m\/s};\r\nreal x1_dot_dot {m\/s2};\r\nreal x2_dot_dot {m\/s2};\r\nreal x3_dot_dot {m\/s2};\r\nreal F_applied1 {N};\r\nreal F_applied2 {N};\r\nreal F_applied3 {N};<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">x1_dot_dot = -b2\/m1*x1_dot+b2\/m1*x2_dot-k1\/m1*x1;\r\nx2_dot_dot = -(1\/m2)*(-b2*x1_dot+(b1+b2)*x2_dot+k2*x2-k2*x3+F_applied1+F_applied2+F_applied3);\r\nx3_dot_dot = -(1\/m3)*(b3*x3_dot-k2*x2+k2*x3);\r\nx1_dot = int (x1_dot_dot , 0);\r\nx2_dot = int (x2_dot_dot , 0);\r\nx3_dot = int (x3_dot_dot , 0);\r\nx1 = int (x1_dot , 0);\r\nx2 = int (x2_dot , 0);\r\nx3 = int (x3_dot , 0);\r\nF_applied1 = 3*impulse (5,0.1);\r\nF_applied2 = 5*impulse (20,0.2);\r\nF_applied3 = -10*impulse (10,0.2);<\/p>\r\nSample results are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-14\">Figure 2-14<\/a>.<a id=\"F2-14\"><\/a>\r\n\r\n[caption id=\"attachment_124\" align=\"aligncenter\" width=\"604\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-14\/\" rel=\"attachment wp-att-124\"><img class=\"size-full wp-image-124\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-14.jpg\" alt=\"\" width=\"604\" height=\"285\" \/><\/a> Figure 2-14 Sample results as output from 20-sim[\/caption]\r\n\r\nHere is a video showing how to build and run the model for this example in 20-sim:\r\n\r\n&nbsp;\r\n\r\nhttps:\/\/vimeo.com\/522036865\r\n\r\n&nbsp;\r\n<h1>2.17\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Pendulum with Moving Pivot<\/h1>\r\nA simple pendulum with mass $m$ hanging from a free-moving pivot with mass $M$. The system has two degrees of freedom: oscillation of pivot, $x = x(t)$ and pendulum motion about vertical designated by angle $\\theta = \\theta (t)$. The pendulum string with length $l$ is massless and unstretchable. We consider the datum at the pivot level and gravitational acceleration $g$ pointing downwards, as in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-15\">Figure 2-15<\/a>. <a id=\"F2-15\"><\/a>\r\n\r\n[caption id=\"attachment_377\" align=\"aligncenter\" width=\"1220\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-15\/\"><img class=\"size-full wp-image-377\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15.jpg\" alt=\"\" width=\"1220\" height=\"1241\" \/><\/a> Figure 2-15 Pendulum with oscillating pivot[\/caption]\r\n\r\nMass $m$ coordinates read $(x + l \\text{sin} \\theta, - l \\text{cos} \\theta)$; hence, the velocity components are $(\\dot x + l \\dot \\theta \\text{cos} \\theta, l \\dot \\theta \\text{sin} \\theta)$. We can write kinetic energy of the system as\r\n\r\n\\begin{equation*}\r\n\r\nT = \\frac{m}{2} \\left[ (\\dot x + l \\dot \\theta \\text{cos} \\theta)^2 + (l \\dot \\theta \\text{sin} \\theta )^2 \\right] + \\frac{M}{2} \\dot x^2 = \\frac{m}{2} (\\dot x^2 + l^2 \\dot \\theta ^2 + 2l \\dot x \\dot \\theta \\text{cos} \\theta) + \\frac{M}{2} \\dot x^2\r\n\r\n\\end{equation*}\r\n\r\nSimilarly, the potential energy of the systems reads $V = mgy = -mgl \\text{cos} \\theta $. Note that the pivot motion is horizontal with coordinates (<em>x<\/em>, 0). The Lagrange equation for rotational motion with respect to coordinate $\\theta$ reads $\\dfrac{d}{dt} \\left( \\dfrac{\\partial (T-V)}{\\partial \\dot \\theta} \\right) - \\dfrac{\\partial (T-V)}{\\partial \\theta} = 0$, or $\\dfrac{d}{dt} (ml^2 \\dot \\theta + ml \\dot x \\text{cos} \\theta ) + ml \\dot x \\dot \\theta \\text{sin} \\theta - mgl \\text{sin} \\theta = 0$. After simplification, we get $\\ddot \\theta - \\dfrac{g}{l} \\text{sin} \\theta + \\ddot x \\text{cos} \\theta = 0$. Note that for fixed pivot (or $x = \\dot x = \\ddot x = 0$) we get the familiar result for a simple pendulum. The Lagrange equation for translational motion with respect to coordinate $x$ reads $\\dfrac{d}{dt} \\lefct( \\dfrac{\\partial (T-V)}{\\partial \\dot x} \\right) - \\dfrac{\\partial (T-V)}{\\partial x} = 0$, or $\\dfrac{d}{dt} (m \\dot x + ml \\dot \\theta \\text{cos} \\theta + M \\dot x) = 0$. After performing differentiation, we get $(M + m) \\ddot x + (ml \\text{cos} \\theta ) \\ddot \\theta - (ml \\text{sin} \\theta ) \\dot \\theta ^2 = 0$. Collectively, the system\u2019s equations of motion are\r\n\r\n\\begin{equation*}\r\n\r\n\\left\\{ \\begin{array}\r\n\r\n( (ml \\text{cos}^2 \\theta - M - m) \\ddot \\theta - (ml \\text{sin} \\theta} \\text{cos} \\theta ) \\dot \\theta ^2 + \\frac{g}{l} (M + m) \\text{sin} \\theta = 0 \\\\\r\n\r\n\\ddot x = \\frac{1}{\\text{cos} \\theta} \\left( \\frac{g}{l} \\text{sin} \\theta - \\ddot \\theta \\right)\r\n\r\n\\end{array}\r\n\r\n\\end{equation*}\r\n\r\nWe use 20-sim to solve these system equations. An initial velocity of 0.5 rad\/s is applied to the pendulum. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real m = 0.5 {kg}; \/\/ pendulum\/bob mass\r\nreal M = 1.0 {kg}; \/\/ pivot mass\r\nreal g = 9.81 {m\/s2}; \/\/gravity\r\nreal L = 30 {cm}; \/\/pendulum length<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real x {m};\r\nreal x_dot {m\/s};\r\nreal x_dot_dot {m\/s2};\r\nreal theta {rad};\r\nreal theta_dot {rad\/s};\r\nreal theta_dot_dot {rad\/s2};<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">x_dot_dot = (1\/cos (theta))*((g\/L)*sin (theta)-theta_dot_dot);\r\ntheta_dot_dot = (1\/(m*L*cos (theta)^2-M-m))*(m*L*sin (theta)*cos (theta)*theta_dot^2-g\/L*(m+M)*sin (theta));\r\nx_dot = int (x_dot_dot , 0);\r\nx = int (x_dot , 0);\r\ntheta_dot = int (theta_dot_dot , 0.5);\r\ntheta = int (theta_dot , 0);<\/p>\r\nSample results are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-16\">Figure 2-16<\/a>.<a id=\"F2-16\"><\/a>\r\n\r\n[caption id=\"attachment_126\" align=\"aligncenter\" width=\"585\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-16\/\" rel=\"attachment wp-att-126\"><img class=\"size-full wp-image-126\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-16.jpg\" alt=\"\" width=\"585\" height=\"255\" \/><\/a> Figure 2-16 Sample results as output from 20-sim[\/caption]\r\n\r\nHere is a video showing how to build and run the model for this example in 20-sim:\r\n\r\n&nbsp;\r\n\r\nhttps:\/\/vimeo.com\/522039060\r\n<h1>2.18\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Pendulum Attached to a Moving Mass-Spring-Damper System<\/h1>\r\nIn this example we consider a system consisting of a pendulum with its pivot attached to the centre of a freely moving mass $M$. The mass is connected to a spring with stiffness $k$ and a damper with damping coefficient $b$. The pendulum bob has a mass of $m$ and is attached to a torsional damper with damping coefficient $b_t$ and a torsional spring with stiffness $k_t$. The pendulum string is massless and has a length of $l$. We consider the datum at the pivot level and gravitational acceleration $g$ pointing downwards, as in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-17\">Figure 2-17<\/a>. The system has two degrees of freedom; oscillation of pivot, $x=x(t)$ and pendulum motion about vertical direction designated by angle $\\theta = \\theta (t)$.<a id=\"F2-17\"><\/a>\r\n\r\n[caption id=\"attachment_378\" align=\"aligncenter\" width=\"1061\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-17\/\"><img class=\"size-full wp-image-378\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17.jpg\" alt=\"\" width=\"1061\" height=\"791\" \/><\/a> Figure 2-17 A pendulum attached to a mass-spring-damper system[\/caption]\r\n\r\nThe coordinates of mass $m$ read $(x + l \\text{sin} \\theta , - l \\text{cos} \\theta )$, and its velocity components are $(\\dot x + l \\dot \\theta \\text{cos} \\theta , l \\dot \\theta \\text{sin} \\theta )$. We can write kinetic energy of the system as\r\n\r\n\\begin{equation*}\r\n\r\nT = \\frac{m}{2} \\left[ (\\dot x + l \\dot \\theta \\text{cos} \\theta )^2 + (l \\dot \\theta \\text{sin} \\theta )^2 \\right] + \\frac{M}{2} \\dot x^2 = \\frac{m}{2} (\\dot x^2 + l^2 \\dot \\theta ^2 + 2l \\dot x \\dot \\theta \\text{cos} \\theta ) + \\frac{M}{2} \\dot x^2\r\n\r\n\\end{equation*}\r\n\r\nSimilarly, the potential energy of the system reads $V = \\dfrac{1}{2} kx^2 + \\dfrac{1}{2} k_t \\theta ^2 - mgl \\text{cos} \\theta$. The damping function of the system is $D = \\dfrac{1}{2} b \\dot x^2 + \\frac{1}{2} b_t \\dot \\theta ^2$.\r\n\r\nThe Lagrange equation for rotational motion with respect to coordinate $\\theta$ reads $\\dfrac{d}{dt} \\left( \\dfrac{\\partial (T-V)}{\\partial \\dot \\theta} \\right) - \\dfrac{\\partial (T-V)}{\\partial \\theta} + \\dfrac{\\partial D}{\\partial \\dot \\theta} = 0$, or $\\dfrac{d}{dt} (ml^2 \\dot \\theta + ml \\dot x \\text{cos} \\theta ) + ml \\dot x \\dot \\theta \\text{sin\u2061} \\theta + k_t \\theta + mgl \\text{sin} \u2061\\theta + b_t \\dot \\theta = 0$. After simplification, we get $\\ddot \\theta + \\dfrac{g}{l} \\text{sin} \\theta + \\dfrac{\\ddot x \\text{cos} \\theta}{l} + \\dfrac{1}{ml^2} (b_t \\dot \\theta + k_t \\theta ) = 0$. The Lagrange equation for translational motion with respect to coordinate $x$ reads $\\dfrac{d}{dt} \\left( \\dfrac{\\partial (T-V)}{\\partial \\dot x} \\right) - \\dfrac{\\partial (T-V)}{\\partial x} + \\dfrac{\\partial D}{\\partial \\dot x} = F(t)$, or $\\dfrac{d}{dt} (m \\dot x + ml \\dot \\theta \\text{cos} \\theta + M \\dot x) +kx + b \\dot x = 0$. After performing differentiation, we get $(M + m) \\ddot x + (ml \\text{cos} \\theta ) \\ddot \\theta - (ml \\text{sin} \\theta ) \\dot \\theta ^2 + kx + b \\dot x = F(t)$. Collectively, the system\u2019s equations of motion are\r\n\r\n\\begin{equation*}\r\n\r\n\\left\\{ \\begin{array}\r\n\r\n( (M + m) \\ddot x + ( ml \\text{cos} \\theta) \\ddot \\theta - (ml \\text{sin} \\theta ) \\dot \\theta ^2 + kx + b \\dot x = F(t) \\\\\r\n\r\n\\ddot \\theta + \\dfrac{g}{l} \\text{sin} \\theta + \\dfrac{\\ddot x \\text{cos} \\theta}{l} + \\dfrac{1}{ml^2} (b_t \\dot \\theta + k_t \\theta ) = 0\r\n\r\n\\end{array}\r\n\r\n\\end{equation*}\r\n\r\nWe use 20-sim to solve these system equations. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real m = 0.5 {kg}; \/\/ pendulum\/bob mass\r\nreal M = 1.0 {kg}; \/\/ pivot mass\r\nreal g = 9.81 {m\/s2}; \/\/gravity\r\nreal L = 30 {cm}; \/\/pendulum length\r\nreal k = 2 {N\/m}; \/\/ spring stiffness\r\nreal kt = 0.5 {N.m\/rad}; \/\/ torsional stiffness\r\nreal bt = 0.5 {N.m.s\/rad}; \/\/ torsional damping\r\nreal b = 0.2 {N.s\/m}; \/\/ damping\r\nreal amplitude = 1; \/\/ amplitude of applied force\r\nreal omega = 0.5 {rad\/s}; \/\/ frequency of applied force<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real x {m};\r\nreal x_dot {m\/s};\r\nreal x_dot_dot {m\/s2};\r\nreal theta {rad};\r\nreal theta_dot {rad\/s};\r\nreal theta_dot_dot {rad\/s2};\r\nreal F_applied {N};\r\nreal F_spring {N}; \/\/ linear spring force\r\nreal T_spring {N.m}; \/\/ torsional spring torque\r\nreal y; \/\/ aux. variable, to help the solver<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">x = int (x_dot , 0);\r\nx_dot = int (x_dot_dot , 0);\r\ntheta = int (theta_dot , 0);\r\ntheta_dot = int (theta_dot_dot , 0);\r\ny = -m*L*cos (theta)*(theta_dot_dot);\r\nx_dot_dot = (1\/(m+M))*(m*L*sin (theta)*theta_dot^2 + y -k*x-b*x_dot+F_applied);\r\ntheta_dot_dot = -g\/L*sin (theta) -1\/L*cos (theta)*x_dot_dot -1\/(m*L^2)*(bt*theta_dot+kt*theta);\r\nF_applied = amplitude*sin (omega*time);\r\nF_spring = k*x;\r\nT_spring = kt*theta;<\/p>\r\nCart displacement, pendulum angle, and force and torque of the springs are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-18\">Figure 2-18<\/a>.<a id=\"F2-18\"><\/a>\r\n\r\n[caption id=\"attachment_128\" align=\"aligncenter\" width=\"594\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-18\/\" rel=\"attachment wp-att-128\"><img class=\"size-full wp-image-128\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-18.jpg\" alt=\"\" width=\"594\" height=\"259\" \/><\/a> Figure 2-18 Sample results as output from 20-sim[\/caption]\r\n\r\nHere is a video showing how to build and run the model for this example in 20-sim:\r\n\r\n&nbsp;\r\n\r\nhttps:\/\/vimeo.com\/522039228\r\n<h1>2.19 \u00a0 \u00a0\u00a0\u00a0 Example: A Mass Particle Sliding on a Rotating Circular Ring<\/h1>\r\n<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-19\">Figure 2-19<\/a> shows a particle with mass $m$ sliding on a circular ring with radius $R$. The ring itself is rotating about the $z$-axis with a constant angular velocity $\\omega$. We want to find the equation of motion for the mass particle.\r\n\r\n[caption id=\"attachment_379\" align=\"aligncenter\" width=\"1332\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-19\/\"><img class=\"size-full wp-image-379\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19.jpg\" alt=\"\" width=\"1332\" height=\"1321\" \/><\/a> Figure 2-19 A particle moving on a circular ring[\/caption]\r\n\r\nThe generalized coordinate is $\\theta = \\theta (t)$, the polar angle. We can write the coordinates of the mass particle as $x = R \\text{sin}\u2061 \\theta \\text{cos} \\omega t$, $y = R \\text{sin} \\theta \\text{sin} \\omega t$, and $z = R \\text{cos} \\theta\u2061$. Therefore, $\\dot x = R \\dot \\theta \\text{cos} \\theta \\text{cos} \\omega t - R \\omega \\text{sin} \\theta \\text{sin} \\omega t$, $\\dot y = R \\dot \\theta \\text{cos} \\theta \\text{sin} \\omega t + R \\omega \\text{sin} \\theta \\text{cos} \\omega t$, and $\\dot z = -R \\dot \\theta \\text{sin} \\theta$. Therefore, the kinetic energy reads $T = \\dfrac{m}{2} (\\dot x^2 + \\dot y^2 + \\dot z^2 $) and after substitution of velocities and simplifications we get $T = \\dfrac{mR^2}{2} (\\dot \\theta^2 + \\omega ^2 \\text{sin}^2 \\theta\u2061)$. Similarly, the potential energy of the mass particle reads $V = mgz = mgR \\text{cos} \\theta$. Note that the kinetic energy of the particle consists of those resulted from angular velocity $R \\dot \\theta$, defined in spherical coordinates in the $R-z$ plane due to sliding of the mass on the circular ring, and the rotational velocity $(R \\text{sin} \\theta ) \\omega$, defined in a $z = const$ plane parallel to the $x-y$ plane at any given time during the motion.\r\n\r\nNow we can write the Lagrange\u2019s equations, using Equation (2.12), with the assumption that no friction and non-conservative forces exist, or $D=Q=0$. Hence $\\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot \\theta} \\right) - \\dfrac{\\partial T}{\\partial \\theta} + \\dfrac{\\partial V}{\\partial \\theta} = 0$. But $\\dfrac{\\partial T}{\\partial \\dot \\theta} = mR^2 \\dot \\theta$, $\\dfrac{\\partial T}{\\partial \\theta} = \\dfrac{1}{2} mR^2 \\omega ^2 \\text{sin} 2 \\theta$ and $\\dfrac{\\partial V}{\\partial \\theta} = -mgR \\text{sin} \\theta$. After substitution and rearranging the terms, we get the equation of motion for the mass particle as\r\n\r\n\\begin{equation*}\r\n\r\nR \\ddot \\theta - \\frac{1}{2} R \\omega ^2 \\text{sin} 2 \\theta = g \\text{sin} \\theta\r\n\r\n\\end{equation*}\r\n\r\nWe use 20-sim to solve these system equations. An initial angular velocity of 0.2 rad\/s is applied to the mass. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real g = 9.81 {m\/s2}; \/\/grav. acc.\r\nreal R = 40 {cm}; \/\/ring radius\r\nreal omega = 0.8 {rad\/s}; \/\/ ring angular velocity<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real theta {rad};\r\nreal theta_dot {rad\/s};\r\nreal theta_dot_dot {rad\/s2};<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">theta_dot_dot= ((1\/2)*omega^2*sin (2*theta)+g*sin (theta)\/R);\r\ntheta_dot = int (theta_dot_dot , 0.0);\r\ntheta = int (theta_dot , 0.2);<\/p>\r\nThe angular displacement, velocity and acceleration are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-20\">Figure 2-20<\/a>.<a id=\"F2-20\"><\/a>\r\n\r\n[caption id=\"attachment_130\" align=\"aligncenter\" width=\"527\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-20\/\" rel=\"attachment wp-att-130\"><img class=\"size-full wp-image-130\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-20.jpg\" alt=\"\" width=\"527\" height=\"238\" \/><\/a> Figure 2-20 Sample results as output from 20-sim[\/caption]\r\n\r\nHere is a video showing how to build and run the model for this example in 20-sim:\r\n\r\n&nbsp;\r\n\r\nhttps:\/\/vimeo.com\/522039400\r\n<h1>2.20 \u00a0 \u00a0\u00a0\u00a0 Example: An Extensible Robotic Arm Rotating in a Plane<\/h1>\r\n<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-21\">Figure 2-21<\/a> shows a load with mass $m$ is carried by a robotic arm in the $x-y$ plane. The length $r$ of the arm and its angle $\\theta$ with respect to $x$-axis are functions of time $t$, or $r=r(t)$ and $\\theta = \\theta (t)$. The damping coefficients for radial and tangential motions are $b_r$ and $b_t$, respectively.\r\n\r\n[caption id=\"attachment_131\" align=\"aligncenter\" width=\"548\"]<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-21\/\" rel=\"attachment wp-att-131\"><img class=\"size-full wp-image-131\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-21.jpg\" alt=\"\" width=\"548\" height=\"628\" \/><\/a> Figure 2-21 An extensible robotic arm carrying a load[\/caption]\r\n\r\nThe generalized coordinates (or degrees of freedom) are $q=(r,\\theta)$, and corresponding velocities are $q=(\\dot r, \\dot \\theta)$, for mass $m$. We can write the kinetic energy as $T = \\dfrac{1}{2} m \\dot r^2 + \\dfrac{1}{2} m (r \\dot \\theta )^2$, due to radial and tangential velocities, respectively. The potential energy, with reference to the support, is $V = mgr \\text{sin} \\theta$. The damping function is $D = \\dfrac{1}{2} b_r \\dot r^2 + \\dfrac{1}{2} b_t \\dot \\theta ^2$. The conservative gravity force due to the load mass is accounted for through the potential function $V$. The force $f$ and torque $\\mathcal{T}$ exerted by the robot-arm motor to move the mass are components of generalized force vector, or $Q_i = (Q_r,Q_{\\theta} ) = (f, \\mathcal{T})$. Now, we have $\\dfrac{\\partial T}{\\partial \\dot r} = m \\dot r$, $\\dfrac{\\partial T}{\\partial \\dot \\theta} = mr^2 \\dot \\theta$, $\\dfrac{\\partial T}{\\partial r} = mr \\dot \\theta ^2$, $\\dfrac{\\partial T}{\\partial \\theta} = 0$, $\\dfrac{\\partial D}{\\partial \\dot r} = b_r \\dot r$, $\\dfrac{\\partial D}{\\partial \\dot \\theta} = b_t \\dot \\theta$, $\\dfrac{\\partial V}{\\partial r} = mg \\text{sin} \\theta$ and $\\dfrac{\\partial V}{\\partial \\theta} - mgr \\text{cos} \\theta$. Using Equation (2.12), we can write the equations of the motion for the mass $m$, as $\\dfrac{d}{dt} \\left( \\dfrac{\\partial T}{\\partial \\dot r} \\right) -\\dfrac{\\partial T}{\\partial q_i} + \\dfrac{\\partial D}{\\partial \\dot q_i} + \\dfrac{\\partial V}{\\partial q_i} = Q_i$\r\n\r\n\\begin{equation*}\r\n\r\n\\left\\{ \\begin{array}\r\n\r\n( m \\ddot r - mr \\dot \\theta ^2 + b_r \\dot r + mg \\text{sin} \\theta = f \\\\\r\n\r\nmr^2 \\ddot \\theta + 2mr \\dot r \\dot \\theta + b_t \\dot \\theta + mgr \\text{cos} \\theta = \\mathcal{T}\r\n\r\n\\end{array}\r\n\r\n\\end{equation*}\r\n\r\nWe use 20-sim to solve the system equations. The script code is as follows:\r\n\r\nparameters\r\n<p style=\"padding-left: 40px\">real m = 0.5 {kg}; \/\/ load mass\r\nreal g = 9.81 {m\/s2}; \/\/grav. acc.\r\nreal bt = 0.5 {N.m.s\/rad}; \/\/ tangential damping\r\nreal br = 0.2 {N.s\/m}; \/\/ radial damping<\/p>\r\nvariables\r\n<p style=\"padding-left: 40px\">real arm {m};\r\nreal arm_dot {m\/s};\r\nreal arm_dot_dot {m\/s2};\r\nreal theta {rad};\r\nreal theta_dot {rad\/s};\r\nreal theta_dot_dot {rad\/s2};\r\nreal F {N}; \/\/applied force\r\nreal T {N.m}; \/\/ applied torque<\/p>\r\nequations\r\n<p style=\"padding-left: 40px\">arm_dot_dot = (arm*theta_dot^2-g*sin (theta)-br*arm_dot\/m+F\/m);\r\ntheta_dot_dot = (1\/(m*arm^2))*(-2*m*arm*arm_dot*theta_dot-m*g*arm*cos (theta)-bt*theta_dot+T);\r\narm_dot = int (arm_dot_dot , 0);\r\narm = int (arm_dot , 0.2);\r\ntheta_dot = int (theta_dot_dot , 0);\r\ntheta = int (theta_dot , 0);\r\nF = sin (0.2*time);\r\nT = 0.2;<\/p>\r\n\r\n<h1>Exercise Problems for Chapter 2<\/h1>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercises<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<ol>\r\n \t<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.13. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\r\n \t<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.14. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\r\n \t<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.15. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\r\n \t<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.18. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\r\n \t<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.20. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\r\n \t<li style=\"text-align: left\">Using Lagrangian method, derive the system equations for the double pendulum system shown below. Solve the resulting system of ODE\u2019s and draw the angular displacements and velocities $\\theta_i$ and $\\dot \\theta_i, i = 1,2$) of mass $m_1$ and $m_2$ for an initial condition of $m_2$ at $\\dfrac{\\pi}{12}$. Also draw the phase diagram (i.e., $\\dot \\theta$ vs. $\\theta$) for each mass. Assume that the strings are massless and inextensible.<\/li>\r\n<\/ol>\r\n<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/exercise-2-5\/\" rel=\"attachment wp-att-383\"><img class=\"aligncenter size-full wp-image-383\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-5.jpg\" alt=\"\" width=\"433\" height=\"444\" \/><\/a>\r\n<ol start=\"6\">\r\n \t<li style=\"text-align: left\">For the mechanical system given, e.g., an elevator with a mass-spring-damper subsystem, verify the system equations, using Lagrangian method and solve them with 20-sim. The container could be an elevator, e.g., with a mass $M$ and is supported by a spring $k_3$ and moving vertically, guided by frictionless rollers under load $f(t)$. The subsystem is composed of a mass <em>m<\/em>, two springs $k_1$ and $k_2$, and a damper $b$, as shown in the figure below. The gravitational acceleration vector is directed downward, $\\vv{g} = (g,0,0)$.<\/li>\r\n<\/ol>\r\n\\begin{equation*}\r\n\\begin{bmatrix}M &amp; 0\\\\ 0 &amp; m \\end{bmatrix} \\begin{Bmatrix} \\ddot x_1\\\\ \\ddot x_2 \\end{Bmatrix} + b \\begin{bmatrix} 1 &amp; -1\\\\ -1 &amp; 1 \\end{bmatrix} \\begin{Bmatrix} \\dot x_1\\\\ \\dot x_2 \\end{Bmatrix} + \\begin{bmatrix} k_1 + k_2 + k_3 &amp; -k_1 -k_2 \\\\ -k_1 -k_2 &amp; k_1 + k_2 \\end{bmatrix} \\begin{Bmatrix} x_1 \\\\ x_2 \\end{Bmatrix} = \\begin{Bmatrix} f(t) - Mg\\\\ -mg \\end{Bmatrix}\r\n\\end{equation*}\r\n\r\n<a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/exercise-2-6\/\" rel=\"attachment wp-att-384\"><img class=\"aligncenter size-full wp-image-384\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6.jpg\" alt=\"\" width=\"558\" height=\"555\" \/><\/a>\r\n<ol start=\"7\">\r\n \t<li style=\"text-align: left\">Repeat the sliding mass on a rotating circular ring example given in section 2.19 assuming $\\omega = \\omega (t)$. Modify the model provided for this example accordingly and run the simulation.<\/li>\r\n \t<li style=\"text-align: left\">Repeat the example given in section 2.16 after adding a mechanical spring $(k_3)$ between mass $m_3$ and the wall. Modify the model provided for this example accordingly and run the simulation.<\/li>\r\n<\/ol>\r\n<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/exercise-2-8\/\"><img class=\"aligncenter size-full wp-image-385\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8.jpg\" alt=\"\" width=\"795\" height=\"415\" \/><\/a>\r\n<ol start=\"9\">\r\n \t<li style=\"text-align: left\">Repeat the example given in section 2.17 after replacing the pendulum with a double pendulum. Modify the model provided for this example accordingly and run the simulation.<\/li>\r\n<\/ol>\r\n<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/exercise-2-9\/\"><img class=\"aligncenter size-full wp-image-380\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-9.jpg\" alt=\"\" width=\"691\" height=\"669\" \/><\/a>\r\n<ol start=\"10\">\r\n \t<li style=\"text-align: left\">Derive the system equations for the electrical circuit shown in the below sketch. Use Lagrangian method and solve the resulting system of ODEs with 20-sim.<\/li>\r\n<\/ol>\r\n<a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/exercise-2-10\/\"><img class=\"wp-image-381 size-full aligncenter\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10.jpg\" alt=\"\" width=\"1383\" height=\"510\" \/><\/a>\r\n\r\n<\/div>\r\n<\/div>","rendered":"<h1>2.1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Overview<\/h1>\n<figure id=\"attachment_93\" aria-describedby=\"caption-attachment-93\" style=\"width: 266px\" class=\"wp-caption alignright\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/joseph-louis-lagrange\/\" rel=\"attachment wp-att-93\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-93\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-266x300.png\" alt=\"\" width=\"266\" height=\"300\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-266x300.png 266w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-906x1024.png 906w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-768x868.png 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-1359x1536.png 1359w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-1813x2048.png 1813w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-65x73.png 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-225x254.png 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange-350x395.png 350w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Joseph-Louis-Lagrange.png 1909w\" sizes=\"auto, (max-width: 266px) 100vw, 266px\" \/><\/a><figcaption id=\"caption-attachment-93\" class=\"wp-caption-text\">Joseph-Louis Lagrange (1736\u20131813)<\/figcaption><\/figure>\n<p>In general, it is easier to perform engineering\/technical calculations using a scalar quantity rather than a tensor\/vector type quantity, mainly because a vector\u2019s components depend on the selected coordinates system, and hence, more quantities to deal with. This was the main motivation for Joseph-Louis Lagrange (1736\u20131813), <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R7\"><strong>[7]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R8\"><strong>[8]<\/strong><\/a> to start looking into the Newtonian mechanics close to a century after Newton developed his laws. Consequently, Lagrange developed a new formulation, so-called <em>Lagrangian mechanics<\/em> (1788).<br \/>\nLagrange\u2019s approach has advantages over that of Newton\u2019s, specifically for analyzing complex multi-domain, multi-component systems. Lagrange\u2019s approach releases us from having to consider a single inertia coordinates system and inter-component constraint forces. In addition, Langrangian method is faster and more efficient in terms of computation time and effort required to analyze and model engineering systems.<\/p>\n<p>In Newtonian mechanics, a local condition, e.g., initial position and velocity (or momentum), is required for calculating the future states of a system. Using Newton\u2019s law of motion, for a system or components of a system, the sum of forces (both applied, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-173ea47a71af40abe14e2cfcbc22ae14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#118;&#123;&#70;&#125;&#95;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"18\" style=\"vertical-align: -2px;\" \/> and constrained\/internal, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6bf3a62c59241cabc69e61d0260172eb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#118;&#123;&#70;&#125;&#95;&#99;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"17\" style=\"vertical-align: -2px;\" \/>), is equal to the time rate of change of the momentum, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-803b9cb5b18b6d3ef6c8854b2e6b6b1e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#118;&#123;&#112;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"12\" style=\"vertical-align: -3px;\" \/>.<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 32px;\"><span class=\"ql-right-eqno\"> (2.1) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f2ab1edbc1622d642914edf06b13b5b0_l3.png\" height=\"32\" width=\"129\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#115;&#117;&#109;&#40;&#92;&#118;&#118;&#123;&#70;&#125;&#95;&#97;&#32;&#43;&#32;&#92;&#118;&#118;&#123;&#70;&#125;&#95;&#99;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#92;&#118;&#118;&#123;&#112;&#125;&#125;&#123;&#100;&#116;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>In order to identify the constraints, we usually isolate the components one by one from the rest of the system, while keeping the related dynamical equilibrium intact. This operation gives us the free-body diagram of each desired component, useful for analyzing the system\u2019s motion dynamics and calculating inter-component constraint forces. However, in the Lagrangian approach, we consider a quantity that is like energy in dimension, the Lagrangian <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/>, and use a set of partial differential equations (PDEs)\u2014<em>Euler-Lagrange<\/em> or <em>Lagrange\u2019s<\/em> equations\u2014 to analyze the system dynamics.<\/p>\n<p>The latter is much more effective approach for analyzing the systems with many degrees of freedom and for dealing with multi-domain systems. In general, <em>L<\/em> is a function of coordinates considered and their time derivatives and, as well, could explicitly depend on time. For example, in a one-dimensional system, with designated coordinate <em>x<\/em>, the Lagrangian is written as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f235cbe55123b3ec0bcd1b8ac0e1396a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#61;&#76;&#40;&#120;&#44;&#92;&#100;&#111;&#116;&#32;&#120;&#44;&#116;&#41;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"88\" style=\"vertical-align: -4px;\" \/> We can visualize <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/> as the topography of a surface represented by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/> as a function of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dca55e385b32c539ce5330f3eb8ba7c5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: 0px;\" \/>, as shown in <a href=\"#F2-1\">Figure 2-1<\/a>. This surface can vary with time, hence explicit dependence of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/> on time, or it could be stationary. An example of the former is the motion of a mass particle on the surface of a moving sphere. Similarly, the Lagrangian of such a system is stationary if the sphere is not moving. The visualization presented in reference <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R9\"><strong>[9]<\/strong><\/a> may help readers with understanding Lagrangian surface.<\/p>\n<figure id=\"attachment_94\" aria-describedby=\"caption-attachment-94\" style=\"width: 459px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-1\/\" rel=\"attachment wp-att-94\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-94 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-1.jpg\" alt=\"\" width=\"459\" height=\"344\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-1.jpg 459w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-1-300x225.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-1-65x49.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-1-225x169.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-1-350x262.jpg 350w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/a><figcaption id=\"caption-attachment-94\" class=\"wp-caption-text\">Figure 2-1 Lagrangian surface visualized in x-<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dca55e385b32c539ce5330f3eb8ba7c5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: 0px;\" \/> space<\/figcaption><\/figure>\n<p>The foundation of Lagrangian mechanics rests on the principle of <em>stationary action integral<\/em> (also referred to as Hamilton\u2019s principle) . This principle simply states that a system\u2019s motion from a given state to another is such that a specific quantity (i.e., the system\u2019s Lagrangian function) related to its motion is extremized (i.e., minimized or maximized); hence, the value of its integral (i.e., the action integral, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f3d5c71410e31d3c2f15fe6d4311a169_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#65;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: -1px;\" \/>) remains invariant <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R10\"><strong>[10]<\/strong><\/a>.<\/p>\n<div class=\"textbox\">The motion of a system from <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b4f0e6ee51399f2c08ffd3b6d4031bbd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -2px;\" \/> to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-79f241e02fea3760cfc5c74fbc1f53f6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"11\" style=\"vertical-align: -2px;\" \/> is such that the action integral has a stationary value for the actual path of the motion<\/div>\n<p>In other words, among all possible paths available for the motion of the system to go through, there exists one specific path that minimizes\/maximizes (for most systems minimizes; hence, this is also referred to a <em>principle of least action<\/em>) the integral of the corresponding Lagrangian with respect to time. Mathematically, the stationary action integral can be stated as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 37px;\"><span class=\"ql-right-eqno\"> (2.2) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-344834e0991f50a49772686f4b0d25d2_l3.png\" height=\"37\" width=\"185\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#65;&#125;&#32;&#61;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#105;&#110;&#116;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#76;&#40;&#120;&#44;&#92;&#100;&#111;&#116;&#32;&#120;&#44;&#32;&#116;&#41;&#100;&#116;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#61;&#32;&#48; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Using calculus of variations <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R12\"><strong>[12]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a> and Equation (2.2) it can be shown (see <a href=\"#S2-5\">section 2.5<\/a>) that <em>L<\/em> should satisfy Lagrange\u2019s equation, or<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> (2.3) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-91e963b38e601f0f3d379dd138927119_l3.png\" height=\"36\" width=\"125\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#61;&#32;&#48; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>where <em>L<\/em> is defined as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0e823f2691402e38f3718e8d1805d9ce_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#61;&#84;&#45;&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"70\" style=\"vertical-align: 0px;\" \/>, with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-986c7f3de4b722c12aebed69a2e6c23b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"11\" style=\"vertical-align: 0px;\" \/> being the kinetic energy and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8935e1fc41ac189c9b5516179e32f85a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: 0px;\" \/> the potential energy functions. With reference to <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-1\">Figure 2-1<\/a>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ae542e278a5bf847efe2abd6c82d5a28_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#92;&#98;&#105;&#103;&#124;&#95;&#123;&#92;&#100;&#111;&#116;&#32;&#120;&#61;&#99;&#111;&#110;&#115;&#116;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"66\" style=\"vertical-align: -10px;\" \/> is the slope at a selected point on the curve at the cross-section of surface <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/> and a plane parallel to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/>-plane at desired <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dca55e385b32c539ce5330f3eb8ba7c5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: 0px;\" \/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-16945b1db273a7df1acfa68235189684_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#98;&#105;&#103;&#124;&#95;&#123;&#120;&#61;&#99;&#111;&#110;&#115;&#116;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"108\" style=\"vertical-align: -14px;\" \/> is the rate of change in the slope at the same selected point on the curve at the cross-section of a plane parallel to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dca55e385b32c539ce5330f3eb8ba7c5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: 0px;\" \/>-plane drawn from and including the selected point the same point. In other words, we draw two planes parallel to the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dca55e385b32c539ce5330f3eb8ba7c5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: 0px;\" \/> planes and equate their corresponding slopes at their intersectional point. Therefore, for a stationary point, these two quantities should be equal, as given by Euler\u2019s equation (2.3). This is shown in the following sketch, see <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-2\">Figure 2-2<\/a>. <a id=\"F2-2\"><\/a><\/p>\n<figure id=\"attachment_109\" aria-describedby=\"caption-attachment-109\" style=\"width: 907px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-2\/\" rel=\"attachment wp-att-109\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-109 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2.jpg\" alt=\"\" width=\"907\" height=\"657\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2.jpg 907w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2-300x217.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2-768x556.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2-65x47.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2-225x163.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-2-350x254.jpg 350w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/a><figcaption id=\"caption-attachment-109\" class=\"wp-caption-text\">Figure 2 2 A sketch for visualizing Euler-Lagrange&#8217;s equation<\/figcaption><\/figure>\n<p>By working out a simple example, we show that the Lagrangian approach is equivalent to the Newtonian approach in terms of the system\u2019s equation of motion.<\/p>\n<h1>2.2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Mass-Spring System<a id=\"S2-2\"><\/a><\/h1>\n<p>For this example, we show that Equation (2.3) gives the same results as that of Newton\u2019s law of motion when applied to a simple mass-spring system, as sketched in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-3\">Figure 2-3<\/a>.<a id=\"F2-3\"><\/a><\/p>\n<figure id=\"attachment_113\" aria-describedby=\"caption-attachment-113\" style=\"width: 876px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-3\/\" rel=\"attachment wp-att-113\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-113 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3.jpg\" alt=\"\" width=\"876\" height=\"343\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3.jpg 876w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3-300x117.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3-768x301.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3-65x25.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3-225x88.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-3-350x137.jpg 350w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/a><figcaption id=\"caption-attachment-113\" class=\"wp-caption-text\">Figure 2-3 A frictionless mass-spring system<\/figcaption><\/figure>\n<p>The kinetic energy for the mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9548e3101a076aa0fd0a5b9ca2d0e478_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#109;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"67\" style=\"vertical-align: -10px;\" \/> and the spring potential energy (i.e. stored elastic energy) with the spring constant <em>k<\/em> is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-46f63a049f3e62039b21fd3a36649b4e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#92;&#105;&#110;&#116;&#32;&#107;&#120;&#100;&#120;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#107;&#120;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"127\" style=\"vertical-align: -10px;\" \/>. Therefore, using Equation (2.3), we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d95c10fd3e54c3ef6fd35149898e4bba_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#109;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#107;&#120;&#94;&#50;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#109;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#107;&#120;&#94;&#50;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"341\" style=\"vertical-align: -14px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1bfdaaae58fc4af806b2a1c781fa4e4d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#107;&#120;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"82\" style=\"vertical-align: -2px;\" \/>. Note that for this analysis we did not need to consider the free-body diagram of mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> nor the spring force as the constraining force acting on it; rather, we used the scalar quantity <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-831687fd23b1d615681bc8052c7122f7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#84;&#45;&#86;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"50\" style=\"vertical-align: -4px;\" \/>. However, the assumption of having a potential function <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8935e1fc41ac189c9b5516179e32f85a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: 0px;\" \/> from which we can calculate the spring force is required (i.e., <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-14655e59c32d51b538c06b7f341c5447_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#45;&#92;&#110;&#97;&#98;&#108;&#97;&#32;&#86;&#32;&#61;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#107;&#120;&#94;&#50;&#32;&#41;&#125;&#123;&#100;&#120;&#125;&#32;&#61;&#32;&#45;&#107;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"45\" width=\"167\" style=\"vertical-align: -10px;\" \/>), see <a href=\"#S2-7\">section 2.7<\/a>.<\/p>\n<p>In the following sections we expand on the Lagrangian method for discrete systems with related derivation, constraints and definitions for generalized coordinates, forces, and momenta.<\/p>\n<h1><a id=\"S2-3\"><\/a>2.3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Lagrange\u2019s Equations for a Mass System in 3D Space<\/h1>\n<p>We consider a particle with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> in a 3D space <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8a52f26f5346504e6b8bb6da6ed89131_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#95;&#105;&#32;&#61;&#32;&#40;&#120;&#95;&#49;&#44;&#120;&#95;&#50;&#44;&#120;&#95;&#51;&#41;&#32;&#92;&#101;&#113;&#117;&#105;&#118;&#32;&#40;&#120;&#44;&#121;&#44;&#122;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"167\" style=\"vertical-align: -4px;\" \/>, Cartesian system. By definition, the Lagrangian function is written as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a1ca7b36a820c7c716ab32ef6dec321a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#61;&#84;&#45;&#86;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#109;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#32;&#121;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#32;&#122;&#94;&#50;&#32;&#41;&#32;&#45;&#32;&#86;&#40;&#120;&#44;&#121;&#44;&#122;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"278\" style=\"vertical-align: -10px;\" \/>. We have assumed that the potential energy function is only a function of the space coordinates, so-called <em>holonomic<\/em> system. We now form two sets of derivatives <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-731a28a4c1a026b55a26af04c827cd11_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;&#125;&#32;&#61;&#32;&#112;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"53\" style=\"vertical-align: -12px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-af129c92b4a646c8759c7acb3a829440_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#32;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#105;&#125;&#32;&#61;&#32;&#70;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"55\" style=\"vertical-align: -12px;\" \/> of the Lagrangian function <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3ed7842ff7372af482e1ee9001cc1243_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#61;&#76;&#40;&#32;&#120;&#44;&#121;&#44;&#122;&#44;&#92;&#100;&#111;&#116;&#32;&#120;&#44;&#32;&#92;&#100;&#111;&#116;&#32;&#121;&#44;&#32;&#92;&#100;&#111;&#116;&#32;&#122;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"129\" style=\"vertical-align: -4px;\" \/>. Therefore, e.g., in 1D space, we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0382269b122bb5baefdd79838c55984a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#61;&#32;&#109;&#92;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"56\" style=\"vertical-align: -5px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-38396539e79560e298d36cfa6e4b9ef0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#61;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#61;&#32;&#70;&#95;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"108\" style=\"vertical-align: -10px;\" \/>. Hence <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7641c040bccd0c7299433c66bc64354e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#70;&#95;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"15\" style=\"vertical-align: -2px;\" \/> is a conservative force (see <a href=\"#S2-7\">section 2.7<\/a>). Now, using Newton\u2019s second law, we can write the equation of motion, its <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/>-component, as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e58ad4376d48171baf14aa197f83ab94_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#70;&#95;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"55\" style=\"vertical-align: -2px;\" \/> or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-868162805a9e5a92a6c11a2f3d0ca871_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#112;&#95;&#105;&#32;&#61;&#32;&#109;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"131\" style=\"vertical-align: -14px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f675e3ef10cc6cb4ec467ae5b705022e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#32;&#61;&#32;&#70;&#95;&#120;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"58\" style=\"vertical-align: -10px;\" \/> Therefore, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3da80f59c9710eb5267033a585d07805_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"99\" style=\"vertical-align: -14px;\" \/>. Similar derivation can be performed for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b0f2d8657a6105623c9f68fde083ec57_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: -3px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-76765387c47fa33c6f422bef1fa0925c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"7\" style=\"vertical-align: 0px;\" \/> components of the equation of motion. Therefore, we get the Euler-Lagrange equations<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> (2.4) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0730bf7004de8617fa5cc0f5104964f6_l3.png\" height=\"36\" width=\"211\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#105;&#125;&#32;&#61;&#32;&#48;&#32;&#92;&#113;&#117;&#97;&#100;&#44;&#32;&#105;&#61;&#49;&#44;&#50;&#44;&#51; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>The motion of the particle could be considered, in principle, in another coordinate system, e.g., a cylindrical or spherical system, as well. Therefore, we can define a set of coordinates <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d690fc217bc03b5875fc4c75cc01d55a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#39;&#95;&#105;&#32;&#61;&#32;&#40;&#113;&#39;&#95;&#49;&#44;&#113;&#39;&#95;&#50;&#44;&#113;&#39;&#95;&#51;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"92\" style=\"vertical-align: -4px;\" \/> to represent arbitrary coordinate systems, including Cartesian or curvilinear, and write Equation (2.4) in terms of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7e09292b5b4ce7d4b02f690d6da0e8d9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#39;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"10\" style=\"vertical-align: -4px;\" \/>, as well, for generality.<\/p>\n<h1><a id=\"S2-4\"><\/a>2.4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Generalized Coordinates, Momenta, and Forces<\/h1>\n<p>As mentioned previously, one of the advantages of Lagrangian method is that we do not require consideration of the constrained forces. Therefore, we can include only those coordinates that correspond to the degrees of freedom related to a system. This consideration leads us to the concept of generalized coordinates, which is used in Lagrangian mechanics instead of inertia coordinates used in the Newtonian mechanics.<\/p>\n<p>We now define the generalized coordinates. First, we expand the system discussed in <a href=\"#S2-3\">section 2.3<\/a> to include <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1e66afa6e59f80b3ca667bc76ffa718b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#78;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"13\" style=\"vertical-align: 0px;\" \/> number of particles that move in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ca1f6d0602e381ef85c27ab25945f4fb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#51;&#78;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"20\" style=\"vertical-align: 0px;\" \/> coordinate space, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-438c0c08627b38e9c9ed12639700ad8b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#39;&#95;&#105;&#61;&#40;&#113;&#39;&#95;&#49;&#44;&#113;&#39;&#95;&#50;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#113;&#39;&#95;&#123;&#51;&#78;&#125;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"128\" style=\"vertical-align: -4px;\" \/>. However, in a real-world system we can have restrictions imposed on the system\u2019s motion; hence, some of the coordinates are constrained and do not vary independently. For example, a particle moving in a plane <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-50a3a40b088b797a9584cddabef750d7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#120;&#45;&#121;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"43\" style=\"vertical-align: -4px;\" \/> is constrained to move in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-76765387c47fa33c6f422bef1fa0925c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"7\" style=\"vertical-align: 0px;\" \/>-direction <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-99cc3e28a7a21d7f676bcf0db11fa3a5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#122;&#61;&#48;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"43\" style=\"vertical-align: -4px;\" \/>. Or, the mass bob of a pendulum moving in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0fd7e2709e10d1800fd8f83e48b340c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#114;&#45;&#92;&#116;&#104;&#101;&#116;&#97;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"42\" style=\"vertical-align: -4px;\" \/> plane is restricted to move out of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-76765387c47fa33c6f422bef1fa0925c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"7\" style=\"vertical-align: 0px;\" \/>-plane and if the pendulum rod has a fixed length, then only coordinate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d32fdee09932f445d15d60edb7a9cd7f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/> varies during its motion. To capture these constraints, it is common and convenient to define generalized coordinates. Assume that for a <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ca1f6d0602e381ef85c27ab25945f4fb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#51;&#78;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"20\" style=\"vertical-align: 0px;\" \/> coordinates system we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2fd8b24051edab3c50f2a2e22689218c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#78;&#95;&#99;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"17\" style=\"vertical-align: -2px;\" \/> number of constraints. Therefore, the number of independent coordinates defining the motion is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f0c855ea679ef3d6d96710cd3a23305e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;&#61;&#51;&#78;&#45;&#78;&#95;&#99;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"83\" style=\"vertical-align: -2px;\" \/>. By definition, for holonomic systems this is equal to the number of degrees of freedom <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a>. Now we define the <em>generalized coordinates<\/em> as a subset of the original coordinates, with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-06e47d802f9f80787fe0633fc50fc919_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#105;&#61;&#40;&#113;&#95;&#49;&#44;&#113;&#95;&#50;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#113;&#95;&#110;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"119\" style=\"vertical-align: -4px;\" \/>. Note that <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-59a6f73efaf4a1ca7a22cb9a18a3b17a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;&#60;&#51;&#78;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"48\" style=\"vertical-align: -1px;\" \/> is the number of degrees of freedom which is equal to the number of generalized coordinates, and coordinates of the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e8a6dbe4138f3e28608b9edd4fa4d91b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: -3px;\" \/> system are not necessarily the same as those of the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7e09292b5b4ce7d4b02f690d6da0e8d9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#39;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"10\" style=\"vertical-align: -4px;\" \/>, by one-to-one comparison.<\/p>\n<p>For derivation of the equations of motion of a system, using Lagrangian approach, we can calculate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-bffc8081641ed5efc5b4b7ef756c8243_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"9\" style=\"vertical-align: 0px;\" \/> number of equations for the system, one by one, related to each generalized coordinate. We can also use the generalized coordinates to define the velocity-phase space, as the combined set of generalized coordinates and their corresponding time derivatives. Therefore, the Lagrangian, as a functional, reads<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> (2.5) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1d35ee5344db22d742d8bb629cc2c9ac_l3.png\" height=\"36\" width=\"225\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#76;&#32;&#61;&#32;&#76;&#32;&#40;&#92;&#117;&#110;&#100;&#101;&#114;&#98;&#114;&#97;&#99;&#101;&#123;&#113;&#95;&#49;&#44;&#113;&#95;&#50;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#113;&#95;&#110;&#44;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#44;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#110;&#125;&#95;&#123;&#92;&#116;&#101;&#120;&#116;&#123;&#112;&#104;&#97;&#115;&#101;&#32;&#115;&#112;&#97;&#99;&#101;&#125;&#125;&#32;&#44;&#116;&#41; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Note that the time dependence of Lagrangian may be explicit for some systems and implicit for others and that the phase-space coordinates do not necessarily have the same units\/dimensions. For example, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-724f10a5168ede056379619b20b714f3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"11\" style=\"vertical-align: -3px;\" \/> could be a displacement and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-88a873297078fe3647089abe5b9b0d03_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: -3px;\" \/> an angle for a system like a pendulum with moving pivot point.<\/p>\n<p>The fact that we can neglect the constrained coordinates in Lagrangian formulation is an advantage of this method over Newton\u2019s because we don\u2019t need to calculate the constrained \u201cforces\u201d in order to derive the equations of motion. Of course, the constrained forces can be calculated, if required, after having the solution to the system\u2019s equations of motion.<\/p>\n<p>Like the generalized coordinates, we also define associated generalized momenta and forces. As mentioned in the previous section, the definition of momentum in Lagrangian mechanics is more general than that of mass times the velocity. For example, it could be angular momentum, instead. Similarly, the definition of forces is not limited to mechanical forces; it can be applied, e.g., to voltage and temperature in electrical and thermal domains. Therefore, for each generalized coordinate we can define the corresponding generalized momentum and force. As given by Equation (2.6), we can write the generalized momenta and generalized force in terms of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/>, as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 88px;\"><span class=\"ql-right-eqno\"> (2.6) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-280a1ce9d259a7a4c130ec30c58818d7_l3.png\" height=\"88\" width=\"312\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#99;&#97;&#115;&#101;&#115;&#125; &#112;&#95;&#105;&#32;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#44;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#103;&#101;&#110;&#101;&#114;&#97;&#108;&#105;&#122;&#101;&#100;&#32;&#109;&#111;&#109;&#101;&#110;&#116;&#97;&#125;&#92;&#92; &#92;&#92; &#70;&#95;&#105;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#44;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#103;&#101;&#110;&#101;&#114;&#97;&#108;&#105;&#122;&#101;&#100;&#32;&#102;&#111;&#114;&#99;&#101;&#115;&#125; &#92;&#101;&#110;&#100;&#123;&#99;&#97;&#115;&#101;&#115;&#125; &#92;&#113;&#117;&#97;&#100;&#32;&#105;&#32;&#61;&#32;&#49;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#110; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p><a href=\"#S2-7\">Section 2.7<\/a> discusses the topic of generalized force in terms of its types: conservative and non-conservative.<\/p>\n<h1><a id=\"S2-5\"><\/a>2.5\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Hamilton\u2019s Principle and Lagrange\u2019s Equations<\/h1>\n<figure id=\"attachment_142\" aria-describedby=\"caption-attachment-142\" style=\"width: 219px\" class=\"wp-caption alignright\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/william-rowan-hamilton-portrait\/\" rel=\"attachment wp-att-142\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142 size-medium\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/William-Rowan-Hamilton-portrait-219x300.png\" alt=\"\" width=\"219\" height=\"300\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/William-Rowan-Hamilton-portrait-219x300.png 219w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/William-Rowan-Hamilton-portrait-65x89.png 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/William-Rowan-Hamilton-portrait-225x309.png 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/William-Rowan-Hamilton-portrait-350x480.png 350w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/William-Rowan-Hamilton-portrait.png 373w\" sizes=\"auto, (max-width: 219px) 100vw, 219px\" \/><\/a><figcaption id=\"caption-attachment-142\" class=\"wp-caption-text\">William Rowan Hamilton (1805\u20131865)<\/figcaption><\/figure>\n<p>Hamilton\u2019s principle, as given by Equation (2.2), is basically a mathematical expression of calculus of variations application for a system dynamical motion with the realization that Lagrangian functional is the function that should be extremized <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R12\"><strong>[12]<\/strong><\/a>. Therefore, Lagrange\u2019s equations are resulted from the related calculations, naturally. This realization was first expressed by William Rowan Hamilton (1805-1865), <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R14\"><strong>[14]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R15\"><strong>[15]<\/strong><\/a>.<br \/>\nEquation (2.4) can be written in terms of generalized coordinates, as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> (2.7) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d56ec98db4c86e2d7f385b841daf8da3_l3.png\" height=\"36\" width=\"236\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#61;&#32;&#48;&#32;&#92;&#113;&#117;&#97;&#100;&#44;&#32;&#105;&#32;&#61;&#32;&#49;&#44;&#50;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#110; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Equation (2.7) shows that Lagrange\u2019s equation is consequence of, and necessary for, making the action integral stationary. We assume that variation <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-785e07a151ad0026e4a3f386dcdc7bc0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: 0px;\" \/> results from variation in one of the arbitrarily selected coordinates, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b30ef2260dee2f2ba4f958deae4c76fb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"14\" style=\"vertical-align: -3px;\" \/> (dropping the subscript index for simplicity without losing the generality) while satisfying the fixed boundary conditions, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-560b78fa44fe641814b0bd78acad355f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#40;&#116;&#95;&#49;&#32;&#41;&#32;&#61;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#40;&#116;&#95;&#50;&#32;&#41;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"120\" style=\"vertical-align: -4px;\" \/>. Obviously, the same operation can be performed for all coordinates involved, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-82b93c684613fba9d1c4c60d1f3428ed_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#105;&#61;&#49;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"73\" style=\"vertical-align: -3px;\" \/>.<a id=\"F2-4\"><\/a><\/p>\n<figure id=\"attachment_374\" aria-describedby=\"caption-attachment-374\" style=\"width: 816px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-4\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-374\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4.jpg\" alt=\"\" width=\"816\" height=\"594\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4.jpg 816w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4-300x218.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4-768x559.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4-65x47.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4-225x164.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-4-350x255.jpg 350w\" sizes=\"auto, (max-width: 816px) 100vw, 816px\" \/><\/a><figcaption id=\"caption-attachment-374\" class=\"wp-caption-text\">Figure 2-4 Sketch for variation of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/> for an arbitrary <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b30ef2260dee2f2ba4f958deae4c76fb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"14\" style=\"vertical-align: -3px;\" \/><\/figcaption><\/figure>\n<p>Substituting Equation (2.7) into Equation (2.2), after dropping the subscript index and assuming <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cfb8f579273adb21f113b138108d9aff_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#61;&#76;&#40;&#113;&#44;&#92;&#100;&#111;&#116;&#32;&#113;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"70\" style=\"vertical-align: -4px;\" \/> for simplicity, we get<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 59px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-46a4c7858d29f053da7696e5171c7e60_l3.png\" height=\"59\" width=\"470\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#65;&#125;&#32;&#61;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#66;&#105;&#103;&#92;&#123;&#32;&#92;&#105;&#110;&#116;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#100;&#116;&#92;&#66;&#105;&#103;&#92;&#125;&#32;&#61;&#32;&#92;&#66;&#105;&#103;&#103;&#92;&#123;&#32;&#92;&#105;&#110;&#116;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#98;&#105;&#103;&#92;&#091;&#92;&#117;&#110;&#100;&#101;&#114;&#98;&#114;&#97;&#99;&#101;&#123;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#125;&#95;&#123;&#76;&#125;&#32;&#92;&#98;&#105;&#103;&#92;&#32;&#32;&#100;&#116;&#32;&#92;&#66;&#105;&#103;&#103;&#92;&#125;&#32;&#61;&#32;&#48; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>But <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7c9930ec8d869cc44b9c9d3bce9bfd80_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#76;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#100;&#111;&#116;&#32;&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"125\" style=\"vertical-align: -13px;\" \/> and the last term can be written as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cc545e16dadefa04ef01209f061f9cb8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"224\" style=\"vertical-align: -14px;\" \/> and hence, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2711aa9630f548aa98c44955112ff9b2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#76;&#32;&#61;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"260\" style=\"vertical-align: -14px;\" \/>.<\/p>\n<p>Back substituting into action integral expression, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dbec2b1c54535b2f414ce9ab10b71a82_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#65;&#125;&#32;&#61;&#32;&#92;&#105;&#110;&#116;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#92;&#58;&#32;&#100;&#116;&#32;&#43;&#32;&#92;&#105;&#110;&#116;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#100;&#116;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"366\" style=\"vertical-align: -14px;\" \/>.<\/p>\n<p>But the last integral gives <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-15273469054b07de4ccf371eee47e001_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#105;&#110;&#116;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#100;&#116;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#92;&#66;&#105;&#103;&#124;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#98;&#105;&#103;&#103;&#091;&#32;&#92;&#117;&#110;&#100;&#101;&#114;&#98;&#114;&#97;&#99;&#101;&#123;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#40;&#116;&#95;&#50;&#41;&#32;&#45;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#40;&#116;&#95;&#49;&#41;&#125;&#95;&#123;&#61;&#48;&#125;&#32;&#92;&#98;&#105;&#103;&#103;&#093;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"44\" width=\"363\" style=\"vertical-align: -22px;\" \/>.<\/p>\n<p>Therefore, we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3b0fc29a446a63dacc6223f5758cf0a2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#65;&#125;&#32;&#61;&#32;&#92;&#105;&#110;&#116;&#95;&#123;&#116;&#95;&#49;&#125;&#94;&#123;&#116;&#95;&#50;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;&#32;&#92;&#58;&#32;&#100;&#116;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"236\" style=\"vertical-align: -14px;\" \/>. Since <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b30ef2260dee2f2ba4f958deae4c76fb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#101;&#108;&#116;&#97;&#32;&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"14\" style=\"vertical-align: -3px;\" \/> is arbitrarily selected, the integrand should be equal to zero in order to have the value of the integral null, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c09a422ec3861302a5b37ba0e66cf78e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"98\" style=\"vertical-align: -14px;\" \/>. This concludes the derivation of Lagrange\u2019s equation using Hamilton\u2019s principle. However, one can derive Lagrange\u2019s equation in a more direct way using calculus of variations or virtual work principles, see <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\">[13]<\/a><\/strong>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R16\">[16]<\/a><\/strong>.<\/p>\n<p>So far, we have considered systems that do not involve energy dissipation. In practice, however, we require extra terms in Lagrange\u2019s equation to account for friction existing in real-world systems. Therefore, we expand the discussion to include non-conservative forces, e.g., friction and dampers, and find the corresponding Lagrange equation, including related topics such as cyclic coordinates, symmetry, multi-domain, and higher-order systems, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R8\">[8]<\/a><\/strong>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\">[13]<\/a><\/strong>, <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R17\">[17]<\/a><\/strong>.<\/p>\n<h1>2.6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cyclic Coordinates<\/h1>\n<p>From Equation (2.6), it can be shown that if Lagrangian function does not have explicit dependency on one of the coordinates, say <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1550e7e28ce451940eafe136f81267b0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: -3px;\" \/>, among all <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e8a6dbe4138f3e28608b9edd4fa4d91b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: -3px;\" \/>, then the conjugate momentum <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-409ca503a329eec3ee92ae79c36c83a8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"14\" style=\"vertical-align: -3px;\" \/> is conserved. The proof is as follows. Writing the Lagrange\u2019s equation for coordinate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1550e7e28ce451940eafe136f81267b0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: -3px;\" \/>, we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-78bff434404ce8321eff9418c3eee916_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#107;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#107;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"132\" style=\"vertical-align: -14px;\" \/>. Since by definition, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a99c0da4f7a0a41bd55a8e4ed9dc5c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: 0px;\" \/> is not a function of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1550e7e28ce451940eafe136f81267b0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: -3px;\" \/>, then <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7d9f91123eff65a0770a957255991d2d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#107;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"49\" style=\"vertical-align: -13px;\" \/>. Therefore, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1a9ed86d2cdb1b6a3f813a28b681155e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#107;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"89\" style=\"vertical-align: -14px;\" \/>, and written in terms of generalized momentum <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-409ca503a329eec3ee92ae79c36c83a8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"14\" style=\"vertical-align: -3px;\" \/>, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b2e8117a8e36d6fec7ab602f38249286_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#112;&#95;&#107;&#41;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"66\" style=\"vertical-align: -10px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-409ca503a329eec3ee92ae79c36c83a8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"14\" style=\"vertical-align: -3px;\" \/> is invariant with respect to time, hence conserved. It is common to call the coordinate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1550e7e28ce451940eafe136f81267b0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: -3px;\" \/>, <em>cyclic<\/em> or ignorable.<\/p>\n<h1><a id=\"S2-7\"><\/a>2.7 \u00a0 \u00a0 \u00a0\u00a0 Conservative and Non-Conservative Forces<\/h1>\n<p>The generalized forces can be conservative or non-conservative. Conservative forces are those like gravity, buoyancy, mechanical spring, electrostatic, and magnetic. Non-conservative forces are those like friction, damping, and resistance.<\/p>\n<p>By definition, a conservative force is curl free, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dec4d1bc9065ceef8c5f8848b5e4d162_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#118;&#123;&#92;&#110;&#97;&#98;&#108;&#97;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#92;&#118;&#118;&#123;&#70;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"68\" style=\"vertical-align: -1px;\" \/>. Writing this expression in index notation, we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-544899ea8bf78a851039b82bc3831c3a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#105;&#106;&#107;&#125;&#70;&#95;&#123;&#107;&#44;&#106;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"74\" style=\"vertical-align: -5px;\" \/>, where <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ed08d211c08c2b141eadf193c00a317a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#105;&#106;&#107;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"23\" style=\"vertical-align: -5px;\" \/> is the permutation symbol <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R18\"><strong>[18]<\/strong><\/a>. For example, force under gravity is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c05e3d041d6a7bd2434ee240665aa0f4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#70;&#95;&#120;&#44;&#70;&#95;&#121;&#44;&#70;&#95;&#122;&#41;&#61;&#40;&#48;&#44;&#48;&#44;&#97;&#122;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"144\" style=\"vertical-align: -5px;\" \/>. Calculating the curl gives <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-bd7a23a8c3b048f539dc7bcb233ceab8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#49;&#50;&#51;&#125;&#70;&#95;&#123;&#51;&#44;&#50;&#125;&#45;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#49;&#51;&#50;&#125;&#70;&#95;&#123;&#50;&#44;&#51;&#125;&#32;&#43;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#50;&#51;&#49;&#125;&#70;&#95;&#123;&#49;&#44;&#51;&#125;&#32;&#45;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#50;&#49;&#51;&#125;&#70;&#95;&#123;&#51;&#44;&#49;&#125;&#32;&#43;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#51;&#49;&#50;&#125;&#70;&#95;&#123;&#50;&#44;&#49;&#125;&#32;&#45;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#51;&#50;&#49;&#125;&#70;&#95;&#123;&#49;&#44;&#50;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"387\" style=\"vertical-align: -5px;\" \/>. Each term is identically zero; hence, the force under gravity field is conservative. Now, using the vector identity <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-706425e868ef94a3904e8149e4963d1b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#118;&#32;&#92;&#110;&#97;&#98;&#108;&#97;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#92;&#118;&#118;&#32;&#92;&#110;&#97;&#98;&#108;&#97;&#40;&#86;&#41;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"91\" style=\"vertical-align: -4px;\" \/> or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a4d38b030c9a3c6db9b8893d1da3b5d8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#69;&#125;&#95;&#123;&#105;&#106;&#107;&#125;&#86;&#95;&#123;&#44;&#107;&#106;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"74\" style=\"vertical-align: -5px;\" \/>; i.e., the curl of a gradient of a scalar function is identically zero, and we can write a conservative force as the gradient of a scalar, such as potential function <em>V<\/em> as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-74ff65dfccd82b47c44a8e6b0324f0da_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#118;&#123;&#70;&#95;&#99;&#125;&#32;&#61;&#32;&#45;&#92;&#118;&#118;&#123;&#92;&#110;&#97;&#98;&#108;&#97;&#125;&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"70\" style=\"vertical-align: -2px;\" \/>. By convention, the negative sign indicates that potential energy increases when work is done against a force field and vice versa.<\/p>\n<p>We now, write Equation (2.7), after dropping the index <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1c97e103b89475159c9ade3743d74a56_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"5\" style=\"vertical-align: 0px;\" \/> for simplicity, for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9877cf90c5e4e702f325f71d4e569f85_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#84;&#40;&#92;&#100;&#111;&#116;&#32;&#113;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"58\" style=\"vertical-align: -4px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d112200b7e32fef25e8ea026a5edb5d2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#86;&#40;&#113;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"61\" style=\"vertical-align: -4px;\" \/>. Therefore, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-fe62b604ee32c8effa4e2a050f06ed2a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"208\" style=\"vertical-align: -14px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2e0ff61b707ec286bb966e71ced8eadf_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#61;&#32;&#48;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"131\" style=\"vertical-align: -14px;\" \/> But <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-da2db1b0032f8a99611a690ac6d51907_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#61;&#32;&#45;&#70;&#95;&#99;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"66\" style=\"vertical-align: -13px;\" \/> , and we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a260adb054992e5e5c4cf952a016783d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#70;&#95;&#99;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"93\" style=\"vertical-align: -14px;\" \/> . This is the equation of motion (i.e. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7233199db38f5a6db782cc16c0181784_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#98;&#105;&#103;&#103;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#109;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#94;&#50;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#98;&#105;&#103;&#103;&#41;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#112;&#125;&#123;&#100;&#116;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"49\" width=\"132\" style=\"vertical-align: -14px;\" \/>). We clearly see that the conservative force is already included in the Lagrange equation given by Equation (2.7). Now, for the case that we have a non-conservative force, or that the potential function is a function of velocity <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c37881aa6a1cfdba0c58ef8e8e9198a2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"7\" style=\"vertical-align: -3px;\" \/> and <em>q<\/em>, (i.e. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-919e4ac6366af122b26f1013018f10ce_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#86;&#40;&#113;&#44;&#92;&#100;&#111;&#116;&#32;&#113;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"74\" style=\"vertical-align: -4px;\" \/> or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2b095a8e66cf45f7b0f2c9b1e901f8a5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#86;&#40;&#92;&#100;&#111;&#116;&#32;&#113;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"61\" style=\"vertical-align: -4px;\" \/>), then we can write use Equation (2.7) to write <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-33fe578a8f6399d39377d5784e9051f0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#32;&#61;&#32;&#48;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"212\" style=\"vertical-align: -14px;\" \/> Re-arranging the term in this expression, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-63d9f3bfab395b0d92d8734c8b88a11f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"187\" style=\"vertical-align: -14px;\" \/> We define the expression on the right-hand side as the non-conservative force, as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b5a435dda33820d8f878acd78829bbc5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#70;&#95;&#123;&#110;&#99;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#125;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"149\" style=\"vertical-align: -14px;\" \/> Hence, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e7220565237808a45cec3b7b8b803685_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#112;&#125;&#123;&#100;&#116;&#125;&#32;&#61;&#32;&#70;&#95;&#123;&#110;&#99;&#125;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"142\" style=\"vertical-align: -14px;\" \/> Again, we have shown that the non-conservative force is already included in the Lagrange equation given by Equation (2.7), provided a modified potential function is defined, as given by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-27ecadd3f5f4c8c2e473f47b87890d7f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#70;&#95;&#123;&#110;&#99;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"21\" style=\"vertical-align: -2px;\" \/>. See reference listed at <strong><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\">[11]<\/a><\/strong> for more details.<\/p>\n<h1>2.8\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Alternative form of Lagrange\u2019s Equation<\/h1>\n<p>In <a href=\"#S2-7\">section 2.7<\/a>, we discussed the applicability of Lagrange\u2019s equation given by Equation (2.7) for conservative and non-conservative forces. In practice, we could benefit from a more explicit form of the Lagrange equation whose terms can be easily identified for different types of forces, including energy dissipation such as damping and resistance. In this way, we can readily calculate the related terms in the Lagrange equation for modeling and simulation of a desired system.<\/p>\n<figure id=\"attachment_149\" aria-describedby=\"caption-attachment-149\" style=\"width: 243px\" class=\"wp-caption alignright\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/jean-le-rond-dalembert-1717-1783-by-french-school-of-the-18t\/\" rel=\"attachment wp-att-149\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-149\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-243x300.jpg\" alt=\"\" width=\"243\" height=\"300\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-243x300.jpg 243w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-828x1024.jpg 828w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-768x949.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-1242x1536.jpg 1242w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-65x80.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-225x278.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school-350x433.jpg 350w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Jean-Le-Rond-dAlembert-by-French-school.jpg 1600w\" sizes=\"auto, (max-width: 243px) 100vw, 243px\" \/><\/a><figcaption id=\"caption-attachment-149\" class=\"wp-caption-text\">Jean le Rond d&#8217;Alembert (1717\u20131783)<\/figcaption><\/figure>\n<p>There are several possible ways to derive the Lagrange equation using, e.g., principles of virtual work and d&#8217;Alembert&#8217;s principle, directly from Newton\u2019s second law of motion and first law of thermodynamics or energy conservation (e.g., conservation of sum of kinetic and potential energies) <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R8\"><strong>[8]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R11\"><strong>[11]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R15\"><strong>[15]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R17\"><strong>[17]<\/strong><\/a>.<\/p>\n<p>We use the conservation of energy approach to derive the alternative form of Equation (2.7) including its expansion <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R17\"><strong>[17]<\/strong><\/a>.<\/p>\n<p>We consider the kinetic energy of a system with generalized coordinates <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e8a6dbe4138f3e28608b9edd4fa4d91b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: -3px;\" \/> for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c71bd3485d2b627ec220d2efcf728340_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#105;&#61;&#49;&#44;&#50;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"91\" style=\"vertical-align: -4px;\" \/>) (see <a href=\"#S2-4\">section 2.4<\/a>) represented by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2744f482a025ddd1965b4ac176c8d160_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#84;&#40;&#113;&#95;&#105;&#44;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"80\" style=\"vertical-align: -4px;\" \/> and its potential energy by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-182c5e7dcbd2c843576c18e6ae37203d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#86;&#40;&#113;&#95;&#105;&#44;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"82\" style=\"vertical-align: -4px;\" \/>. Note that, as we discussed previously, for many mechanical systems kinetic energy is a function of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-35fb2146069074a448c14c1fbf7104ba_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"10\" style=\"vertical-align: -3px;\" \/> and potential energy a function of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e8a6dbe4138f3e28608b9edd4fa4d91b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"10\" style=\"vertical-align: -3px;\" \/>, only. Therefore, the resulted Lagrange equation can be simplified, accordingly. Now, using conservation of total energy of the system, we can write<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 15px;\"><span class=\"ql-right-eqno\"> (2.8) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2f0f56887d8027d99bcb0f5f1b1cb2b8_l3.png\" height=\"15\" width=\"85\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#100;&#40;&#84;&#43;&#86;&#41;&#61;&#48; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>But <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-24f3eaa364d7cfbe53af7232785f754d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#113;&#95;&#105;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"137\" style=\"vertical-align: -13px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-547b7cd52be918304044a04f6525ba34_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#86;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#113;&#95;&#105;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"140\" style=\"vertical-align: -13px;\" \/> , using their functional relationships. After substituting into Equation (2.8), we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-5fa80495cc1d17c2c7f6c48344a04ebd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#113;&#95;&#105;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"226\" style=\"vertical-align: -13px;\" \/>. Note that the Einstein summation convention applies, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a679353917dc9b6487b4c026a0192ea7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#49;&#125;&#32;&#100;&#113;&#95;&#49;&#32;&#43;&#32;&#92;&#99;&#100;&#111;&#116;&#115;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#110;&#125;&#32;&#100;&#113;&#95;&#110;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#125;&#32;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#43;&#32;&#92;&#99;&#100;&#111;&#116;&#115;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#110;&#125;&#32;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"344\" style=\"vertical-align: -13px;\" \/> . Now, using the relation for the kinetic energy of the system, or<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 30px;\"><span class=\"ql-right-eqno\"> (2.9) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d86beec0f1f7ee362bb29dd3eeeed989_l3.png\" height=\"30\" width=\"85\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#84;&#61;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#109;&#95;&#123;&#105;&#106;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#106; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>where <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-de4cbb6f7165cd54b20681c53d83b8c8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#123;&#105;&#106;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"22\" style=\"vertical-align: -5px;\" \/> is defined as the generalized mass matrix, a diagonally nonzero matrix, corresponding to the generalized coordinates. Therefore, its diagonal elements could be mass or moment of inertia when the generalized coordinates are displacement and angle, respectively. For example, for a <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8c5229bd36292c5a8feb6035f79a5e3d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;&#61;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"35\" style=\"vertical-align: 0px;\" \/> system, we have:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-75500e6c3f54619a9eb56c2a2482712e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#109;&#95;&#123;&#105;&#106;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#106;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#40;&#109;&#95;&#123;&#49;&#106;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#106;&#32;&#43;&#32;&#109;&#95;&#123;&#50;&#106;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#106;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"243\" style=\"vertical-align: -10px;\" \/>.<\/p>\n<p>After expanding the expression in the bracket on the R.H.S., we get:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2895cbc91424f917728fb0faf18c7b67_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#40;&#109;&#95;&#123;&#49;&#49;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#43;&#32;&#109;&#95;&#123;&#49;&#50;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#32;&#43;&#109;&#95;&#123;&#50;&#49;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#43;&#32;&#109;&#95;&#123;&#50;&#50;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"306\" style=\"vertical-align: -10px;\" \/>.<\/p>\n<p>With having <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-87d756845d98d5d66e125d73d395b0b0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#61;&#32;&#92;&#100;&#111;&#116;&#32;&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"40\" style=\"vertical-align: -3px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3decc4b7f56370c75bb52a27bcbd891f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#61;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"39\" style=\"vertical-align: -3px;\" \/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d4190b816b82606bf58243856d54da76_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#123;&#49;&#49;&#125;&#32;&#61;&#32;&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"57\" style=\"vertical-align: -2px;\" \/>, particle mass, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-13d82fdf8226eaeaa8ce3839c26bbd43_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#123;&#50;&#50;&#125;&#32;&#61;&#32;&#73;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"52\" style=\"vertical-align: -2px;\" \/> , inertia, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-634280bb0a52df2ae128030b52028cd5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#123;&#49;&#50;&#125;&#32;&#61;&#32;&#109;&#95;&#123;&#50;&#49;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"95\" style=\"vertical-align: -2px;\" \/> we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-5a13466454d4b8a9826e4e9758c7a7e1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#40;&#109;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#73;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#94;&#50;&#32;&#41;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"121\" style=\"vertical-align: -10px;\" \/> Now, differentiating <em>T<\/em> with respect to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-35fb2146069074a448c14c1fbf7104ba_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"10\" style=\"vertical-align: -3px;\" \/>, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b03af557c421cb067120345897826d1d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#61;&#32;&#109;&#95;&#123;&#105;&#106;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#106;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"74\" style=\"vertical-align: -13px;\" \/> and substituting into Equation (2.9), we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-5149a693c89d75f72c7e5d2c4df0bcfe_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"77\" style=\"vertical-align: -13px;\" \/> Now, we calculate total change of <em>T<\/em> using the last expression, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-06f4bc970059c0dad127b2da2b862095_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#50;&#100;&#84;&#32;&#61;&#32;&#100;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#100;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"240\" style=\"vertical-align: -14px;\" \/> But we had, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0fb54ee3702d1927b5951f2ec834eff6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#113;&#95;&#105;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"141\" style=\"vertical-align: -13px;\" \/> Therefore, subtracting these last two relations, gives, after simplification, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-490ce14a27049d21b9d18b330d241641_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#84;&#32;&#61;&#32;&#100;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#100;&#113;&#95;&#105;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"167\" style=\"vertical-align: -14px;\" \/> But we can manipulate the first term on the right-hand side as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-85177d8a84bce8a21e732afc8a863091_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#61;&#32;&#100;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#113;&#95;&#105;&#125;&#123;&#100;&#116;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#100;&#113;&#95;&#105;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"271\" style=\"vertical-align: -14px;\" \/> Substituting into the last relation for <em>dT<\/em>, we get<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> (2.10) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-780770b01eecae93d54669e6badf8e19_l3.png\" height=\"36\" width=\"177\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#100;&#84;&#32;&#61;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#100;&#113;&#95;&#105; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Now, substituting Equation (2.10) into (2.8), we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-96505c4a5668e82fd8014b1297749b71_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#100;&#113;&#95;&#105;&#32;&#43;&#32;&#100;&#86;&#32;&#61;&#32;&#48;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"203\" style=\"vertical-align: -14px;\" \/> Now, if <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9b96b9773a17f437b8a7f636626bdbf8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#86;&#40;&#113;&#95;&#105;&#41;&#44;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"68\" style=\"vertical-align: -4px;\" \/> i.e. holonomic systems, then we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ffdb451fb652f4eb6f9096852b96b6e6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#86;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#100;&#113;&#95;&#105;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"80\" style=\"vertical-align: -13px;\" \/> and, after substitution, we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-804ea904ae17d092a98a7d506ee4f4df_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#100;&#113;&#95;&#105;&#32;&#61;&#32;&#48;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"207\" style=\"vertical-align: -14px;\" \/> This expression is true for any arbitrarily selected <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-5db77a58073304c9290638a561e98a99_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#113;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"18\" style=\"vertical-align: -3px;\" \/>; therefore, the terms in the bracket should be identically null, or<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> (2.11) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68f89cc558c83efa737e9781bd3eab0d_l3.png\" height=\"36\" width=\"169\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#61;&#32;&#48; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Equation (2.11), is an alternative form of Lagrange\u2019s equation and holds when forces associated with the system are conservative, included in the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a88207529a71602cc746f6ff184128ed_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"21\" style=\"vertical-align: -13px;\" \/> term. Note that using Lagrangian, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0e823f2691402e38f3718e8d1805d9ce_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#61;&#84;&#45;&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"70\" style=\"vertical-align: 0px;\" \/> and Equation (2.11) we can recover Equation (2.7). The inclusion of non-conservative generalized forces, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6e95662858a97d8b5d9744861857cded_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#81;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"15\" style=\"vertical-align: -3px;\" \/> (usually the loading associated with each coordinate) should be added to the right-hand side of Equation (2.11). Also, energy dissipation due to viscous damping or resistance is usually given as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-465a86af1879e25da48af5922afdd512_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#61;&#68;&#40;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#94;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"68\" style=\"vertical-align: -4px;\" \/> and contributes to Lagrange equation as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-814167f9a8ed69a609009def3fd16618_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"34\" width=\"21\" style=\"vertical-align: -13px;\" \/>. Finally, we get the alternative form of Lagrange equation, as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> (2.12) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1a1af9a937cf66773f53faa6478856b2_l3.png\" height=\"36\" width=\"333\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#61;&#32;&#81;&#95;&#105;&#32;&#92;&#113;&#117;&#97;&#100;&#32;&#44;&#32;&#92;&#58;&#32;&#105;&#32;&#61;&#32;&#49;&#44;&#50;&#44;&#92;&#99;&#100;&#111;&#116;&#115;&#44;&#110; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Recall the <em>n<\/em> is the number of generalized coordinates. In matrix form, Equation (2.12) can be written as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 92px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cb0a05a1f002d39eb5fd7937526d80f8_l3.png\" height=\"92\" width=\"339\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#125;&#92;&#92;&#32;&#92;&#118;&#100;&#111;&#116;&#115;&#32;&#92;&#92;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#110;&#125;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#45;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#49;&#125;&#92;&#92;&#32;&#92;&#118;&#100;&#111;&#116;&#115;&#32;&#92;&#92;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#110;&#125;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#125;&#92;&#92;&#32;&#92;&#118;&#100;&#111;&#116;&#115;&#32;&#92;&#92;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#110;&#125;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#49;&#125;&#92;&#92;&#32;&#92;&#118;&#100;&#111;&#116;&#115;&#32;&#92;&#92;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#110;&#125;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#81;&#95;&#105;&#92;&#92;&#32;&#92;&#118;&#100;&#111;&#116;&#115;&#32;&#92;&#92;&#32;&#81;&#95;&#110;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<h1>2.9 \u00a0 \u00a0 \u00a0\u00a0 Multi-Domain Systems<\/h1>\n<p>Lagrangian method can be applied to many kinds of engineering systems, including mechanical, electrical, thermal, hydraulic, and their possible combinations as multi-domain systems. As discussed in the previous sections, the established concept of generalized coordinates, momenta, and force are key tools to model such systems.<\/p>\n<h1>2.10\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Systems with Higher Order Equations<\/h1>\n<p>System equations are mostly second-order differential equations, like Newton\u2019s second law, and Kirchohff\u2019s law for RCL circuits. Previous sections, e.g., Equation (2.7), presented Lagrange\u2019s equation for such systems. One may require, mostly in continuous systems, to build the Lagrangian function for higher-order systems, e.g., fourth-order bi-harmonic equation for fluid flows or plate displacements. Fortunately, the Lagrangian method can be easily extended to cover the higher-order systems by considering a Lagrangian function, as given by Equation (2.13)<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 15px;\"><span class=\"ql-right-eqno\"> (2.13) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1cebfb2d7528ab43f6cf055faceb555d_l3.png\" height=\"15\" width=\"133\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#76;&#61;&#76;&#40;&#113;&#95;&#105;&#44;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#44;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#44;&#32;&#92;&#100;&#111;&#116;&#115;&#44;&#32;&#116;&#41; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Using the calculus of variations and Hamilton\u2019s principle, we can derive the corresponding Lagrange\u2019s equation <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R13\"><strong>[13]<\/strong><\/a>, <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R9\"><strong>[9]<\/strong><\/a>. This s done by:<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 43px;\"><span class=\"ql-right-eqno\"> (2.14) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9edac000e1b2f9829e62b86b16dbbc23_l3.png\" height=\"43\" width=\"321\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#115;&#117;&#109;&#95;&#123;&#109;&#61;&#49;&#125;&#94;&#123;&#107;&#125;&#32;&#40;&#45;&#49;&#41;&#94;&#109;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#94;&#109;&#125;&#123;&#100;&#116;&#94;&#109;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#123;&#105;&#44;&#109;&#125;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#48;&#32;&#92;&#113;&#117;&#97;&#100;&#32;&#105;&#32;&#61;&#32;&#49;&#44;&#50;&#44;&#92;&#99;&#100;&#111;&#116;&#115;&#44;&#110; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>where <em>m<\/em> is the differentiation order; e.g., for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f612cfdbf36cf08a29776638972a51a5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#61;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"39\" style=\"vertical-align: 0px;\" \/>, we have<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 37px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6c71cf9af632531dca577b16a46b0b2f_l3.png\" height=\"37\" width=\"307\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#94;&#50;&#125;&#123;&#100;&#116;&#94;&#50;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#94;&#51;&#125;&#123;&#100;&#116;&#94;&#51;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#100;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#48; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Worked-out examples are useful to demonstrate applications of Lagrangian method. These examples, for mechanical and electrical systems, appear below. Each example includes numerical values assigned to the parameters and presents simulation results. Selected examples include accompanying screen-recorded video files demonstrating the solution steps for related system equations using 20-sim. After learning from the related video file, the reader can modify the parameters and run the simulation for specific design cases.<\/p>\n<h1>2.11\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Multi-Mass-Spring System<\/h1>\n<p>We want to find the equations governing its motion dynamics for the system sketched in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-5\">Figure 2-5<\/a>. For this example, we neglect the effect of gravity.<a id=\"F2-5\"><\/a><\/p>\n<figure id=\"attachment_115\" aria-describedby=\"caption-attachment-115\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-5\/\" rel=\"attachment wp-att-115\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-115\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-5.jpg\" alt=\"\" width=\"590\" height=\"639\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-5.jpg 590w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-5-277x300.jpg 277w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-5-65x70.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-5-225x244.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-5-350x379.jpg 350w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/a><figcaption id=\"caption-attachment-115\" class=\"wp-caption-text\">Figure 2-5 A mass-spring system with three degrees of freedom<\/figcaption><\/figure>\n<p>This system has three degrees of freedom <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-71a7043c44c0c51dd9c7486094476e43_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#120;&#95;&#49;&#44;&#120;&#95;&#50;&#44;&#120;&#95;&#51;&#32;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"66\" style=\"vertical-align: -4px;\" \/> associated with three masses <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-026caf3488068aa8344adb0e4156259b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#109;&#95;&#49;&#44;&#109;&#95;&#50;&#44;&#109;&#95;&#51;&#32;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"80\" style=\"vertical-align: -4px;\" \/>. For three masses, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9c10697ada661691f1922dde402c4094_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#78;&#61;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"40\" style=\"vertical-align: 0px;\" \/>, and each can move vertically; hence, the number of constraints is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-743315a7f6b153387b5b20dc94fb0170_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#78;&#95;&#99;&#61;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"44\" style=\"vertical-align: -2px;\" \/> for each mass. This gives <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9230f974cb18effe05f2687e3a2a770c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;&#32;&#61;&#32;&#51;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#51;&#32;&#45;&#32;&#51;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#50;&#32;&#61;&#32;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"137\" style=\"vertical-align: 0px;\" \/>. The Lagrangian method is used to find the equations of motion, or three coupled second-order differential equations. We start by writing the kinetic and potential energy expressions of the system and forming the corresponding Lagrangian. The kinetic energy of the system is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-73bf18d538c09756e00d0e095196cf37_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#40;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"182\" style=\"vertical-align: -10px;\" \/>). For the potential energy, we should use the difference in displacements associated with each spring because the neutral position of the unstressed springs do not contribute to the potential energy. For example, for the spring <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-544cabdaab2d7cb61bd0738632aa70c4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;&#95;&#53;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: -2px;\" \/>, connecting masses <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-64d6ab52bb05afac5120f9fa30e12679_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"18\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e2d51415022140c44a47a869c78afb13_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/>, we should use <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e0b5824b644c6aca559d245989bca1dd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;&#32;&#61;&#124;&#32;&#120;&#95;&#49;&#32;&#45;&#32;&#120;&#95;&#51;&#32;&#124;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"87\" style=\"vertical-align: -4px;\" \/> as the variable, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2991b4bab2b6ad7b1913cf0e607053ad_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#105;&#110;&#116;&#32;&#107;&#95;&#53;&#88;&#100;&#88;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#107;&#95;&#53;&#40;&#120;&#95;&#49;&#45;&#120;&#95;&#51;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"168\" style=\"vertical-align: -10px;\" \/>. Therefore, the potential energy of the system consisting of the sum of all springs is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-aa9cf6c1f8a3d773aa141b0beff9da96_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#40;&#107;&#95;&#49;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#107;&#95;&#50;&#120;&#95;&#50;&#94;&#50;&#32;&#43;&#32;&#107;&#95;&#51;&#120;&#95;&#51;&#94;&#50;&#41;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#107;&#95;&#52;&#40;&#120;&#95;&#50;&#32;&#45;&#32;&#120;&#95;&#51;&#41;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#107;&#95;&#53;&#40;&#120;&#95;&#49;&#32;&#45;&#32;&#120;&#95;&#51;&#41;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#107;&#95;&#54;&#40;&#120;&#95;&#49;&#32;&#45;&#32;&#120;&#95;&#50;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"494\" style=\"vertical-align: -10px;\" \/>. Note that for this system the kinetic energy is a function of only <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-63f907578d957261027276973357bb15_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: -2px;\" \/> and potential energy a function of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-31ab4907bc05181e033bfdae2b76ff3e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"12\" style=\"vertical-align: -2px;\" \/>. Applying Euler-Lagrange equation to each mass, or degree of freedom, we get a system of ODEs, written in matrix form,<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 53px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-896498777f52f1327c3b5aa42cefab7e_l3.png\" height=\"53\" width=\"524\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#109;&#95;&#49;&#32;&#38;&#32;&#48;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#109;&#95;&#50;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#48;&#32;&#38;&#32;&#109;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#92;&#92;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#107;&#95;&#49;&#32;&#43;&#32;&#107;&#95;&#53;&#32;&#43;&#32;&#107;&#95;&#54;&#32;&#38;&#32;&#45;&#107;&#95;&#54;&#32;&#38;&#32;&#45;&#107;&#95;&#53;&#92;&#92;&#32;&#45;&#107;&#95;&#54;&#32;&#38;&#32;&#107;&#95;&#50;&#32;&#43;&#32;&#107;&#95;&#52;&#32;&#43;&#32;&#107;&#95;&#54;&#32;&#38;&#32;&#45;&#107;&#95;&#52;&#92;&#92;&#32;&#45;&#107;&#95;&#53;&#32;&#38;&#32;&#45;&#107;&#95;&#52;&#32;&#38;&#32;&#107;&#95;&#51;&#32;&#43;&#32;&#107;&#95;&#52;&#32;&#43;&#32;&#107;&#95;&#53;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#120;&#95;&#50;&#92;&#92;&#32;&#120;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#48;&#92;&#92;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>For example, the Euler-Lagrange equation associated with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-64d6ab52bb05afac5120f9fa30e12679_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"18\" style=\"vertical-align: -2px;\" \/> reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a4b843bde92466a511008cdff6ab4ded_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"135\" style=\"vertical-align: -14px;\" \/>. But we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ec3feba206588cb1c357e5ff6071ffb5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"204\" style=\"vertical-align: -12px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1025b787ddf01d347abee00c1d52ee2a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#107;&#95;&#49;&#120;&#95;&#49;&#32;&#43;&#32;&#107;&#95;&#53;&#120;&#95;&#49;&#32;&#43;&#32;&#107;&#95;&#54;&#120;&#95;&#49;&#32;&#45;&#32;&#107;&#95;&#54;&#120;&#95;&#50;&#32;&#45;&#32;&#107;&#95;&#53;&#120;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"409\" style=\"vertical-align: -12px;\" \/>. Having information about initial and boundary conditions for displacements and\/or velocities, we can obtain the solution of the system\u2019s equations using 20-sim. An initial velocity of 0.2 <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0fc21671ff3f68353a852a3d5ff76ed2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#47;&#115;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"27\" style=\"vertical-align: -4px;\" \/> is applied to mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7074eddb4b441a91a587661e65d2d465_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/>, for example. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real m1 = 15.0 {kg};<br \/>\nreal m2 = 30.0 {kg};<br \/>\nreal m3 = 15.0 {kg};<br \/>\nreal k1 = 50.0 {N\/m};<br \/>\nreal k2 = 100.0 {N\/m};<br \/>\nreal k3 = 50.0 {N\/m};<br \/>\nreal k4 = 20.0 {N\/m};<br \/>\nreal k5 = 70.0 {N\/m};<br \/>\nreal k6 = 10.0 {N\/m};<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real x1 {m};<br \/>\nreal x2 {m};<br \/>\nreal x3 {m};<br \/>\nreal x1_dot {m\/s}; \/\/ velocity<br \/>\nreal x2_dot {m\/s}; \/\/ velocity<br \/>\nreal x3_dot {m\/s}; \/\/ velocity<br \/>\nreal x1_dot_dot {m\/s2}; \/\/acceleration<br \/>\nreal x2_dot_dot {m\/s2}; \/\/acceleration<br \/>\nreal x3_dot_dot {m\/s2}; \/\/acceleration<br \/>\nreal Fk1 {N}; \/\/ force spring k1<br \/>\nreal Fk2 {N}; \/\/ force spring k2<br \/>\nreal Fk3 {N}; \/\/ force spring k3<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">x1_dot_dot = -(1\/m1)*((k1+k5+k6)*x1-k6*x2-k5*x3);<br \/>\nx2_dot_dot = -(1\/m2)*((k2+k4+k6)*x2-k6*x1-k4*x3);<br \/>\nx3_dot_dot = -(1\/m3)*((k3+k4+k5)*x3-k4*x2-k5*x1);<br \/>\nx1_dot = int (x1_dot_dot , 0);<br \/>\nx2_dot = int (x2_dot_dot , 0.2); \/\/initial velocity 0.2m\/s<br \/>\nx3_dot = int (x3_dot_dot , 0);<br \/>\nx1 = int (x1_dot , 0.2); \/\/initial displacement 0.2m<br \/>\nx2 = int (x2_dot , 0);<br \/>\nx3 = int (x3_dot , -0.1); \/\/initial displacement -0.1m<br \/>\nFk1 = k1*x1;<br \/>\nFk2 = k2*x2;<br \/>\nFk3 = k3*x3;<\/p>\n<p>The results for displacements of the masses and velocities are shown below, see <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-6\">Figure 2-6<\/a>.<a id=\"F2-6\"><\/a><\/p>\n<figure id=\"attachment_116\" aria-describedby=\"caption-attachment-116\" style=\"width: 559px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-6\/\" rel=\"attachment wp-att-116\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-116\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-6.jpg\" alt=\"\" width=\"559\" height=\"253\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-6.jpg 559w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-6-300x136.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-6-65x29.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-6-225x102.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-6-350x158.jpg 350w\" sizes=\"auto, (max-width: 559px) 100vw, 559px\" \/><\/a><figcaption id=\"caption-attachment-116\" class=\"wp-caption-text\">Figure 2-6 Sample results as output from 20-sim<\/figcaption><\/figure>\n<p>Here is a video showing how to build and run the model for this example in 20-sim:<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-1\" title=\"Screenrecord_for_Example_in_section_2-11\" src=\"https:\/\/player.vimeo.com\/video\/522139459?dnt=1&amp;app_id=122963\" width=\"500\" height=\"281\" frameborder=\"0\"><\/iframe><\/p>\n<h1>2.12\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A System with Energy Dissipation and Applied External Force<\/h1>\n<p>We consider a system with two degrees of freedom, as shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-7\">Figure 2-7<\/a>. The damping coefficients <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-53a130e994ff5e0a40e6451664aeea0f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"11\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7bcd18dae372bae9a45f008f9b708a4c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: -2px;\" \/> and spring stiffness <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1ee3327ea4e4c0dc42cd172f6cab2075_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b11ba312ea3cf44559b57c22005f2b3c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: -2px;\" \/> are used to calculate the potential and damping functions <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8935e1fc41ac189c9b5516179e32f85a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: 0px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-4fcc1e5c33073ded89828bdf082a5f76_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: 0px;\" \/>, respectively. <a id=\"F2-7\"><\/a><\/p>\n<figure id=\"attachment_375\" aria-describedby=\"caption-attachment-375\" style=\"width: 1486px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-7\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-375\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7.jpg\" alt=\"\" width=\"1486\" height=\"480\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7.jpg 1486w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7-300x97.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7-1024x331.jpg 1024w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7-768x248.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7-65x21.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7-225x73.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-7-350x113.jpg 350w\" sizes=\"auto, (max-width: 1486px) 100vw, 1486px\" \/><\/a><figcaption id=\"caption-attachment-375\" class=\"wp-caption-text\">Figure 2-7 A mass-spring-damper system with two degrees of freedom<\/figcaption><\/figure>\n<p>The non-conservative Rayleigh energy dissipation function is, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-509e3bb672db081e09517ef9bc973529_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#98;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#95;&#50;&#40;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"175\" style=\"vertical-align: -10px;\" \/>. The derivative of this function with respect to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-308222d64b5d20727a87ea6d06e81f40_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;&#44;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"43\" style=\"vertical-align: -12px;\" \/> gives the damping forces associated with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-82f08d72e7eaefdfa6a368264633d187_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"17\" style=\"vertical-align: -2px;\" \/>. The kinetic energy is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-37564445405e692dc129817c575d1962_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#40;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#94;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"136\" style=\"vertical-align: -10px;\" \/>, and potential energy reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-30292856cc59df48de01187c6579ce67_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#107;&#95;&#49;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#107;&#95;&#50;&#40;&#120;&#95;&#50;&#32;&#45;&#32;&#120;&#95;&#49;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"177\" style=\"vertical-align: -10px;\" \/><\/p>\n<p>Lagrange\u2019s equation for motion of mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-64d6ab52bb05afac5120f9fa30e12679_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"18\" style=\"vertical-align: -2px;\" \/> reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ddf56dea749ef502a1872627e6449cac_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#49;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"179\" style=\"vertical-align: -14px;\" \/> and for mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7074eddb4b441a91a587661e65d2d465_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/> is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6c5dac0a138a7e093528964cf973e0a8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#50;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#125;&#32;&#61;&#32;&#70;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"199\" style=\"vertical-align: -14px;\" \/>. Performing the derivatives, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-11ca0e5b0426f23e98ee666f8340b577_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;&#125;&#32;&#61;&#32;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#44;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#125;&#32;&#61;&#32;&#109;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#44;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#40;&#107;&#95;&#49;&#32;&#43;&#32;&#107;&#95;&#50;&#41;&#120;&#95;&#49;&#32;&#45;&#32;&#107;&#95;&#50;&#120;&#95;&#50;&#44;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#50;&#125;&#32;&#61;&#32;&#107;&#95;&#50;&#120;&#95;&#50;&#32;&#45;&#32;&#107;&#95;&#50;&#120;&#95;&#49;&#44;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#125;&#32;&#61;&#32;&#40;&#98;&#95;&#49;&#32;&#43;&#32;&#98;&#95;&#50;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#32;&#45;&#32;&#98;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#44;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#125;&#32;&#61;&#32;&#98;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#45;&#32;&#98;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#46;\" title=\"Rendered by QuickLaTeX.com\" height=\"66\" width=\"478\" style=\"vertical-align: -12px;\" \/><\/p>\n<p>Using Lagrange\u2019s equation, with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0e823f2691402e38f3718e8d1805d9ce_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#61;&#84;&#45;&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"70\" style=\"vertical-align: 0px;\" \/>, we get the equations of motion of the system in matrix form as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a0e5f1438590f566bda9a75220312fcc_l3.png\" height=\"36\" width=\"473\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#109;&#95;&#49;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#109;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#98;&#95;&#49;&#32;&#43;&#32;&#98;&#95;&#50;&#32;&#38;&#32;&#45;&#98;&#95;&#50;&#92;&#92;&#32;&#45;&#98;&#95;&#50;&#32;&#38;&#32;&#98;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#107;&#95;&#49;&#32;&#43;&#32;&#107;&#95;&#50;&#32;&#38;&#32;&#45;&#107;&#95;&#50;&#92;&#92;&#32;&#45;&#107;&#95;&#50;&#32;&#38;&#32;&#107;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#32;&#120;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#48;&#92;&#92;&#32;&#70;&#40;&#116;&#41;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We use 20-sim to solve the systems equations. A step function is used for applied force. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real m1 = 2.0 {kg};<br \/>\nreal m2 = 1.0 {kg};<br \/>\nreal k1 = 20.0 {N\/m};<br \/>\nreal k2 = 30.0 {N\/m};<br \/>\nreal b1 = 0.1 {N.s\/m};<br \/>\nreal b2 = 0.05 {N.s\/m};<br \/>\nreal start_time = 3 {s};<br \/>\nreal amplitude = 5 {N};<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real x1 {m};<br \/>\nreal x2 {m};<br \/>\nreal x1_dot {m\/s};<br \/>\nreal x2_dot {m\/s};<br \/>\nreal x1_dot_dot {m\/s2};<br \/>\nreal x2_dot_dot {m\/s2};<br \/>\nreal F_applied {N}; \/\/ applied force<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">x1_dot_dot = -(b1+b2)\/m1*x1_dot+b2\/m1*x2_dot-(k1+k2)\/m1*x1+k2\/m1*x2;<br \/>\nx2_dot_dot = -(1\/m2)*(-b2*x1_dot+b2*x2_dot-k2*x1+k2*x2)+F_applied;<br \/>\nx1_dot = int (x1_dot_dot , 0);<br \/>\nx2_dot = int (x2_dot_dot , 0);<br \/>\nx1 = int (x1_dot , 0);<br \/>\nx2 = int (x2_dot , 0);<br \/>\nF_applied = amplitude*step (start_time);<\/p>\n<p>The results for displacements of the masses and applied force are shown below, see <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-8\">Figure 2-8<\/a>.<a id=\"F2-8\"><\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2532 aligncenter\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-300x158.png\" alt=\"\" width=\"719\" height=\"379\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-300x158.png 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-1024x540.png 1024w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-768x405.png 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-1536x809.png 1536w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-65x34.png 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-225x119.png 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01-350x184.png 350w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure2-8_new01.png 1763w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p style=\"text-align: center\"><em>Figure 2-8\u00a0 \u00a0Sample results as output\u00a0 from 20-sim<\/em><\/p>\n<p>Here is a video showing how to build and run the model for this example in 20-sim:<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-2\" title=\"Screenrecord_for_Example_in_section_2-12\" src=\"https:\/\/player.vimeo.com\/video\/522034704?dnt=1&amp;app_id=122963\" width=\"500\" height=\"265\" frameborder=\"0\"><\/iframe><\/p>\n<h1>2.13\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Two-Loop Electrical Circuit<\/h1>\n<p>For this example, we consider an electrical circuit with two loops\/branches. For the system, we have; electric charges <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-724f10a5168ede056379619b20b714f3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"11\" style=\"vertical-align: -3px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-88a873297078fe3647089abe5b9b0d03_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: -3px;\" \/>; resistors <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-70148bdb0c402ad94859e5b37a47f019_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#82;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"16\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-4772fecc0b7e661cc14155dec2714a7b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#82;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"17\" style=\"vertical-align: -2px;\" \/>; inductors <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a857f773dc653fea9502a79fd6126b2e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"15\" style=\"vertical-align: -2px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1ef711e382c7b6b21014b8f06d8ee547_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"16\" style=\"vertical-align: -2px;\" \/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9ccc5a6456acf2dddfa9f43851252b9b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#76;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"16\" style=\"vertical-align: -2px;\" \/>; and capacitors <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-685ad3d217d65ff75dc5fa3c8bac979f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"15\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-41f09ff4c71c612957361994e015bf0a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"16\" style=\"vertical-align: -2px;\" \/> as <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-9\">Figure 2-9<\/a> shows. The voltage source is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b397842e7d5a085b20502eb72b1c6853_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#117;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"24\" style=\"vertical-align: -4px;\" \/>, connected to loop 1. <a id=\"F2-9\"><\/a><\/p>\n<figure id=\"attachment_119\" aria-describedby=\"caption-attachment-119\" style=\"width: 875px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-9\/\" rel=\"attachment wp-att-119\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-119\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9.jpg\" alt=\"\" width=\"875\" height=\"306\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9.jpg 875w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9-300x105.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9-768x269.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9-65x23.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9-225x79.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-9-350x122.jpg 350w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/a><figcaption id=\"caption-attachment-119\" class=\"wp-caption-text\">Figure 2-9 A two-loop electrical circuit with source<\/figcaption><\/figure>\n<p>For comparison with a typical mechanical system, the equivalent of mass is an inductor; for spring, a capacitor; and for damper, a resistor. Therefore, using the Lagrangian method, we can write the kinetic energy of the system as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68a25ca0f07ec3745fb71a79bf1b2346_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#76;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#76;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#76;&#95;&#51;&#40;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"233\" style=\"vertical-align: -10px;\" \/>. Note that electric charge is analogous to mechanical displacement and electric current to velocity, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-793d9161717d7e1ec05fc1a42a86d341_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#95;&#105;&#32;&#92;&#101;&#113;&#117;&#105;&#118;&#32;&#120;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"42\" style=\"vertical-align: -3px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9d96f55975daf20da18f12ab2695c908_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#32;&#92;&#101;&#113;&#117;&#105;&#118;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"42\" style=\"vertical-align: -3px;\" \/>. Therefore, e.g., the term <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-991a24ad3a32fbff0f5cc9780e5dc9ad_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#76;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"38\" style=\"vertical-align: -10px;\" \/> represents the stored kinetic energy in the corresponding inductor. Similarly, the potential energy is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a679cd8ce0b7b93d256b3ceb8e912f2b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#67;&#95;&#49;&#125;&#113;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#67;&#95;&#50;&#125;&#32;&#113;&#95;&#50;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"32\" width=\"130\" style=\"vertical-align: -12px;\" \/>. Note that the capacitance is the inverse of stiffness, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-54bc7909799d04c606ef21dd238e4b4f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;&#95;&#105;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#107;&#95;&#105;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"32\" width=\"49\" style=\"vertical-align: -12px;\" \/>. The energy dissipation function for the system is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cfb0ae791b10c611806a55fcd099f404_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#82;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#82;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"132\" style=\"vertical-align: -10px;\" \/>. Using Langrange\u2019s equation, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-80b6988a11bff454ab3ec887f51e7730_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#61;&#32;&#70;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"256\" style=\"vertical-align: -14px;\" \/>, gives the electric circuit system equations as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 58px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a4d4a253d47d41ef7d23abbd82302136_l3.png\" height=\"58\" width=\"268\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#108;&#101;&#102;&#116;&#92;&#123;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#40;&#40;&#76;&#95;&#49;&#32;&#43;&#32;&#76;&#95;&#51;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#45;&#32;&#76;&#95;&#51;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#32;&#43;&#32;&#82;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#113;&#95;&#49;&#125;&#123;&#67;&#95;&#49;&#125;&#32;&#61;&#32;&#117;&#40;&#116;&#41;&#92;&#92; &#40;&#76;&#95;&#50;&#32;&#43;&#32;&#76;&#95;&#51;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#32;&#45;&#32;&#76;&#95;&#51;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#113;&#95;&#49;&#32;&#43;&#32;&#82;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#113;&#95;&#50;&#125;&#123;&#67;&#95;&#50;&#125;&#32;&#61;&#32;&#48; &#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>One can use rate of charge or the electric current, I as the variable by replacing <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8635a8d3bbbad94486cee48821164f2b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#73;&#61;&#32;&#92;&#100;&#111;&#116;&#32;&#113;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"34\" style=\"vertical-align: -3px;\" \/> in the system\u2019s equations. This gives <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-37584de3623c0b1679552336268dc646_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#76;&#95;&#49;&#32;&#43;&#32;&#76;&#95;&#51;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#73;&#95;&#49;&#32;&#45;&#32;&#76;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#73;&#95;&#50;&#32;&#43;&#32;&#82;&#95;&#50;&#73;&#95;&#49;&#32;&#43;&#32;&#86;&#95;&#123;&#99;&#49;&#125;&#32;&#61;&#32;&#117;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"249\" style=\"vertical-align: -4px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a16aa3f0c547314791492d09d91341c5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#76;&#95;&#50;&#32;&#43;&#32;&#76;&#95;&#51;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#73;&#95;&#50;&#32;&#45;&#32;&#76;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#73;&#95;&#49;&#32;&#43;&#32;&#82;&#95;&#50;&#73;&#95;&#50;&#32;&#43;&#32;&#86;&#95;&#123;&#99;&#50;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"232\" style=\"vertical-align: -4px;\" \/> where <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2199705f6f66496fe655c18f394e5634_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#95;&#123;&#99;&#49;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"18\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-99938f750df648037e0a3959f16ca98c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#95;&#123;&#99;&#50;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"19\" style=\"vertical-align: -2px;\" \/> are the voltage across the capacitors, respectively.<\/p>\n<p>We use 20-sim to solve the system equations. The script code is as follow<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real L1 = 0.15 {H};<br \/>\nreal L2 = 0.2 {H};<br \/>\nreal L3 = 0.25 {H};<br \/>\nreal C1 = 0.05 {F};<br \/>\nreal C2 = 0.02 {F};<br \/>\nreal R1 = 1 {ohm};<br \/>\nreal R2 = 2 {ohm};<br \/>\nreal omega = 3 {rad\/s};<br \/>\nreal amplitude = 1;<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real q1 {C};<br \/>\nreal q2 {C};<br \/>\nreal q1_dot {A};<br \/>\nreal q2_dot {A};<br \/>\nreal q1_dot_dot ;<br \/>\nreal q2_dot_dot ;<br \/>\nreal Voltage {V}; \/\/ applied voltage<\/p>\n<p>equations \/\/ equations are manipulated<\/p>\n<p style=\"padding-left: 40px\">q2_dot_dot*(L1*L2+L2*L3+L1*L3)=-L3*R1*q1_dot-(L1+L3)*R2*q2_dot-L3\/C1*q1-(L1+L3)\/C2*q2+Voltage*L3;<br \/>\nq1_dot_dot*(L3) = (L2+L3)*q2_dot_dot+R2*q2_dot+(1\/C2)*q2;<br \/>\nq1_dot = int (q1_dot_dot , 0);<br \/>\nq2_dot = int (q2_dot_dot , 0);<br \/>\nq1 = int (q1_dot , 0);<br \/>\nq2 = int (q2_dot , 0);<br \/>\nVoltage = amplitude*sin (omega*time);<\/p>\n<p>Typical plots for current in each loop is shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-10\">Figure 2-10<\/a> for a sinusoidal voltage.<a id=\"F2-10\"><\/a><\/p>\n<figure id=\"attachment_120\" aria-describedby=\"caption-attachment-120\" style=\"width: 514px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-10\/\" rel=\"attachment wp-att-120\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-120\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-10.jpg\" alt=\"\" width=\"514\" height=\"313\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-10.jpg 514w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-10-300x183.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-10-65x40.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-10-225x137.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-10-350x213.jpg 350w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/a><figcaption id=\"caption-attachment-120\" class=\"wp-caption-text\">Figure 2-10 Sample results as output from 20-sim<\/figcaption><\/figure>\n<h1>2.14\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Compound Atwood\u2019s Machine<\/h1>\n<p>Atwood\u2019s machine is a collection of pulleys and masses. This example examines and models the dynamical behavior of this machine as shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-11\">Figure 2-11<\/a>.<a id=\"F2-11\"><\/a><\/p>\n<figure id=\"attachment_2417\" aria-describedby=\"caption-attachment-2417\" style=\"width: 566px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2417\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit-261x300.png\" alt=\"\" width=\"566\" height=\"650\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit-261x300.png 261w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit-768x882.png 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit-65x75.png 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit-225x258.png 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit-350x402.png 350w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/fig-2-11_edit.png 889w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><figcaption id=\"caption-attachment-2417\" class=\"wp-caption-text\">Figure 2-11 A compound Atwood&#8217;s machine<\/figcaption><\/figure>\n<p>This system has two degrees of freedom <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9b52a709b6e958ba1516402514c76cc6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#32;&#92;&#117;&#110;&#100;&#101;&#114;&#98;&#114;&#97;&#99;&#101;&#123;&#51;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#51;&#125;&#95;&#123;&#51;&#78;&#125;&#32;&#45;&#32;&#92;&#117;&#110;&#100;&#101;&#114;&#98;&#114;&#97;&#99;&#101;&#123;&#51;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#50;&#32;&#45;&#32;&#49;&#125;&#95;&#123;&#78;&#95;&#99;&#125;&#32;&#61;&#32;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"32\" width=\"142\" style=\"vertical-align: -21px;\" \/> describing the motion of mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-64d6ab52bb05afac5120f9fa30e12679_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"18\" style=\"vertical-align: -2px;\" \/> and pulley <em>b<\/em>. Therefore, two ODEs describe the system dynamical behaviour. The massless un-stretchable string length hanging over pulley <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-37d4ce17174c7d6b245485ce01441cdd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a4b15fb2210f45fea0a5fb032fccb611_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#108;&#95;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -2px;\" \/>, and that of pulley <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-adb81a6e4b3d016ae0f0d46bea2da10c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/> is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6f6d74af46de0ea3c9e27300251c89a8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#108;&#95;&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"9\" style=\"vertical-align: -2px;\" \/>. We measure the potential energy with reference to the top of pulley <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-37d4ce17174c7d6b245485ce01441cdd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> with vertical displacement designated with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> and similarly from top of pulley <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-adb81a6e4b3d016ae0f0d46bea2da10c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/> with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b0f2d8657a6105623c9f68fde083ec57_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: -3px;\" \/>, as shown in <a href=\"#F2-11\">Figure 2-11<\/a>. The kinetic energy reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d387898d5e904d89a1e0faaf7f9ceb8b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#40;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#94;&#50;&#32;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"188\" style=\"vertical-align: -10px;\" \/>, where , using the geometrical constraints and string lengths, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-24e3e1de49283977bd7f954116f13ebd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#95;&#49;&#32;&#61;&#32;&#120;&#44;&#32;&#120;&#95;&#50;&#32;&#61;&#32;&#40;&#108;&#95;&#97;&#32;&#45;&#32;&#120;&#95;&#49;&#41;&#32;&#43;&#32;&#121;&#44;&#32;&#120;&#95;&#51;&#32;&#61;&#32;&#40;&#108;&#95;&#97;&#32;&#45;&#32;&#120;&#95;&#49;&#41;&#32;&#43;&#32;&#40;&#108;&#95;&#98;&#32;&#45;&#32;&#121;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"322\" style=\"vertical-align: -4px;\" \/>. Therefore, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-4e47a3bf48d53a03e6ccde13311adc6b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#95;&#49;&#32;&#61;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#44;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#61;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#32;&#121;&#44;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#32;&#61;&#32;&#45;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"214\" style=\"vertical-align: -3px;\" \/>. Substituting in kinetic energy relation, gives <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-216a57e4ace1327fadedc034a824a2a4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#091;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#121;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#41;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#121;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#41;&#94;&#50;&#32;&#093;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"258\" style=\"vertical-align: -10px;\" \/>. The potential energy reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a7439a2874d1bed07c1853d823a90611_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#45;&#103;&#40;&#109;&#95;&#49;&#120;&#95;&#49;&#32;&#43;&#32;&#109;&#95;&#50;&#120;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#120;&#95;&#51;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"197\" style=\"vertical-align: -4px;\" \/>. After substituting for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1ca515954ef78095dbae225aaccd7294_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#95;&#49;&#44;&#120;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"35\" style=\"vertical-align: -3px;\" \/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-4bd968b291ea91cc0d75689fe27e823b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"14\" style=\"vertical-align: -2px;\" \/> and algebraic simplifications we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2e140bcdb58cf0e8b5c78393a21ade50_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#120;&#103;&#40;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#49;&#41;&#32;&#43;&#32;&#121;&#103;&#40;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#50;&#32;&#41;&#32;&#43;&#32;&#67;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"281\" style=\"vertical-align: -4px;\" \/> , where constant <em>C<\/em> is given by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cd59bb37fc3edbcdc4b57e7e7c5b440c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;&#32;&#61;&#32;&#45;&#103;&#40;&#109;&#95;&#50;&#108;&#95;&#97;&#32;&#43;&#32;&#109;&#95;&#51;&#108;&#95;&#97;&#32;&#43;&#32;&#109;&#95;&#51;&#108;&#95;&#98;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"185\" style=\"vertical-align: -4px;\" \/>. The Langrange equations in terms of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b0f2d8657a6105623c9f68fde083ec57_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: -3px;\" \/> are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-121ad4e2dcab96414b6118126def6e64_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"125\" style=\"vertical-align: -14px;\" \/> and<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-fdb3f95ba0734c2d8a243caa943a63e6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#121;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#121;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"125\" style=\"vertical-align: -14px;\" \/>, having<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 30px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-449471c56fa7d517d84766ad62960799_l3.png\" height=\"30\" width=\"490\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#76;&#32;&#61;&#32;&#84;&#32;&#45;&#32;&#86;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#091;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#40;&#32;&#92;&#100;&#111;&#116;&#32;&#121;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#41;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#121;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#41;&#94;&#50;&#32;&#093;&#32;&#45;&#120;&#103;&#40;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#49;&#41;&#32;&#45;&#32;&#121;&#103;&#40;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#50;&#41; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We dropped <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7d5d9e8849dff9523b40f081c156ac26_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: 0px;\" \/>, since its differentiation is zero. Hence,<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3b159e7b6cd93575b08c97878476a609_l3.png\" height=\"36\" width=\"288\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#40;&#109;&#95;&#49;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#41;&#32;&#43;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#121;&#32;&#40;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#50;&#41;&#44; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c6c50cf149124d6b5ac667c915284ffe_l3.png\" height=\"36\" width=\"251\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#121;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#61;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#40;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#50;&#32;&#41;&#32;&#43;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#121;&#32;&#40;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#41;&#44; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 31px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-566acd30bd337b37ccb4f5e0b5071f79_l3.png\" height=\"31\" width=\"150\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#61;&#32;&#103;&#40;&#109;&#95;&#49;&#32;&#45;&#32;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#41; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 34px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-56ecdf0c5174f4d915f918dbcc804aa5_l3.png\" height=\"34\" width=\"143\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#116;&#101;&#120;&#116;&#123;&#97;&#110;&#100;&#125;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#121;&#125;&#32;&#61;&#32;&#103;&#40;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#41;&#46; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Substituting into the corresponding Lagrange equations, we get the system\u2019s equations of motion as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b0eedad799ac7413f10c8d940718cbe7_l3.png\" height=\"36\" width=\"360\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#108;&#101;&#102;&#116;&#92;&#123;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#120;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#40;&#109;&#95;&#49;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#41;&#32;&#43;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#121;&#40;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#51;&#50;&#41;&#32;&#61;&#32;&#103;&#40;&#109;&#95;&#49;&#32;&#45;&#32;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#41;&#92;&#92; &#92;&#100;&#100;&#111;&#116;&#32;&#120;&#40;&#109;&#95;&#51;&#32;&#45;&#32;&#109;&#95;&#50;&#41;&#32;&#43;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#121;&#40;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#41;&#32;&#61;&#32;&#103;&#40;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#41; &#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>To simplify the equations, eliminate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2acbca6f29bc95e543b430dd4d5e6ca2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#100;&#111;&#116;&#32;&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"8\" style=\"vertical-align: -3px;\" \/> by multiplying the first equation by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-19fc964417c1893b5678786e9e5c0e32_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"66\" style=\"vertical-align: -4px;\" \/> and the second one by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-afa23005c906dccc9f85601309ff0e7b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#32;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"66\" style=\"vertical-align: -4px;\" \/>. After some manipulations, we get<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-fdb5ae9b8a1a89a9c35ca1b68d32d8a6_l3.png\" height=\"36\" width=\"391\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#108;&#101;&#102;&#116;&#92;&#123;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#120;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#40;&#109;&#95;&#49;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#49;&#109;&#95;&#51;&#32;&#43;&#32;&#52;&#109;&#95;&#50;&#109;&#95;&#51;&#41;&#32;&#61;&#32;&#103;&#40;&#109;&#95;&#49;&#32;&#45;&#32;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#41;&#40;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#41;&#92;&#92; &#92;&#100;&#100;&#111;&#116;&#32;&#121;&#40;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#41;&#32;&#61;&#32;&#40;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#103;&#41;&#40;&#109;&#95;&#50;&#32;&#45;&#32;&#109;&#95;&#51;&#41; &#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We use 20-sim to solve these system equations. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real m1 = 1.0 {kg};<br \/>\nreal m2 = 2.0 {kg};<br \/>\nreal m3 = 4.0 {kg};<br \/>\nreal g = 9.81 {m\/s2};<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real x {m};<br \/>\nreal y {m};<br \/>\nreal x_dot {m\/s};<br \/>\nreal y_dot {m\/s};<br \/>\nreal x_dot_dot {m\/s2};<br \/>\nreal y_dot_dot {m\/s2};<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">\/* x_dot_dot = (1\/(m1+m2+m3))*(-y_dot_dot*(m3-m2)+g*(m1-m2-m3)); *\/<br \/>\nx_dot_dot = g*(m1-m2-m3)*(m2-m3)\/(m1*m2+m1*m3+4*m2*m3);<br \/>\ny_dot_dot = (1\/(m3+m2))*((x_dot_dot+g)*(m2-m3));<br \/>\nx_dot = int (x_dot_dot , 0);<br \/>\ny_dot = int (y_dot_dot , 0);<br \/>\nx = int (x_dot , 0);<br \/>\ny = int (y_dot , 0.1);<\/p>\n<h1>2.15\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: Atwood\u2019s Machine with Massive String and Pulley<\/h1>\n<p>In the analysis of Atwood\u2019s machine, the pulley and string are usually considered massless. In this example, we include these parts, assuming the string having mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-316149f0a5b0fc0f15243fd29cc496dd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#115;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"18\" style=\"vertical-align: -2px;\" \/>, total length <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cefa69241b7dc12fbafb892929ede37f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#108;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"4\" style=\"vertical-align: 0px;\" \/>, and linear mass density <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e3f59a12878a6453e75c8416d3e1382e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#114;&#104;&#111;&#32;&#61;&#32;&#109;&#95;&#115;&#32;&#47;&#32;&#108;&#95;&#115;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"62\" style=\"vertical-align: -4px;\" \/> and the pulley with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6fb6f0ad02b5290ee8dddb16cb9ee546_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"16\" style=\"vertical-align: 0px;\" \/>, radius <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-25cfe7b772dea23f45d0cdd4f5c10d84_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#82;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"11\" style=\"vertical-align: 0px;\" \/>, and moment of inertia <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e0d502912ebc0d1a2f2b253b1a893f60_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#73;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: 0px;\" \/> <a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/back-matter\/references#R19\"><strong>[19]<\/strong><\/a>.<a id=\"F2-12\"><\/a><\/p>\n<figure id=\"attachment_376\" aria-describedby=\"caption-attachment-376\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-12\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-376\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-12.jpg\" alt=\"\" width=\"552\" height=\"678\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-12.jpg 552w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-12-244x300.jpg 244w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-12-65x80.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-12-225x276.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-12-350x430.jpg 350w\" sizes=\"auto, (max-width: 552px) 100vw, 552px\" \/><\/a><figcaption id=\"caption-attachment-376\" class=\"wp-caption-text\">Figure 2-12 Atwood\u2019s machine<\/figcaption><\/figure>\n<p>2Datum for potential energy is a horizontal plane at the level of the pulley\u2019s centre. From the datum, the length of hanging string on the two sides of pulley is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-5f9ee0f34eeb7e0df61c2b4534bf5a8a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#45;&#32;&#92;&#112;&#105;&#32;&#82;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"30\" style=\"vertical-align: 0px;\" \/>. The potential energy is due to the masses and the string mass, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3abf16d9127819241eaa059c87071ba0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#109;&#95;&#49;&#103;&#120;&#32;&#45;&#32;&#109;&#95;&#50;&#103;&#40;&#108;&#45;&#120;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#92;&#114;&#104;&#111;&#32;&#103;&#120;&#94;&#50;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#92;&#114;&#104;&#111;&#32;&#103;&#40;&#108;&#32;&#45;&#32;&#120;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"301\" style=\"vertical-align: -10px;\" \/>. Note that <em>x<\/em> is measured downward from the datum toward mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-64d6ab52bb05afac5120f9fa30e12679_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"18\" style=\"vertical-align: -2px;\" \/>. The kinetic energy is due to the masses, string, and the pulley\u2019s angular kinetic energy, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-040951c042ae1c9d189c09e7e4df2222_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#73;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"32\" style=\"vertical-align: -10px;\" \/> with angular velocity <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-31a17d0237553a6ebd226c17142228c2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#61;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#47;&#82;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"55\" style=\"vertical-align: -4px;\" \/>. Therefore, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-aea146d13dc297db5bff50aaaf80e1b2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#40;&#109;&#95;&#49;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#43;&#32;&#109;&#95;&#115;&#32;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#73;&#32;&#40;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#47;&#82;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"239\" style=\"vertical-align: -10px;\" \/>. The Lagrangian is written as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7b2d11fe4fd7a8ec3ca3cf53ca546b45_l3.png\" height=\"36\" width=\"547\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#76;&#32;&#61;&#32;&#84;&#32;&#45;&#32;&#86;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#109;&#95;&#49;&#32;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#32;&#43;&#32;&#109;&#95;&#115;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#73;&#125;&#123;&#82;&#94;&#50;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#92;&#92;&#32;&#40;&#109;&#95;&#49;&#32;&#45;&#32;&#109;&#95;&#50;&#41;&#32;&#103;&#120;&#32;&#43;&#32;&#92;&#114;&#104;&#111;&#32;&#103;&#120;&#94;&#50;&#32;&#45;&#32;&#92;&#114;&#104;&#111;&#32;&#103;&#108;&#120;&#32;&#43;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#92;&#114;&#104;&#111;&#32;&#103;&#108;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#103;&#108;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>The Lagrange is equation reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-121ad4e2dcab96414b6118126def6e64_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#76;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"125\" style=\"vertical-align: -14px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f55d31919f8c229c8fee015de2ab4970_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#40;&#109;&#95;&#49;&#32;&#45;&#32;&#109;&#95;&#50;&#32;&#43;&#32;&#92;&#114;&#104;&#111;&#32;&#120;&#32;&#32;&#45;&#32;&#92;&#114;&#104;&#111;&#32;&#108;&#41;&#103;&#125;&#123;&#40;&#109;&#95;&#49;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#43;&#32;&#92;&#114;&#104;&#111;&#32;&#108;&#32;&#43;&#32;&#92;&#114;&#104;&#111;&#32;&#92;&#112;&#105;&#32;&#82;&#32;&#43;&#32;&#73;&#47;&#82;&#94;&#50;&#41;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"35\" width=\"222\" style=\"vertical-align: -14px;\" \/>, after substituting <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-390e8e9c75267452812222ea5b015535_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#115;&#32;&#61;&#32;&#92;&#114;&#104;&#111;&#32;&#40;&#108;&#32;&#43;&#32;&#92;&#112;&#105;&#32;&#82;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"99\" style=\"vertical-align: -4px;\" \/>. The result reduces to the familiar result of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9195b2406ce1e409bd76d409acfcbf34_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#40;&#109;&#95;&#49;&#32;&#45;&#32;&#109;&#95;&#50;&#32;&#41;&#32;&#103;&#125;&#123;&#40;&#109;&#95;&#49;&#32;&#32;&#43;&#32;&#109;&#95;&#50;&#41;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"35\" width=\"104\" style=\"vertical-align: -14px;\" \/> for massless string and pulley <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ba6950cd829feb8904a9bd9f7fddd54d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#32;&#92;&#114;&#104;&#111;&#32;&#61;&#32;&#48;&#44;&#32;&#73;&#32;&#61;&#32;&#48;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"84\" style=\"vertical-align: -4px;\" \/>.<\/p>\n<p>We use 20-sim to solve these system equations. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real Ms = 2.5 {kg}; \/\/ string mass<br \/>\nreal L = 2.0 {m}; \/\/string length<br \/>\nreal M = 3.0 {kg}; \/\/mass of the pulley<br \/>\nreal R = 30.0 {cm}; \/\/radius of the pulley<br \/>\nreal g = 9.81 {m\/s2}; \/\/ grav. acceleration<br \/>\nreal m1 = 4.0 {kg};<br \/>\nreal m2 = 1.5 {kg};<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real x {m}; \/\/vertical displacement<br \/>\nreal I {kg.m2}; \/\/ pulley moment of inertia<br \/>\nreal x_dot {m\/s}; \/\/ vertical velocity<br \/>\nreal x_dot_dot {m\/s2}; \/\/ vertical acceleration<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">I = 0.5*M*R^2;<br \/>\nx_dot_dot = g*(m1-m2+(Ms\/L)*(x-L))\/((m1+m2+(Ms\/L)*(L+ pi*R)+I\/R^2));<br \/>\nx_dot = int (x_dot_dot , 0.0);<br \/>\nx = int (x_dot , 0);<\/p>\n<h1>2.16\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Complex Vibrating Mechanical System<\/h1>\n<p>For this example, we consider a mechanical system with three degrees of freedom, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-87e427b6caa34d4ab7d5a2efa991687e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#95;&#49;&#44;&#32;&#120;&#95;&#50;&#44;&#32;&#120;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"56\" style=\"vertical-align: -3px;\" \/>, associated with three masses,<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f98d1f5e7879e3988160c0cbe1150666_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;&#44;&#32;&#109;&#95;&#50;&#44;&#32;&#109;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"70\" style=\"vertical-align: -3px;\" \/>. The arrangement of springs and dampers is shown, with their coefficients, in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-13\">Figure 2-13<\/a>, with corresponding stiffness <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-13d005982cf422eee8693ccf5c26b63c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#107;&#95;&#49;&#44;&#32;&#107;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"44\" style=\"vertical-align: -4px;\" \/> and damping <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d42500ed3644f9a60a93f320c2b2de95_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#44;&#32;&#98;&#95;&#51;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"60\" style=\"vertical-align: -4px;\" \/> coefficients. An applied force, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1e48c06bc7fb78e5fcc2590fefb2c945_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"25\" style=\"vertical-align: -4px;\" \/> acting on mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7074eddb4b441a91a587661e65d2d465_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/> and all wall contact surfaces are considered to have negligible friction.<a id=\"F2-13\"><\/a><\/p>\n<figure id=\"attachment_123\" aria-describedby=\"caption-attachment-123\" style=\"width: 855px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-13\/\" rel=\"attachment wp-att-123\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-123\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13.jpg\" alt=\"\" width=\"855\" height=\"390\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13.jpg 855w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13-300x137.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13-768x350.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13-65x30.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13-225x103.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-13-350x160.jpg 350w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/a><figcaption id=\"caption-attachment-123\" class=\"wp-caption-text\">Figure 2-13 A complex vibrating mechanical system<\/figcaption><\/figure>\n<p>The kinetic energy of the systems reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c160933aa9d32ae9687cb570b72ba3eb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#40;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#94;&#50;&#32;&#43;&#32;&#109;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#94;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"188\" style=\"vertical-align: -10px;\" \/> and the potential energy is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2b1289b1f4c5093ab6b1416d77c49396_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#107;&#95;&#49;&#32;&#120;&#95;&#49;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#107;&#95;&#50;&#32;&#40;&#120;&#95;&#50;&#32;&#45;&#32;&#120;&#95;&#51;&#32;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"177\" style=\"vertical-align: -10px;\" \/>. Similarly, the damping function reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d4a5aee09e1143704056cf915dab587b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#95;&#50;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#32;&#41;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"230\" style=\"vertical-align: -10px;\" \/>. The Lagrange\u2019s equations are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ec769a30af65531ba2b7699a020e509c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#105;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;\u0307&#95;&#105;&#125;&#32;&#61;&#32;&#70;&#95;&#105;&#32;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"273\" style=\"vertical-align: -14px;\" \/>, with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7090bfbdd4542ee08b48c509e1ab3311_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#70;&#95;&#105;&#32;&#40;&#116;&#41;&#32;&#61;&#32;&#92;&#66;&#105;&#103;&#103;&#92;&#123;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125;&#32;&#120;&#48;&#92;&#92;&#32;&#102;&#40;&#116;&#41;&#92;&#92;&#32;&#48;&#32;&#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125;&#32;&#92;&#66;&#105;&#103;&#103;&#92;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"46\" width=\"110\" style=\"vertical-align: -18px;\" \/><\/p>\n<p>because the applied force is exerted on mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7074eddb4b441a91a587661e65d2d465_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/>. Performing the differentiations, we can write the equations of the system, as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 30px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-90f254dd67d781aff19bcdfa70c581da_l3.png\" height=\"30\" width=\"505\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#109;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#32;&#41;&#32;&#43;&#32;&#107;&#95;&#49;&#32;&#120;&#95;&#49;&#32;&#43;&#32;&#98;&#95;&#50;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#41;&#32;&#61;&#32;&#48;&#44;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#109;&#95;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#41;&#32;&#43;&#32;&#92;&#92;&#32;&#107;&#95;&#50;&#32;&#40;&#120;&#95;&#50;&#32;&#45;&#32;&#120;&#95;&#51;&#32;&#41;&#32;&#43;&#32;&#98;&#95;&#49;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#43;&#32;&#98;&#95;&#50;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#32;&#41;&#32;&#61;&#32;&#102;&#40;&#116;&#41;&#36; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-234287b6e7268398caa8f384f2e9e4c5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#109;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#32;&#41;&#32;&#43;&#32;&#107;&#95;&#50;&#32;&#40;&#120;&#95;&#51;&#32;&#32;&#45;&#32;&#120;&#95;&#50;&#32;&#41;&#32;&#43;&#32;&#98;&#95;&#51;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"220\" style=\"vertical-align: -10px;\" \/>. In matrix form, the system\u2019s equations are<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 53px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0ecf40e6a2711758fa0765910d594c44_l3.png\" height=\"53\" width=\"566\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#109;&#95;&#49;&#32;&#38;&#32;&#48;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#109;&#95;&#50;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#48;&#32;&#38;&#32;&#109;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#92;&#92;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#98;&#95;&#50;&#32;&#38;&#32;&#45;&#98;&#95;&#50;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#45;&#98;&#95;&#50;&#32;&#38;&#32;&#98;&#95;&#49;&#32;&#43;&#32;&#98;&#95;&#50;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#48;&#32;&#38;&#32;&#98;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#92;&#92;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#107;&#95;&#49;&#32;&#43;&#32;&#38;&#32;&#48;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#107;&#95;&#50;&#32;&#38;&#32;&#45;&#107;&#95;&#50;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#45;&#107;&#95;&#50;&#32;&#38;&#32;&#107;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#120;&#95;&#50;&#92;&#92;&#32;&#120;&#95;&#51;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#48;&#92;&#92;&#32;&#102;&#40;&#116;&#41;&#92;&#92;&#32;&#48;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We use 20-sim to solve these system equations. The applied force is composed of three impulses applied at 5, 10, and 20 second. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real m1 = 1.0 {kg};<br \/>\nreal m2 = 3.0 {kg};<br \/>\nreal m3 = 2.0 {kg};<br \/>\nreal k1 = 50.0 {N\/m};<br \/>\nreal k2 = 30.0 {N\/m};<br \/>\nreal b1 = 0.1 {N.s\/m};<br \/>\nreal b2 = 0.2 {N.s\/m};<br \/>\nreal b3 = 0.3 {N.s\/m};<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real x1 {m};<br \/>\nreal x2 {m};<br \/>\nreal x3 {m};<br \/>\nreal x1_dot {m\/s};<br \/>\nreal x2_dot {m\/s};<br \/>\nreal x3_dot {m\/s};<br \/>\nreal x1_dot_dot {m\/s2};<br \/>\nreal x2_dot_dot {m\/s2};<br \/>\nreal x3_dot_dot {m\/s2};<br \/>\nreal F_applied1 {N};<br \/>\nreal F_applied2 {N};<br \/>\nreal F_applied3 {N};<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">x1_dot_dot = -b2\/m1*x1_dot+b2\/m1*x2_dot-k1\/m1*x1;<br \/>\nx2_dot_dot = -(1\/m2)*(-b2*x1_dot+(b1+b2)*x2_dot+k2*x2-k2*x3+F_applied1+F_applied2+F_applied3);<br \/>\nx3_dot_dot = -(1\/m3)*(b3*x3_dot-k2*x2+k2*x3);<br \/>\nx1_dot = int (x1_dot_dot , 0);<br \/>\nx2_dot = int (x2_dot_dot , 0);<br \/>\nx3_dot = int (x3_dot_dot , 0);<br \/>\nx1 = int (x1_dot , 0);<br \/>\nx2 = int (x2_dot , 0);<br \/>\nx3 = int (x3_dot , 0);<br \/>\nF_applied1 = 3*impulse (5,0.1);<br \/>\nF_applied2 = 5*impulse (20,0.2);<br \/>\nF_applied3 = -10*impulse (10,0.2);<\/p>\n<p>Sample results are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-14\">Figure 2-14<\/a>.<a id=\"F2-14\"><\/a><\/p>\n<figure id=\"attachment_124\" aria-describedby=\"caption-attachment-124\" style=\"width: 604px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-14\/\" rel=\"attachment wp-att-124\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-124\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-14.jpg\" alt=\"\" width=\"604\" height=\"285\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-14.jpg 604w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-14-300x142.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-14-65x31.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-14-225x106.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-14-350x165.jpg 350w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><figcaption id=\"caption-attachment-124\" class=\"wp-caption-text\">Figure 2-14 Sample results as output from 20-sim<\/figcaption><\/figure>\n<p>Here is a video showing how to build and run the model for this example in 20-sim:<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-3\" title=\"Screenrecord_for_Example_in_section_2-16\" src=\"https:\/\/player.vimeo.com\/video\/522036865?dnt=1&amp;app_id=122963\" width=\"500\" height=\"262\" frameborder=\"0\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<h1>2.17\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Pendulum with Moving Pivot<\/h1>\n<p>A simple pendulum with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> hanging from a free-moving pivot with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6fb6f0ad02b5290ee8dddb16cb9ee546_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"16\" style=\"vertical-align: 0px;\" \/>. The system has two degrees of freedom: oscillation of pivot, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7f179e95ae8621b5a704f5ebf8fff5c8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#32;&#61;&#32;&#120;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"52\" style=\"vertical-align: -4px;\" \/> and pendulum motion about vertical designated by angle <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-23d96612b8234ca9149e5f6dbdcf0013_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"50\" style=\"vertical-align: -4px;\" \/>. The pendulum string with length <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cefa69241b7dc12fbafb892929ede37f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#108;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"4\" style=\"vertical-align: 0px;\" \/> is massless and unstretchable. We consider the datum at the pivot level and gravitational acceleration <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-293ed23f9edb95402f7e573cb1e0167c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#103;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: -3px;\" \/> pointing downwards, as in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-15\">Figure 2-15<\/a>. <a id=\"F2-15\"><\/a><\/p>\n<figure id=\"attachment_377\" aria-describedby=\"caption-attachment-377\" style=\"width: 1220px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-15\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-377\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15.jpg\" alt=\"\" width=\"1220\" height=\"1241\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15.jpg 1220w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15-295x300.jpg 295w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15-1007x1024.jpg 1007w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15-768x781.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15-65x66.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15-225x229.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-15-350x356.jpg 350w\" sizes=\"auto, (max-width: 1220px) 100vw, 1220px\" \/><\/a><figcaption id=\"caption-attachment-377\" class=\"wp-caption-text\">Figure 2-15 Pendulum with oscillating pivot<\/figcaption><\/figure>\n<p>Mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> coordinates read <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c2ed3d297b8bc91b1c29ec5f87dc067a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#120;&#32;&#43;&#32;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#44;&#32;&#45;&#32;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"115\" style=\"vertical-align: -4px;\" \/>; hence, the velocity components are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-eb1c34208eb8afcb1be5b6f2b9ee88c3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#44;&#32;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"118\" style=\"vertical-align: -4px;\" \/>. We can write kinetic energy of the system as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 29px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-053b4889ad915ab79ccebe63018db523_l3.png\" height=\"29\" width=\"477\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#84;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#109;&#125;&#123;&#50;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#41;&#94;&#50;&#32;&#43;&#32;&#40;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#94;&#50;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#77;&#125;&#123;&#50;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#109;&#125;&#123;&#50;&#125;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#108;&#94;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#43;&#32;&#50;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#41;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#77;&#125;&#123;&#50;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Similarly, the potential energy of the systems reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-4736ae48045af514735837b796e15fb8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#109;&#103;&#121;&#32;&#61;&#32;&#45;&#109;&#103;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"141\" style=\"vertical-align: -3px;\" \/>. Note that the pivot motion is horizontal with coordinates (<em>x<\/em>, 0). The Lagrange equation for rotational motion with respect to coordinate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d32fdee09932f445d15d60edb7a9cd7f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/> reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-939c8b2b3723c4108019ebe590059e74_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"208\" style=\"vertical-align: -14px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-75ec9178311c87101c522e626b5c9a15_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#109;&#108;&#94;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#109;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#43;&#32;&#109;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#109;&#103;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"296\" style=\"vertical-align: -10px;\" \/>. After simplification, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a72073196c5ffcf61a962f0b7c495f4e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#103;&#125;&#123;&#108;&#125;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"27\" width=\"140\" style=\"vertical-align: -10px;\" \/>. Note that for fixed pivot (or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-2f5f072afe9c4b3631464ada0c4ffbb9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#32;&#61;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"90\" style=\"vertical-align: 0px;\" \/>) we get the familiar result for a simple pendulum. The Lagrange equation for translational motion with respect to coordinate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-26f6e6ad5f6b03a24ca469b63c74664a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#99;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"190\" style=\"vertical-align: -10px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f48f233810947d685f55469101742d41_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#109;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#109;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#77;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#41;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"184\" style=\"vertical-align: -10px;\" \/>. After performing differentiation, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ea60effe2f54480a21dee30ab5f3a409_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#77;&#32;&#43;&#32;&#109;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#40;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#40;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"257\" style=\"vertical-align: -4px;\" \/>. Collectively, the system\u2019s equations of motion are<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 46px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-56fec72f3f067566dc03a22f508bb6f7_l3.png\" height=\"46\" width=\"397\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#108;&#101;&#102;&#116;&#92;&#123;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#40;&#32;&#40;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#94;&#50;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#77;&#32;&#45;&#32;&#109;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#40;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#103;&#125;&#123;&#108;&#125;&#32;&#40;&#77;&#32;&#43;&#32;&#109;&#41;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#48;&#32;&#92;&#92; &#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#103;&#125;&#123;&#108;&#125;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41; &#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We use 20-sim to solve these system equations. An initial velocity of 0.5 rad\/s is applied to the pendulum. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real m = 0.5 {kg}; \/\/ pendulum\/bob mass<br \/>\nreal M = 1.0 {kg}; \/\/ pivot mass<br \/>\nreal g = 9.81 {m\/s2}; \/\/gravity<br \/>\nreal L = 30 {cm}; \/\/pendulum length<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real x {m};<br \/>\nreal x_dot {m\/s};<br \/>\nreal x_dot_dot {m\/s2};<br \/>\nreal theta {rad};<br \/>\nreal theta_dot {rad\/s};<br \/>\nreal theta_dot_dot {rad\/s2};<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">x_dot_dot = (1\/cos (theta))*((g\/L)*sin (theta)-theta_dot_dot);<br \/>\ntheta_dot_dot = (1\/(m*L*cos (theta)^2-M-m))*(m*L*sin (theta)*cos (theta)*theta_dot^2-g\/L*(m+M)*sin (theta));<br \/>\nx_dot = int (x_dot_dot , 0);<br \/>\nx = int (x_dot , 0);<br \/>\ntheta_dot = int (theta_dot_dot , 0.5);<br \/>\ntheta = int (theta_dot , 0);<\/p>\n<p>Sample results are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-16\">Figure 2-16<\/a>.<a id=\"F2-16\"><\/a><\/p>\n<figure id=\"attachment_126\" aria-describedby=\"caption-attachment-126\" style=\"width: 585px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-16\/\" rel=\"attachment wp-att-126\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-126\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-16.jpg\" alt=\"\" width=\"585\" height=\"255\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-16.jpg 585w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-16-300x131.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-16-65x28.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-16-225x98.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-16-350x153.jpg 350w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><figcaption id=\"caption-attachment-126\" class=\"wp-caption-text\">Figure 2-16 Sample results as output from 20-sim<\/figcaption><\/figure>\n<p>Here is a video showing how to build and run the model for this example in 20-sim:<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-4\" title=\"Screenrecord video\" src=\"https:\/\/player.vimeo.com\/video\/522039060?dnt=1&amp;app_id=122963\" width=\"500\" height=\"266\" frameborder=\"0\"><\/iframe><\/p>\n<h1>2.18\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Example: A Pendulum Attached to a Moving Mass-Spring-Damper System<\/h1>\n<p>In this example we consider a system consisting of a pendulum with its pivot attached to the centre of a freely moving mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6fb6f0ad02b5290ee8dddb16cb9ee546_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"16\" style=\"vertical-align: 0px;\" \/>. The mass is connected to a spring with stiffness <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8c9a2c1169d8ce6372870f6e0d2c3fab_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"8\" style=\"vertical-align: 0px;\" \/> and a damper with damping coefficient <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-adb81a6e4b3d016ae0f0d46bea2da10c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/>. The pendulum bob has a mass of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> and is attached to a torsional damper with damping coefficient <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a27bce4154b8f7d8a9afb14ed62de722_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;&#95;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -2px;\" \/> and a torsional spring with stiffness <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3fb305a46cbd2925162dfc1f4534c549_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;&#95;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: -2px;\" \/>. The pendulum string is massless and has a length of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-cefa69241b7dc12fbafb892929ede37f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#108;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"4\" style=\"vertical-align: 0px;\" \/>. We consider the datum at the pivot level and gravitational acceleration <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-293ed23f9edb95402f7e573cb1e0167c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#103;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: -3px;\" \/> pointing downwards, as in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-17\">Figure 2-17<\/a>. The system has two degrees of freedom; oscillation of pivot, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-846d20678e7176388ad2946cb8bc7b37_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#61;&#120;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"52\" style=\"vertical-align: -4px;\" \/> and pendulum motion about vertical direction designated by angle <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-23d96612b8234ca9149e5f6dbdcf0013_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"50\" style=\"vertical-align: -4px;\" \/>.<a id=\"F2-17\"><\/a><\/p>\n<figure id=\"attachment_378\" aria-describedby=\"caption-attachment-378\" style=\"width: 1061px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-17\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-378\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17.jpg\" alt=\"\" width=\"1061\" height=\"791\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17.jpg 1061w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17-300x224.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17-1024x763.jpg 1024w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17-768x573.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17-65x48.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17-225x168.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-17-350x261.jpg 350w\" sizes=\"auto, (max-width: 1061px) 100vw, 1061px\" \/><\/a><figcaption id=\"caption-attachment-378\" class=\"wp-caption-text\">Figure 2-17 A pendulum attached to a mass-spring-damper system<\/figcaption><\/figure>\n<p>The coordinates of mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> read <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-590e8df5299bbf092d24a5f9655c6fc3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#120;&#32;&#43;&#32;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#44;&#32;&#45;&#32;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"115\" style=\"vertical-align: -4px;\" \/>, and its velocity components are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7b4bb445521e726257c3e1b39c5d82c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#44;&#32;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"118\" style=\"vertical-align: -4px;\" \/>. We can write kinetic energy of the system as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 29px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-c237beb14cfebcfef8505ccf7129207a_l3.png\" height=\"29\" width=\"477\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#84;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#109;&#125;&#123;&#50;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#091;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#94;&#50;&#32;&#43;&#32;&#40;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#94;&#50;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#093;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#77;&#125;&#123;&#50;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#109;&#125;&#123;&#50;&#125;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#108;&#94;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#43;&#32;&#50;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#77;&#125;&#123;&#50;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>Similarly, the potential energy of the system reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0766b872b5fe169c006fc85ed1ef318d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#107;&#120;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#107;&#95;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#45;&#32;&#109;&#103;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"187\" style=\"vertical-align: -10px;\" \/>. The damping function of the system is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-eaf0739a4f3d876e565c3a01240d5f8b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#95;&#116;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"114\" style=\"vertical-align: -10px;\" \/>.<\/p>\n<p>The Lagrange equation for rotational motion with respect to coordinate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d32fdee09932f445d15d60edb7a9cd7f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/> reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6c831100587e4e0dfc0186313ca6a203_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"250\" style=\"vertical-align: -14px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-480b5c53ab53da81c6e87e5bc7419a5e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#109;&#108;&#94;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#109;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#43;&#32;&#109;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#8289;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#107;&#95;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#109;&#103;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#8289;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#98;&#95;&#116;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"370\" style=\"vertical-align: -10px;\" \/>. After simplification, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-65a71961effa89fc0815a85ca15b53d1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#103;&#125;&#123;&#108;&#125;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#123;&#108;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#109;&#108;&#94;&#50;&#125;&#32;&#40;&#98;&#95;&#116;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#107;&#95;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"255\" style=\"vertical-align: -10px;\" \/>. The Lagrange equation for translational motion with respect to coordinate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/> reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f549f4d342c80440a4907ece0e3039a7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#40;&#84;&#45;&#86;&#41;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#120;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#125;&#32;&#61;&#32;&#70;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"270\" style=\"vertical-align: -14px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-06f87ac4bb60ebf6b27a5ba42425b2b2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#40;&#109;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#109;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#77;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#41;&#32;&#43;&#107;&#120;&#32;&#43;&#32;&#98;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"250\" style=\"vertical-align: -10px;\" \/>. After performing differentiation, we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8fb0cf674f8b1efa1561e4bc3eff39df_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#77;&#32;&#43;&#32;&#109;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#40;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#40;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#43;&#32;&#107;&#120;&#32;&#43;&#32;&#98;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#70;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"344\" style=\"vertical-align: -4px;\" \/>. Collectively, the system\u2019s equations of motion are<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 53px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e551c134ac111d65a089db2fd1d7015b_l3.png\" height=\"53\" width=\"363\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#108;&#101;&#102;&#116;&#92;&#123;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#40;&#32;&#40;&#77;&#32;&#43;&#32;&#109;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#43;&#32;&#40;&#32;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#41;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#40;&#109;&#108;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#43;&#32;&#107;&#120;&#32;&#43;&#32;&#98;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#70;&#40;&#116;&#41;&#32;&#92;&#92; &#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#103;&#125;&#123;&#108;&#125;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#123;&#108;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#109;&#108;&#94;&#50;&#125;&#32;&#40;&#98;&#95;&#116;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#107;&#95;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#61;&#32;&#48; &#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We use 20-sim to solve these system equations. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real m = 0.5 {kg}; \/\/ pendulum\/bob mass<br \/>\nreal M = 1.0 {kg}; \/\/ pivot mass<br \/>\nreal g = 9.81 {m\/s2}; \/\/gravity<br \/>\nreal L = 30 {cm}; \/\/pendulum length<br \/>\nreal k = 2 {N\/m}; \/\/ spring stiffness<br \/>\nreal kt = 0.5 {N.m\/rad}; \/\/ torsional stiffness<br \/>\nreal bt = 0.5 {N.m.s\/rad}; \/\/ torsional damping<br \/>\nreal b = 0.2 {N.s\/m}; \/\/ damping<br \/>\nreal amplitude = 1; \/\/ amplitude of applied force<br \/>\nreal omega = 0.5 {rad\/s}; \/\/ frequency of applied force<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real x {m};<br \/>\nreal x_dot {m\/s};<br \/>\nreal x_dot_dot {m\/s2};<br \/>\nreal theta {rad};<br \/>\nreal theta_dot {rad\/s};<br \/>\nreal theta_dot_dot {rad\/s2};<br \/>\nreal F_applied {N};<br \/>\nreal F_spring {N}; \/\/ linear spring force<br \/>\nreal T_spring {N.m}; \/\/ torsional spring torque<br \/>\nreal y; \/\/ aux. variable, to help the solver<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">x = int (x_dot , 0);<br \/>\nx_dot = int (x_dot_dot , 0);<br \/>\ntheta = int (theta_dot , 0);<br \/>\ntheta_dot = int (theta_dot_dot , 0);<br \/>\ny = -m*L*cos (theta)*(theta_dot_dot);<br \/>\nx_dot_dot = (1\/(m+M))*(m*L*sin (theta)*theta_dot^2 + y -k*x-b*x_dot+F_applied);<br \/>\ntheta_dot_dot = -g\/L*sin (theta) -1\/L*cos (theta)*x_dot_dot -1\/(m*L^2)*(bt*theta_dot+kt*theta);<br \/>\nF_applied = amplitude*sin (omega*time);<br \/>\nF_spring = k*x;<br \/>\nT_spring = kt*theta;<\/p>\n<p>Cart displacement, pendulum angle, and force and torque of the springs are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-18\">Figure 2-18<\/a>.<a id=\"F2-18\"><\/a><\/p>\n<figure id=\"attachment_128\" aria-describedby=\"caption-attachment-128\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-18\/\" rel=\"attachment wp-att-128\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-128\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-18.jpg\" alt=\"\" width=\"594\" height=\"259\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-18.jpg 594w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-18-300x131.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-18-65x28.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-18-225x98.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-18-350x153.jpg 350w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/a><figcaption id=\"caption-attachment-128\" class=\"wp-caption-text\">Figure 2-18 Sample results as output from 20-sim<\/figcaption><\/figure>\n<p>Here is a video showing how to build and run the model for this example in 20-sim:<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-5\" title=\"Screenrecord_for_Example_in_section_2-18\" src=\"https:\/\/player.vimeo.com\/video\/522039228?dnt=1&amp;app_id=122963\" width=\"500\" height=\"262\" frameborder=\"0\"><\/iframe><\/p>\n<h1>2.19 \u00a0 \u00a0\u00a0\u00a0 Example: A Mass Particle Sliding on a Rotating Circular Ring<\/h1>\n<p><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-19\">Figure 2-19<\/a> shows a particle with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> sliding on a circular ring with radius <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-25cfe7b772dea23f45d0cdd4f5c10d84_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#82;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"11\" style=\"vertical-align: 0px;\" \/>. The ring itself is rotating about the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-76765387c47fa33c6f422bef1fa0925c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"7\" style=\"vertical-align: 0px;\" \/>-axis with a constant angular velocity <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-620d60990ffe618ecaddba227ff3f189_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#111;&#109;&#101;&#103;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"9\" style=\"vertical-align: 0px;\" \/>. We want to find the equation of motion for the mass particle.<\/p>\n<figure id=\"attachment_379\" aria-describedby=\"caption-attachment-379\" style=\"width: 1332px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/figure-2-19\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-379\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19.jpg\" alt=\"\" width=\"1332\" height=\"1321\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19.jpg 1332w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19-300x298.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19-1024x1016.jpg 1024w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19-150x150.jpg 150w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19-768x762.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19-65x64.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19-225x223.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Figure-2-19-350x347.jpg 350w\" sizes=\"auto, (max-width: 1332px) 100vw, 1332px\" \/><\/a><figcaption id=\"caption-attachment-379\" class=\"wp-caption-text\">Figure 2-19 A particle moving on a circular ring<\/figcaption><\/figure>\n<p>The generalized coordinate is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-23d96612b8234ca9149e5f6dbdcf0013_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"50\" style=\"vertical-align: -4px;\" \/>, the polar angle. We can write the coordinates of the mass particle as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8bf45e00431e4e6869681531dd7f28a8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#32;&#61;&#32;&#82;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#8289;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"98\" style=\"vertical-align: 0px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f3457d444ed94c2701af0de8c811cb9d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;&#32;&#61;&#32;&#82;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"96\" style=\"vertical-align: -3px;\" \/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b1c95f18e29057d18fa608388f16d0a3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#32;&#61;&#32;&#82;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#8289;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"64\" style=\"vertical-align: 0px;\" \/>. Therefore, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-dab76c47d3554eedf4b528b5bc7e7f64_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#120;&#32;&#61;&#32;&#82;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#116;&#32;&#45;&#32;&#82;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"203\" style=\"vertical-align: 0px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0b8eef2f707f85b3a1ade3aaa2545a67_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#121;&#32;&#61;&#32;&#82;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#116;&#32;&#43;&#32;&#82;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"202\" style=\"vertical-align: -3px;\" \/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7b9f432fb2102b76f94c1a8e7fd16416_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#122;&#32;&#61;&#32;&#45;&#82;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"81\" style=\"vertical-align: 0px;\" \/>. Therefore, the kinetic energy reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d3e3f9578efa43e29c4348a98ef544e1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#109;&#125;&#123;&#50;&#125;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#120;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#32;&#121;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#32;&#122;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"27\" width=\"129\" style=\"vertical-align: -10px;\" \/>) and after substitution of velocities and simplifications we get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8986ad5c816cc082642111965d9f7297_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#109;&#82;&#94;&#50;&#125;&#123;&#50;&#125;&#32;&#40;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#94;&#50;&#32;&#43;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#94;&#50;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#94;&#50;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#8289;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"153\" style=\"vertical-align: -10px;\" \/>. Similarly, the potential energy of the mass particle reads <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-424ae5368c058d378df1589c19ef2ca2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#109;&#103;&#122;&#32;&#61;&#32;&#109;&#103;&#82;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"136\" style=\"vertical-align: -3px;\" \/>. Note that the kinetic energy of the particle consists of those resulted from angular velocity <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-67d01e007d67ce9e47c9fbce5b0ed87c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#82;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"18\" style=\"vertical-align: 0px;\" \/>, defined in spherical coordinates in the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-acbeb39715acabef0d60a97f0f35b9ac_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#82;&#45;&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"36\" style=\"vertical-align: 0px;\" \/> plane due to sliding of the mass on the circular ring, and the rotational velocity <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0a34f6ab6004c9704e8e81bbb1f914e7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#82;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#32;&#92;&#111;&#109;&#101;&#103;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"56\" style=\"vertical-align: -4px;\" \/>, defined in a <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-543718d4a40f6f9e0f6f4b07dc59f25d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;&#32;&#61;&#32;&#99;&#111;&#110;&#115;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"61\" style=\"vertical-align: 0px;\" \/> plane parallel to the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-56366beb0e73c5b86faa42402682f176_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#45;&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"34\" style=\"vertical-align: -3px;\" \/> plane at any given time during the motion.<\/p>\n<p>Now we can write the Lagrange\u2019s equations, using Equation (2.12), with the assumption that no friction and non-conservative forces exist, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1caeddb79929f888c33594750c86fb5f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#61;&#81;&#61;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"70\" style=\"vertical-align: -3px;\" \/>. Hence <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-0ec73001babf3d22dfb9137223978ddb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"168\" style=\"vertical-align: -14px;\" \/>. But <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-531f4698c1f1fb3c38208938b8e01c72_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#109;&#82;&#94;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"77\" style=\"vertical-align: -12px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-80439a53a50f6d1a261d82fe66f1ca69_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#109;&#82;&#94;&#50;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#94;&#50;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#50;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"128\" style=\"vertical-align: -10px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-39c062e894f4c94a23d684237f165dfd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#45;&#109;&#103;&#82;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"108\" style=\"vertical-align: -10px;\" \/>. After substitution and rearranging the terms, we get the equation of motion for the mass particle as<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 30px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-4b2ffe399ece256c6255e65dfe723518_l3.png\" height=\"30\" width=\"158\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#82;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#82;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#94;&#50;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#50;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#103;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We use 20-sim to solve these system equations. An initial angular velocity of 0.2 rad\/s is applied to the mass. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real g = 9.81 {m\/s2}; \/\/grav. acc.<br \/>\nreal R = 40 {cm}; \/\/ring radius<br \/>\nreal omega = 0.8 {rad\/s}; \/\/ ring angular velocity<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real theta {rad};<br \/>\nreal theta_dot {rad\/s};<br \/>\nreal theta_dot_dot {rad\/s2};<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">theta_dot_dot= ((1\/2)*omega^2*sin (2*theta)+g*sin (theta)\/R);<br \/>\ntheta_dot = int (theta_dot_dot , 0.0);<br \/>\ntheta = int (theta_dot , 0.2);<\/p>\n<p>The angular displacement, velocity and acceleration are shown in <a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-20\">Figure 2-20<\/a>.<a id=\"F2-20\"><\/a><\/p>\n<figure id=\"attachment_130\" aria-describedby=\"caption-attachment-130\" style=\"width: 527px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-20\/\" rel=\"attachment wp-att-130\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-130\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-20.jpg\" alt=\"\" width=\"527\" height=\"238\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-20.jpg 527w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-20-300x135.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-20-65x29.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-20-225x102.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-20-350x158.jpg 350w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/a><figcaption id=\"caption-attachment-130\" class=\"wp-caption-text\">Figure 2-20 Sample results as output from 20-sim<\/figcaption><\/figure>\n<p>Here is a video showing how to build and run the model for this example in 20-sim:<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-6\" title=\"Screenrecord_for_Example_in_section_2-19\" src=\"https:\/\/player.vimeo.com\/video\/522039400?dnt=1&amp;app_id=122963\" width=\"500\" height=\"266\" frameborder=\"0\"><\/iframe><\/p>\n<h1>2.20 \u00a0 \u00a0\u00a0\u00a0 Example: An Extensible Robotic Arm Rotating in a Plane<\/h1>\n<p><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics#F2-21\">Figure 2-21<\/a> shows a load with mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/> is carried by a robotic arm in the <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-56366beb0e73c5b86faa42402682f176_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;&#45;&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"34\" style=\"vertical-align: -3px;\" \/> plane. The length <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6551f454009728d826313ace74155527_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"7\" style=\"vertical-align: 0px;\" \/> of the arm and its angle <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d32fdee09932f445d15d60edb7a9cd7f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/> with respect to <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68d3165f12fed5d05e11de45dbfe5bec_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"8\" style=\"vertical-align: 0px;\" \/>-axis are functions of time <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6f48dff35a0de8fcf61ebac8b092b729_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"5\" style=\"vertical-align: 0px;\" \/>, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a298cceb5cb055c86547c240d0fdc26_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#114;&#61;&#114;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"49\" style=\"vertical-align: -4px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-23d96612b8234ca9149e5f6dbdcf0013_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"50\" style=\"vertical-align: -4px;\" \/>. The damping coefficients for radial and tangential motions are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9b751381284d3711e0455729ae83cf24_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;&#95;&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"11\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a27bce4154b8f7d8a9afb14ed62de722_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;&#95;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -2px;\" \/>, respectively.<\/p>\n<figure id=\"attachment_131\" aria-describedby=\"caption-attachment-131\" style=\"width: 548px\" class=\"wp-caption aligncenter\"><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/figure-2-21\/\" rel=\"attachment wp-att-131\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-131\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-21.jpg\" alt=\"\" width=\"548\" height=\"628\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-21.jpg 548w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-21-262x300.jpg 262w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-21-65x74.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-21-225x258.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/02\/Figure-2-21-350x401.jpg 350w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/a><figcaption id=\"caption-attachment-131\" class=\"wp-caption-text\">Figure 2-21 An extensible robotic arm carrying a load<\/figcaption><\/figure>\n<p>The generalized coordinates (or degrees of freedom) are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e653b83d2e6cbcef199c14cabd2e7623_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#61;&#40;&#114;&#44;&#92;&#116;&#104;&#101;&#116;&#97;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"57\" style=\"vertical-align: -4px;\" \/>, and corresponding velocities are <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-3112610be5572c949621d79c31bbb979_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#113;&#61;&#40;&#92;&#100;&#111;&#116;&#32;&#114;&#44;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"58\" style=\"vertical-align: -4px;\" \/>, for mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/>. We can write the kinetic energy as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-9a882c90991c607d50ba096fcb2727dd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#109;&#32;&#92;&#100;&#111;&#116;&#32;&#114;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#109;&#32;&#40;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#41;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"139\" style=\"vertical-align: -10px;\" \/>, due to radial and tangential velocities, respectively. The potential energy, with reference to the support, is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-19f0c3a316690224c670dd01a9f0104d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#32;&#61;&#32;&#109;&#103;&#114;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"83\" style=\"vertical-align: -3px;\" \/>. The damping function is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-07855fe7d4a3605f43efff733ae64324_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#32;&#61;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#95;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#114;&#94;&#50;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#98;&#95;&#116;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"120\" style=\"vertical-align: -10px;\" \/>. The conservative gravity force due to the load mass is accounted for through the potential function <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-8935e1fc41ac189c9b5516179e32f85a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"12\" style=\"vertical-align: 0px;\" \/>. The force <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-45d2bbafd2751f0a2f4054f3b0269e48_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"8\" style=\"vertical-align: -3px;\" \/> and torque <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-861abf93ba576302abb01685e84d6ceb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#84;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: -1px;\" \/> exerted by the robot-arm motor to move the mass are components of generalized force vector, or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-73b57e32418be20015b498e917600076_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#81;&#95;&#105;&#32;&#61;&#32;&#40;&#81;&#95;&#114;&#44;&#81;&#95;&#123;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#41;&#32;&#61;&#32;&#40;&#102;&#44;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#84;&#125;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"145\" style=\"vertical-align: -4px;\" \/>. Now, we have <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-60e9bb769b0d32cab1eaf6dd74d3c83d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#114;&#125;&#32;&#61;&#32;&#109;&#32;&#92;&#100;&#111;&#116;&#32;&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"60\" style=\"vertical-align: -10px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e3297e99dea4a893b1d15200d200d62a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#109;&#114;&#94;&#50;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"73\" style=\"vertical-align: -12px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1cecc38cb3a18ff1f4bd2658b8f8a804_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#114;&#125;&#32;&#61;&#32;&#109;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"73\" style=\"vertical-align: -10px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6a8234e0450208e6cc783b651ee4341d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"47\" style=\"vertical-align: -10px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f347369356162e5fcd492c6886a2a6cb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#114;&#125;&#32;&#61;&#32;&#98;&#95;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"61\" style=\"vertical-align: -10px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e8e924d168a874bb1a0ed79b42c32776_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#61;&#32;&#98;&#95;&#116;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"60\" style=\"vertical-align: -12px;\" \/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f93f56cd0123446f1ad2d3622a1d96bd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#114;&#125;&#32;&#61;&#32;&#109;&#103;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"86\" style=\"vertical-align: -10px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-f87d283bed79d718d518c71c8acaf9dc_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#125;&#32;&#45;&#32;&#109;&#103;&#114;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"31\" width=\"93\" style=\"vertical-align: -10px;\" \/>. Using Equation (2.12), we can write the equations of the motion for the mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08297f9d61e9c01c09eafffb66d4cf14_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;\" title=\"Rendered by QuickLaTeX.com\" height=\"7\" width=\"13\" style=\"vertical-align: 0px;\" \/>, as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-30eb90253134facfd1a5121fd4f153d6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#114;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#45;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#84;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#68;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#92;&#100;&#111;&#116;&#32;&#113;&#95;&#105;&#125;&#32;&#43;&#32;&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#86;&#125;&#123;&#92;&#112;&#97;&#114;&#116;&#105;&#97;&#108;&#32;&#113;&#95;&#105;&#125;&#32;&#61;&#32;&#81;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"36\" width=\"218\" style=\"vertical-align: -14px;\" \/><\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 37px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-ff2bde6bfc1b4e087a6b83e235b9b4d9_l3.png\" height=\"37\" width=\"249\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#108;&#101;&#102;&#116;&#92;&#123;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#40;&#32;&#109;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#114;&#32;&#45;&#32;&#109;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#94;&#50;&#32;&#43;&#32;&#98;&#95;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#114;&#32;&#43;&#32;&#109;&#103;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#115;&#105;&#110;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#102;&#32;&#92;&#92; &#109;&#114;&#94;&#50;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#50;&#109;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#114;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#98;&#95;&#116;&#32;&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#43;&#32;&#109;&#103;&#114;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#115;&#125;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#32;&#61;&#32;&#92;&#109;&#97;&#116;&#104;&#99;&#97;&#108;&#123;&#84;&#125; &#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p>We use 20-sim to solve the system equations. The script code is as follows:<\/p>\n<p>parameters<\/p>\n<p style=\"padding-left: 40px\">real m = 0.5 {kg}; \/\/ load mass<br \/>\nreal g = 9.81 {m\/s2}; \/\/grav. acc.<br \/>\nreal bt = 0.5 {N.m.s\/rad}; \/\/ tangential damping<br \/>\nreal br = 0.2 {N.s\/m}; \/\/ radial damping<\/p>\n<p>variables<\/p>\n<p style=\"padding-left: 40px\">real arm {m};<br \/>\nreal arm_dot {m\/s};<br \/>\nreal arm_dot_dot {m\/s2};<br \/>\nreal theta {rad};<br \/>\nreal theta_dot {rad\/s};<br \/>\nreal theta_dot_dot {rad\/s2};<br \/>\nreal F {N}; \/\/applied force<br \/>\nreal T {N.m}; \/\/ applied torque<\/p>\n<p>equations<\/p>\n<p style=\"padding-left: 40px\">arm_dot_dot = (arm*theta_dot^2-g*sin (theta)-br*arm_dot\/m+F\/m);<br \/>\ntheta_dot_dot = (1\/(m*arm^2))*(-2*m*arm*arm_dot*theta_dot-m*g*arm*cos (theta)-bt*theta_dot+T);<br \/>\narm_dot = int (arm_dot_dot , 0);<br \/>\narm = int (arm_dot , 0.2);<br \/>\ntheta_dot = int (theta_dot_dot , 0);<br \/>\ntheta = int (theta_dot , 0);<br \/>\nF = sin (0.2*time);<br \/>\nT = 0.2;<\/p>\n<h1>Exercise Problems for Chapter 2<\/h1>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercises<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<ol>\n<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.13. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\n<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.14. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\n<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.15. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\n<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.18. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\n<li style=\"text-align: left\">Derive Lagrange equation for the system given in example 2.20. Using the Equation Model tool in 20-sim, build a model for this example. Using the numerical data for the parameters, run simulation and analyze the results.<\/li>\n<li style=\"text-align: left\">Using Lagrangian method, derive the system equations for the double pendulum system shown below. Solve the resulting system of ODE\u2019s and draw the angular displacements and velocities <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-974f1cbb841ed1a53b54391a6ffdb4a8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"11\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-a80e534c484021e480eaf936d0102023_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;&#95;&#105;&#44;&#32;&#105;&#32;&#61;&#32;&#49;&#44;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"63\" style=\"vertical-align: -3px;\" \/>) of mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-64d6ab52bb05afac5120f9fa30e12679_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"18\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7074eddb4b441a91a587661e65d2d465_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/> for an initial condition of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-7074eddb4b441a91a587661e65d2d465_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/> at <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68cf39cff0708c06b572bc924586f636_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#105;&#125;&#123;&#49;&#50;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"27\" width=\"15\" style=\"vertical-align: -10px;\" \/>. Also draw the phase diagram (i.e., <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-08e49165bba385fd8b97751ae07c810a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#100;&#111;&#116;&#32;&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"7\" style=\"vertical-align: 0px;\" \/> vs. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-d32fdee09932f445d15d60edb7a9cd7f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#116;&#104;&#101;&#116;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/>) for each mass. Assume that the strings are massless and inextensible.<\/li>\n<\/ol>\n<p><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/exercise-2-5\/\" rel=\"attachment wp-att-383\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-383\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-5.jpg\" alt=\"\" width=\"433\" height=\"444\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-5.jpg 433w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-5-293x300.jpg 293w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-5-65x67.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-5-225x231.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-5-350x359.jpg 350w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/a><\/p>\n<ol start=\"6\">\n<li style=\"text-align: left\">For the mechanical system given, e.g., an elevator with a mass-spring-damper subsystem, verify the system equations, using Lagrangian method and solve them with 20-sim. The container could be an elevator, e.g., with a mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-6fb6f0ad02b5290ee8dddb16cb9ee546_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#77;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"16\" style=\"vertical-align: 0px;\" \/> and is supported by a spring <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-00ce52ad0b3b51690ea57f9926d3c10e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: -2px;\" \/> and moving vertically, guided by frictionless rollers under load <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1e48c06bc7fb78e5fcc2590fefb2c945_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"25\" style=\"vertical-align: -4px;\" \/>. The subsystem is composed of a mass <em>m<\/em>, two springs <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-1ee3327ea4e4c0dc42cd172f6cab2075_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: -2px;\" \/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-b11ba312ea3cf44559b57c22005f2b3c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#107;&#95;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: -2px;\" \/>, and a damper <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-adb81a6e4b3d016ae0f0d46bea2da10c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"10\" width=\"7\" style=\"vertical-align: 0px;\" \/>, as shown in the figure below. The gravitational acceleration vector is directed downward, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-4ea8a2ab1b1fbef99ba78996d54013be_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#118;&#123;&#103;&#125;&#32;&#61;&#32;&#40;&#103;&#44;&#48;&#44;&#48;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"76\" style=\"vertical-align: -4px;\" \/>.<\/li>\n<\/ol>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-34e27f524ec9cae3aacf1658e6d54e64_l3.png\" height=\"36\" width=\"536\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#77;&#32;&#38;&#32;&#48;&#92;&#92;&#32;&#48;&#32;&#38;&#32;&#109;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#92;&#100;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43;&#32;&#98;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#49;&#32;&#38;&#32;&#45;&#49;&#92;&#92;&#32;&#45;&#49;&#32;&#38;&#32;&#49;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#49;&#92;&#92;&#32;&#92;&#100;&#111;&#116;&#32;&#120;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#43;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#107;&#95;&#49;&#32;&#43;&#32;&#107;&#95;&#50;&#32;&#43;&#32;&#107;&#95;&#51;&#32;&#38;&#32;&#45;&#107;&#95;&#49;&#32;&#45;&#107;&#95;&#50;&#32;&#92;&#92;&#32;&#45;&#107;&#95;&#49;&#32;&#45;&#107;&#95;&#50;&#32;&#38;&#32;&#107;&#95;&#49;&#32;&#43;&#32;&#107;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#120;&#95;&#49;&#32;&#92;&#92;&#32;&#120;&#95;&#50;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#32;&#102;&#40;&#116;&#41;&#32;&#45;&#32;&#77;&#103;&#92;&#92;&#32;&#45;&#109;&#103;&#32;&#92;&#101;&#110;&#100;&#123;&#66;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p><a href=\"\/engineeringsystems\/chapter\/lagrangian-mechanics\/exercise-2-6\/\" rel=\"attachment wp-att-384\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-384\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6.jpg\" alt=\"\" width=\"558\" height=\"555\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6.jpg 558w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6-300x298.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6-150x150.jpg 150w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6-65x65.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6-225x224.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-6-350x348.jpg 350w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/a><\/p>\n<ol start=\"7\">\n<li style=\"text-align: left\">Repeat the sliding mass on a rotating circular ring example given in section 2.19 assuming <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-68a73eb16c2a3ae6e813dc49666fe638_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#61;&#32;&#92;&#111;&#109;&#101;&#103;&#97;&#32;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"55\" style=\"vertical-align: -4px;\" \/>. Modify the model provided for this example accordingly and run the simulation.<\/li>\n<li style=\"text-align: left\">Repeat the example given in section 2.16 after adding a mechanical spring <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-aef276dfe0b2b0754420250c310948c4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#107;&#95;&#51;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"24\" style=\"vertical-align: -4px;\" \/> between mass <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/ql-cache\/quicklatex.com-e2d51415022140c44a47a869c78afb13_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#95;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"19\" style=\"vertical-align: -2px;\" \/> and the wall. Modify the model provided for this example accordingly and run the simulation.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/exercise-2-8\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-385\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8.jpg\" alt=\"\" width=\"795\" height=\"415\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8.jpg 795w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8-300x157.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8-768x401.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8-65x34.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8-225x117.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-8-350x183.jpg 350w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/a><\/p>\n<ol start=\"9\">\n<li style=\"text-align: left\">Repeat the example given in section 2.17 after replacing the pendulum with a double pendulum. Modify the model provided for this example accordingly and run the simulation.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/exercise-2-9\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-380\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-9.jpg\" alt=\"\" width=\"691\" height=\"669\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-9.jpg 691w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-9-300x290.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-9-65x63.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-9-225x218.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-9-350x339.jpg 350w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/a><\/p>\n<ol start=\"10\">\n<li style=\"text-align: left\">Derive the system equations for the electrical circuit shown in the below sketch. Use Lagrangian method and solve the resulting system of ODEs with 20-sim.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/exercise-2-10\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-381 size-full aligncenter\" src=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10.jpg\" alt=\"\" width=\"1383\" height=\"510\" srcset=\"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10.jpg 1383w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10-300x111.jpg 300w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10-1024x378.jpg 1024w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10-768x283.jpg 768w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10-65x24.jpg 65w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10-225x83.jpg 225w, https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-content\/uploads\/sites\/1041\/2021\/04\/Exercise-2-10-350x129.jpg 350w\" sizes=\"auto, (max-width: 1383px) 100vw, 1383px\" \/><\/a><\/p>\n<\/div>\n<\/div>\n<div class=\"media-attributions clear\" prefix:cc=\"http:\/\/creativecommons.org\/ns#\" prefix:dc=\"http:\/\/purl.org\/dc\/terms\/\"><h2>Media Attributions<\/h2><ul><li about=\"https:\/\/wellcomecollection.org\/works\/gt4atf94\"><a rel=\"cc:attributionURL\" href=\"https:\/\/wellcomecollection.org\/works\/gt4atf94\" property=\"dc:title\">Joseph Louis Lagrange<\/a>  &copy;  <a rel=\"dc:creator\" href=\"https:\/\/wellcomecollection.org\/works?query=%22Belliard%2C+Z%C3%A9phirin%2C+1798-1861.%22\" property=\"cc:attributionName\">Zephirin Belliard<\/a>    is licensed under a  <a rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY (Attribution)<\/a> license<\/li><li about=\"https:\/\/commons.wikimedia.org\/wiki\/File:William_Rowan_Hamilton_portrait_oval.png\"><a rel=\"cc:attributionURL\" href=\"https:\/\/commons.wikimedia.org\/wiki\/File:William_Rowan_Hamilton_portrait_oval.png\" property=\"dc:title\">William Rowan Hamilton<\/a>    adapted by  <a rel=\"dc:source\" href=\"https:\/\/commons.wikimedia.org\/wiki\/User:Quibik\">Quikbik<\/a>  is licensed under a  <a rel=\"license\" href=\"https:\/\/creativecommons.org\/publicdomain\/mark\/1.0\/\">Public Domain<\/a> license<\/li><li about=\"https:\/\/commons.wikimedia.org\/wiki\/File:Jean_Le_Rond_d%27Alembert,_by_French_school.jpg\"><a rel=\"cc:attributionURL\" href=\"https:\/\/commons.wikimedia.org\/wiki\/File:Jean_Le_Rond_d%27Alembert,_by_French_school.jpg\" property=\"dc:title\">Jean le Rond d&#8217;Alembert<\/a>      is licensed under a  <a rel=\"license\" href=\"https:\/\/creativecommons.org\/publicdomain\/mark\/1.0\/\">Public Domain<\/a> license<\/li><li >Figure2-8_new01       <\/li><li >fig 2-11_edit       <\/li><\/ul><\/div>","protected":false},"author":801,"menu_order":2,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-58","chapter","type-chapter","status-publish","hentry"],"part":3,"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/pressbooks\/v2\/chapters\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/wp\/v2\/users\/801"}],"version-history":[{"count":26,"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/pressbooks\/v2\/chapters\/58\/revisions"}],"predecessor-version":[{"id":2394,"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/pressbooks\/v2\/chapters\/58\/revisions\/2394"}],"part":[{"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/pressbooks\/v2\/chapters\/58\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/pressbooks\/v2\/chapter-type?post=58"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/wp\/v2\/contributor?post=58"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/engineeringsystems\/wp-json\/wp\/v2\/license?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}