Equations of motion for the n-body problemI tried to solve this problem but I can't.please help meHow to...

Did CPM support custom hardware using device drivers?

Bash: What does "masking return values" mean?

What has been your most complicated TikZ drawing?

Replacing Windows 7 security updates with anti-virus?

Science-fiction short story where space navy wanted hospital ships and settlers had guns mounted everywhere

Have researchers managed to "reverse time"? If so, what does that mean for physics?

How could a scammer know the apps on my phone / iTunes account?

Who is our nearest planetary neighbor, on average?

Distribution of Maximum Likelihood Estimator

Is it possible to upcast ritual spells?

Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?

Will a pinhole camera work with instant film?

Dot in front of file

Co-worker team leader wants to inject his friend's awful software into our development. What should I say to our common boss?

Can hydraulic brake levers get hot when brakes overheat?

What options are left, if Britain cannot decide?

Identifying the interval from A♭ to D♯

Why are there 40 737 Max planes in flight when they have been grounded as not airworthy?

When do we add an hyphen (-) to a complex adjective word?

Humanity loses the vast majority of its technology, information, and population in the year 2122. How long does it take to rebuild itself?

What are the possible solutions of the given equation?

What is the greatest age difference between a married couple in Tanach?

Employee lack of ownership

Professor being mistaken for a grad student



Equations of motion for the n-body problem


I tried to solve this problem but I can't.please help meHow to solve the differential equation for the motion equation of a body in a gravitational field from one fixed sourceCalculating a double pendulumEquation of motion - curve - particleWhen is the Lagrangian a constant of motion?What is a constant of motion, given $ddot x=frac12 sin (2x) $?Why is generalised force $Q_j = frac{partial L}{partial q_j}$ when kinetic energy is independent of position?Planetary orbits in a $4$-dimensional universeDeriving rigid body motion from Euler-Lagrange equationsIs the the derivation of the following motion equation correct?













4












$begingroup$


The Lagrange function is defined as $mathcal{L}(q,dot{q}) = T(q,dot{q}) - V(q,dot{q})$ where $T$ defines the kinetic energy and $V$ the potential energy.



The equations of motion are given by
$frac{partial mathcal{L}}{partial q_i} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q_i}} = 0$.



In the $n$-body problem we have $n$ planets with masses $m_1, dots, m_n in mathbb{R}_+$. The kinetic and potential energy is given by



$T = sum_i frac{1}{2} m_i Vert dot{q_i} Vert_2^2$ and $V = G cdot sum_{i<j} frac{m_i m_j}{Vert q_i - q_j Vert_2}$ where $G$ denotes a gravitational constant. Furthermore, $q_i(t) in mathbb{R}^3$ decribes the position of the $i$-th planet at time $t$.



Now I need to calculate the equations of motions.



But now I do not understand how to deal with $frac{partial mathcal{L}}{partial q_i}$. The first thing which confuses me is that $q_i$ is a three-dimensional vector. The second thing would be the derivative of the norm because in calculus we have learned that the norm is not differentiable.



Could anyone explain this problem to me? Any help is really appreciated.










share|cite|improve this question











$endgroup$

















    4












    $begingroup$


    The Lagrange function is defined as $mathcal{L}(q,dot{q}) = T(q,dot{q}) - V(q,dot{q})$ where $T$ defines the kinetic energy and $V$ the potential energy.



    The equations of motion are given by
    $frac{partial mathcal{L}}{partial q_i} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q_i}} = 0$.



    In the $n$-body problem we have $n$ planets with masses $m_1, dots, m_n in mathbb{R}_+$. The kinetic and potential energy is given by



    $T = sum_i frac{1}{2} m_i Vert dot{q_i} Vert_2^2$ and $V = G cdot sum_{i<j} frac{m_i m_j}{Vert q_i - q_j Vert_2}$ where $G$ denotes a gravitational constant. Furthermore, $q_i(t) in mathbb{R}^3$ decribes the position of the $i$-th planet at time $t$.



    Now I need to calculate the equations of motions.



    But now I do not understand how to deal with $frac{partial mathcal{L}}{partial q_i}$. The first thing which confuses me is that $q_i$ is a three-dimensional vector. The second thing would be the derivative of the norm because in calculus we have learned that the norm is not differentiable.



    Could anyone explain this problem to me? Any help is really appreciated.










    share|cite|improve this question











    $endgroup$















      4












      4








      4





      $begingroup$


      The Lagrange function is defined as $mathcal{L}(q,dot{q}) = T(q,dot{q}) - V(q,dot{q})$ where $T$ defines the kinetic energy and $V$ the potential energy.



      The equations of motion are given by
      $frac{partial mathcal{L}}{partial q_i} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q_i}} = 0$.



      In the $n$-body problem we have $n$ planets with masses $m_1, dots, m_n in mathbb{R}_+$. The kinetic and potential energy is given by



      $T = sum_i frac{1}{2} m_i Vert dot{q_i} Vert_2^2$ and $V = G cdot sum_{i<j} frac{m_i m_j}{Vert q_i - q_j Vert_2}$ where $G$ denotes a gravitational constant. Furthermore, $q_i(t) in mathbb{R}^3$ decribes the position of the $i$-th planet at time $t$.



      Now I need to calculate the equations of motions.



      But now I do not understand how to deal with $frac{partial mathcal{L}}{partial q_i}$. The first thing which confuses me is that $q_i$ is a three-dimensional vector. The second thing would be the derivative of the norm because in calculus we have learned that the norm is not differentiable.



      Could anyone explain this problem to me? Any help is really appreciated.










      share|cite|improve this question











      $endgroup$




      The Lagrange function is defined as $mathcal{L}(q,dot{q}) = T(q,dot{q}) - V(q,dot{q})$ where $T$ defines the kinetic energy and $V$ the potential energy.



      The equations of motion are given by
      $frac{partial mathcal{L}}{partial q_i} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q_i}} = 0$.



      In the $n$-body problem we have $n$ planets with masses $m_1, dots, m_n in mathbb{R}_+$. The kinetic and potential energy is given by



      $T = sum_i frac{1}{2} m_i Vert dot{q_i} Vert_2^2$ and $V = G cdot sum_{i<j} frac{m_i m_j}{Vert q_i - q_j Vert_2}$ where $G$ denotes a gravitational constant. Furthermore, $q_i(t) in mathbb{R}^3$ decribes the position of the $i$-th planet at time $t$.



      Now I need to calculate the equations of motions.



      But now I do not understand how to deal with $frac{partial mathcal{L}}{partial q_i}$. The first thing which confuses me is that $q_i$ is a three-dimensional vector. The second thing would be the derivative of the norm because in calculus we have learned that the norm is not differentiable.



      Could anyone explain this problem to me? Any help is really appreciated.







      ordinary-differential-equations physics mathematical-physics classical-mechanics euler-lagrange-equation






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Mar 10 at 13:50









      Andrews

      1,2691421




      1,2691421










      asked Apr 21 '17 at 12:03









      DiglettDiglett

      9821521




      9821521






















          2 Answers
          2






          active

          oldest

          votes


















          2












          $begingroup$

          First off, your equation for $T$ is not quite correct. Recall that $T$ is the kinetic energy, which involves the velocity $dot{q}$ of the particle! The correct equation is
          begin{equation}
          T = frac{1}{2}sum_{i} m_{i} | dot{q}_{i} |^{2}.
          end{equation}



          Now let's look at the Euler Lagrange equations. You have to be very careful with indices here. The $i$-the particle in your system is represented by the vector $vec{q}_{i}$. Let's agree to denote the $a$-th component of this vector by $q_{i,a}$. Thus $i$ runs from $1$ to $n$, and $a$ runs from $1$ to $3$. The Euler Lagrange equations now read
          begin{equation}
          frac{partial mathcal{L}}{partial q_{i,a}} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q}_{i,a}} = 0.
          end{equation}
          These are actually $3times n$ equations, one for each combination of $i$ and $a$.
          Now to rewrite $T$ in a more usefull form. The square norm of $dot{q}_{i}$ is given by
          begin{equation}
          |dot{vec{q}}_{i}|^{2} = sum_{a=1}^{3} dot{q}_{i,a}^{2}.
          end{equation}
          Substituting this in the expression for $T$ we obtain
          begin{equation}
          T = frac{1}{2} sum_{i=1}^{n} sum_{a = 1}^{3} m_{i}dot{q}_{i,a}^{2}.
          end{equation}
          A similar rewriting must be done for $V$. It is maybe a bit more complicated, but the idea is the same, so maybe it's good to try it before I explain more.



          Now for your second issue, you are right that the norm is non-differentiable at zero. Note that in the expression for $T$ we are not talking about any norms, instead we are talking about the square of the norm, which is perfectly differentiable. In the expression for $V$, the situation is quite dire, we are not just talking about a norm, but even about the function $1/|vec{q}_{i} - vec{q}_{j}|$, which behaves even more poorly. I tink one simply assumes that $vec{q}_{i} neq vec{q}_{j}$ for $i neq j$...






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            An alternative notation (but the same basic idea) is used in ocw.mit.edu/courses/aeronautics-and-astronautics/… which says to let $i$ range from $1$ to $3N$ to account for all the coordinates of $N$ bodies in three dimensions.
            $endgroup$
            – David K
            Apr 21 '17 at 12:48










          • $begingroup$
            This is something you can do, but I think it's not so obvious how to rewrite the gravitational energy, $sum_{i<j} 1/|vec{q}_{i} - vec{q}_{j} |$.
            $endgroup$
            – Peter
            Apr 21 '17 at 12:52










          • $begingroup$
            True, we would be trading off more complexity in how we write $V$ (having to keep track of which three $q_i$ belong to each body) for a slight simplification of $T.$ Possibly the notes I linked to put this forward more as a conceptual aid (to resolve the "but $q_i$ is a vector!" misconception) than as a practical way to organize the equations.
            $endgroup$
            – David K
            Apr 21 '17 at 13:00












          • $begingroup$
            Hey, thanks for your remark! Now I have corrected the formula for $T$. Next I tried to rewrite $V$ and received $V = G sum_{i<j} frac{m_i m_j}{sqrt{sum_{a=1}^3 (q_{i,a} - q_{j,a})^2}}$. The derivative $frac{partial T}{partial q_{k,b}}$ is easily calculated as $m_k dot{q_{k,b}}$. But how the heck can I candle $frac{partial V}{partial q_{k,b}}$? This looks absolutely horrible...
            $endgroup$
            – Diglett
            Apr 21 '17 at 16:36










          • $begingroup$
            I don't have much time to go into it right now, but I can say that it's not as bad as it looks, and that the chain rule is your friend.
            $endgroup$
            – Peter
            Apr 21 '17 at 16:48



















          2












          $begingroup$

          $
          letssscriptstyle
          letsssscriptscriptstyle
          letdsdisplaystyle
          renewcommand{+}{hspace{1mu}}
          renewcommand{bs}[1]{boldsymbol{#1}}
          renewcommand{dt}[1]{overset{sss bullet}{#1}}
          renewcommand{ddt}[1]{overset{sss bullet bullet}{#1}}
          renewcommand{pow}[1]{raise{.8ex}{ss{#1}}}
          renewcommand{a}{alpha}
          renewcommand{p}{partial}
          renewcommand{r}{bs{r}}
          renewcommand{rdot}{dt{r}}
          renewcommand{qdot}{dt{q}}
          renewcommand{F}{bs{F}}
          renewcommand{L}{mathcal{L}}
          renewcommand{deriv}[3]{frac{{#1}{#2}}{{#1}{#3}}}
          renewcommand{ddx}[2]{deriv{d}{#1}{#2}}
          renewcommand{pdx}[2]{deriv{partial}{#1}{#2}}
          renewcommand{lagrange}[1]{ddx{}{t} pdx{#1}{qdot_a} + - + pdx{#1}{q_a}}
          $



          Let me change your notation slightly. Let $q_a$ be the set of coordinates we use to specify the positions $bs{r}_i = boldsymbol{r}_i(q)$ of the planets. Starting with Newton's law, if we introduce virtual work and change our philosophy we arrive at d'Alembert's principle, for which the equations of motion take the form
          begin{equation}
          sum_i (F_i - m ,bs{a}_i) cdot delta r_i ; = ; 0
          end{equation}
          where $F_i$ is the force-on and $bs{a}_i$ is the acceleration-of the $i$th planet. Setting the virtual displacements to $delta r_i = sum_a (pr_i + / + p q_a) ; delta q_a $ leads us to the set of $3n$ Lagrange's equations (see Goldstein sec. 1-4)
          begin{equation}
          L_a[T] = ; F_a
          end{equation}
          where the generalized force $F_a = sum_i F_i ! cdot ! pdx{r_i}{q_a}$, the kinetic energy $T = sum_i frac{1}{2} m_i bs{v}_i ! cdot ! bs{v}_i$, and the Lagrange operator $L_a = lagrange{}$. Let us use a non-script $L$ to denote the Lagrangian. In writing down the equations of motion, we can freely switch between using the forces
          begin{equation}
          F_i = sum_{j ; : ; j neq i} frac{ G , m_i m_j , (r_j - r_i)}{|r_j - r_i|^3}
          end{equation}
          and using the potential
          begin{equation}
          V = sum_{i,j ; : ; i<j} frac{-G , m_i m_j}{|r_j - r_i|}
          end{equation}
          The equivalence stems from the fact that the forces can be written as the gradient $F_i = -nabla_i V$, which can be used to equate the generalized force to $L[V]$
          begin{equation}
          F_a ;; = ;; sum_i -nabla_i V ! cdot ! pdx{r_i}{q_a} ;; = ;; -pdx{V}{q_a} ;; = ;; L_a[V]
          end{equation}
          Since $L$ is a linear operator, we can combine $T$ and $V$ into the Lagrangian $L=T-V$ to arrive at the Euler-Lagrange equations of motion
          begin{equation}
          L_a[L] = 0
          end{equation}
          I often see people claim that Lagrange's or Hamilton's equations are inapplicable when there are forces present that cannot be written as a potential (eg. non-conservative forces). But there is nothing stopping us from leaving the corresponding generalized forces on the RHS. Now, if we want a more explicit expression for the equations of motion we need to choose coordinates. For simplicity, let's use Cartesian coordinates and assume that there are no constraints on the system ${q_1, q_2, q_3, q_4, ldots, q_{3n}} equiv {x_1, y_1, z_1, x_2, ldots, z_n }$. Non-Cartesian coordinates are best handled with tensor notation -- which I'd rather not introduce in a Stack Exchange post. It is useful to see the vectors expanded out.
          begin{equation}
          begin{array}{rcl}
          r_i &=& q_{3i-2} + bs{i} + q_{3i-1} + bs{j} + q_{3i} + bs{k} \
          bs{v}_i &=& qdot_{3i-2} + bs{i} + qdot_{3i-1} + bs{j} + qdot_{3i} + bs{k} \
          F_i &=& F_{i1} + bs{i} + F_{i2} + bs{j} + F_{i3} + bs{k} \
          end{array}
          end{equation}
          The positions only depend on three coordinates so the terms $pdx{r_i}{q_a}$ are nonzero for only three values of $alpha$ (for which they become $bs{i}, bs{j},$ or $bs{k}$). It is not hard to see that $L_a[T]$ are the coordinate accelerations and that $F_a$ are the force components. Thus, Lagrange's equations $L_a[T] = F_a$ mirror Newton's law
          begin{equation}
          m_{i} ddt{q}_{3i+j-3} = F_{ij}
          end{equation}
          where we identified $a = 3i+j-3$ for convenience. We can condense these $3n$ equations down to $n$ vector equations
          begin{equation}
          m_{i} bs{a}_i = F_i
          end{equation}
          We've come full circle. Indeed, there is really no reason to introduce the Lagrangian at all because: one there are no constraints, two we are using Cartesian coordinates, and three we have explicit expressions for the forces.






          share|cite|improve this answer











          $endgroup$













            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "69"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2244916%2fequations-of-motion-for-the-n-body-problem%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2












            $begingroup$

            First off, your equation for $T$ is not quite correct. Recall that $T$ is the kinetic energy, which involves the velocity $dot{q}$ of the particle! The correct equation is
            begin{equation}
            T = frac{1}{2}sum_{i} m_{i} | dot{q}_{i} |^{2}.
            end{equation}



            Now let's look at the Euler Lagrange equations. You have to be very careful with indices here. The $i$-the particle in your system is represented by the vector $vec{q}_{i}$. Let's agree to denote the $a$-th component of this vector by $q_{i,a}$. Thus $i$ runs from $1$ to $n$, and $a$ runs from $1$ to $3$. The Euler Lagrange equations now read
            begin{equation}
            frac{partial mathcal{L}}{partial q_{i,a}} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q}_{i,a}} = 0.
            end{equation}
            These are actually $3times n$ equations, one for each combination of $i$ and $a$.
            Now to rewrite $T$ in a more usefull form. The square norm of $dot{q}_{i}$ is given by
            begin{equation}
            |dot{vec{q}}_{i}|^{2} = sum_{a=1}^{3} dot{q}_{i,a}^{2}.
            end{equation}
            Substituting this in the expression for $T$ we obtain
            begin{equation}
            T = frac{1}{2} sum_{i=1}^{n} sum_{a = 1}^{3} m_{i}dot{q}_{i,a}^{2}.
            end{equation}
            A similar rewriting must be done for $V$. It is maybe a bit more complicated, but the idea is the same, so maybe it's good to try it before I explain more.



            Now for your second issue, you are right that the norm is non-differentiable at zero. Note that in the expression for $T$ we are not talking about any norms, instead we are talking about the square of the norm, which is perfectly differentiable. In the expression for $V$, the situation is quite dire, we are not just talking about a norm, but even about the function $1/|vec{q}_{i} - vec{q}_{j}|$, which behaves even more poorly. I tink one simply assumes that $vec{q}_{i} neq vec{q}_{j}$ for $i neq j$...






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              An alternative notation (but the same basic idea) is used in ocw.mit.edu/courses/aeronautics-and-astronautics/… which says to let $i$ range from $1$ to $3N$ to account for all the coordinates of $N$ bodies in three dimensions.
              $endgroup$
              – David K
              Apr 21 '17 at 12:48










            • $begingroup$
              This is something you can do, but I think it's not so obvious how to rewrite the gravitational energy, $sum_{i<j} 1/|vec{q}_{i} - vec{q}_{j} |$.
              $endgroup$
              – Peter
              Apr 21 '17 at 12:52










            • $begingroup$
              True, we would be trading off more complexity in how we write $V$ (having to keep track of which three $q_i$ belong to each body) for a slight simplification of $T.$ Possibly the notes I linked to put this forward more as a conceptual aid (to resolve the "but $q_i$ is a vector!" misconception) than as a practical way to organize the equations.
              $endgroup$
              – David K
              Apr 21 '17 at 13:00












            • $begingroup$
              Hey, thanks for your remark! Now I have corrected the formula for $T$. Next I tried to rewrite $V$ and received $V = G sum_{i<j} frac{m_i m_j}{sqrt{sum_{a=1}^3 (q_{i,a} - q_{j,a})^2}}$. The derivative $frac{partial T}{partial q_{k,b}}$ is easily calculated as $m_k dot{q_{k,b}}$. But how the heck can I candle $frac{partial V}{partial q_{k,b}}$? This looks absolutely horrible...
              $endgroup$
              – Diglett
              Apr 21 '17 at 16:36










            • $begingroup$
              I don't have much time to go into it right now, but I can say that it's not as bad as it looks, and that the chain rule is your friend.
              $endgroup$
              – Peter
              Apr 21 '17 at 16:48
















            2












            $begingroup$

            First off, your equation for $T$ is not quite correct. Recall that $T$ is the kinetic energy, which involves the velocity $dot{q}$ of the particle! The correct equation is
            begin{equation}
            T = frac{1}{2}sum_{i} m_{i} | dot{q}_{i} |^{2}.
            end{equation}



            Now let's look at the Euler Lagrange equations. You have to be very careful with indices here. The $i$-the particle in your system is represented by the vector $vec{q}_{i}$. Let's agree to denote the $a$-th component of this vector by $q_{i,a}$. Thus $i$ runs from $1$ to $n$, and $a$ runs from $1$ to $3$. The Euler Lagrange equations now read
            begin{equation}
            frac{partial mathcal{L}}{partial q_{i,a}} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q}_{i,a}} = 0.
            end{equation}
            These are actually $3times n$ equations, one for each combination of $i$ and $a$.
            Now to rewrite $T$ in a more usefull form. The square norm of $dot{q}_{i}$ is given by
            begin{equation}
            |dot{vec{q}}_{i}|^{2} = sum_{a=1}^{3} dot{q}_{i,a}^{2}.
            end{equation}
            Substituting this in the expression for $T$ we obtain
            begin{equation}
            T = frac{1}{2} sum_{i=1}^{n} sum_{a = 1}^{3} m_{i}dot{q}_{i,a}^{2}.
            end{equation}
            A similar rewriting must be done for $V$. It is maybe a bit more complicated, but the idea is the same, so maybe it's good to try it before I explain more.



            Now for your second issue, you are right that the norm is non-differentiable at zero. Note that in the expression for $T$ we are not talking about any norms, instead we are talking about the square of the norm, which is perfectly differentiable. In the expression for $V$, the situation is quite dire, we are not just talking about a norm, but even about the function $1/|vec{q}_{i} - vec{q}_{j}|$, which behaves even more poorly. I tink one simply assumes that $vec{q}_{i} neq vec{q}_{j}$ for $i neq j$...






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              An alternative notation (but the same basic idea) is used in ocw.mit.edu/courses/aeronautics-and-astronautics/… which says to let $i$ range from $1$ to $3N$ to account for all the coordinates of $N$ bodies in three dimensions.
              $endgroup$
              – David K
              Apr 21 '17 at 12:48










            • $begingroup$
              This is something you can do, but I think it's not so obvious how to rewrite the gravitational energy, $sum_{i<j} 1/|vec{q}_{i} - vec{q}_{j} |$.
              $endgroup$
              – Peter
              Apr 21 '17 at 12:52










            • $begingroup$
              True, we would be trading off more complexity in how we write $V$ (having to keep track of which three $q_i$ belong to each body) for a slight simplification of $T.$ Possibly the notes I linked to put this forward more as a conceptual aid (to resolve the "but $q_i$ is a vector!" misconception) than as a practical way to organize the equations.
              $endgroup$
              – David K
              Apr 21 '17 at 13:00












            • $begingroup$
              Hey, thanks for your remark! Now I have corrected the formula for $T$. Next I tried to rewrite $V$ and received $V = G sum_{i<j} frac{m_i m_j}{sqrt{sum_{a=1}^3 (q_{i,a} - q_{j,a})^2}}$. The derivative $frac{partial T}{partial q_{k,b}}$ is easily calculated as $m_k dot{q_{k,b}}$. But how the heck can I candle $frac{partial V}{partial q_{k,b}}$? This looks absolutely horrible...
              $endgroup$
              – Diglett
              Apr 21 '17 at 16:36










            • $begingroup$
              I don't have much time to go into it right now, but I can say that it's not as bad as it looks, and that the chain rule is your friend.
              $endgroup$
              – Peter
              Apr 21 '17 at 16:48














            2












            2








            2





            $begingroup$

            First off, your equation for $T$ is not quite correct. Recall that $T$ is the kinetic energy, which involves the velocity $dot{q}$ of the particle! The correct equation is
            begin{equation}
            T = frac{1}{2}sum_{i} m_{i} | dot{q}_{i} |^{2}.
            end{equation}



            Now let's look at the Euler Lagrange equations. You have to be very careful with indices here. The $i$-the particle in your system is represented by the vector $vec{q}_{i}$. Let's agree to denote the $a$-th component of this vector by $q_{i,a}$. Thus $i$ runs from $1$ to $n$, and $a$ runs from $1$ to $3$. The Euler Lagrange equations now read
            begin{equation}
            frac{partial mathcal{L}}{partial q_{i,a}} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q}_{i,a}} = 0.
            end{equation}
            These are actually $3times n$ equations, one for each combination of $i$ and $a$.
            Now to rewrite $T$ in a more usefull form. The square norm of $dot{q}_{i}$ is given by
            begin{equation}
            |dot{vec{q}}_{i}|^{2} = sum_{a=1}^{3} dot{q}_{i,a}^{2}.
            end{equation}
            Substituting this in the expression for $T$ we obtain
            begin{equation}
            T = frac{1}{2} sum_{i=1}^{n} sum_{a = 1}^{3} m_{i}dot{q}_{i,a}^{2}.
            end{equation}
            A similar rewriting must be done for $V$. It is maybe a bit more complicated, but the idea is the same, so maybe it's good to try it before I explain more.



            Now for your second issue, you are right that the norm is non-differentiable at zero. Note that in the expression for $T$ we are not talking about any norms, instead we are talking about the square of the norm, which is perfectly differentiable. In the expression for $V$, the situation is quite dire, we are not just talking about a norm, but even about the function $1/|vec{q}_{i} - vec{q}_{j}|$, which behaves even more poorly. I tink one simply assumes that $vec{q}_{i} neq vec{q}_{j}$ for $i neq j$...






            share|cite|improve this answer









            $endgroup$



            First off, your equation for $T$ is not quite correct. Recall that $T$ is the kinetic energy, which involves the velocity $dot{q}$ of the particle! The correct equation is
            begin{equation}
            T = frac{1}{2}sum_{i} m_{i} | dot{q}_{i} |^{2}.
            end{equation}



            Now let's look at the Euler Lagrange equations. You have to be very careful with indices here. The $i$-the particle in your system is represented by the vector $vec{q}_{i}$. Let's agree to denote the $a$-th component of this vector by $q_{i,a}$. Thus $i$ runs from $1$ to $n$, and $a$ runs from $1$ to $3$. The Euler Lagrange equations now read
            begin{equation}
            frac{partial mathcal{L}}{partial q_{i,a}} - frac{d}{dt} frac{partial mathcal{L}}{partial dot{q}_{i,a}} = 0.
            end{equation}
            These are actually $3times n$ equations, one for each combination of $i$ and $a$.
            Now to rewrite $T$ in a more usefull form. The square norm of $dot{q}_{i}$ is given by
            begin{equation}
            |dot{vec{q}}_{i}|^{2} = sum_{a=1}^{3} dot{q}_{i,a}^{2}.
            end{equation}
            Substituting this in the expression for $T$ we obtain
            begin{equation}
            T = frac{1}{2} sum_{i=1}^{n} sum_{a = 1}^{3} m_{i}dot{q}_{i,a}^{2}.
            end{equation}
            A similar rewriting must be done for $V$. It is maybe a bit more complicated, but the idea is the same, so maybe it's good to try it before I explain more.



            Now for your second issue, you are right that the norm is non-differentiable at zero. Note that in the expression for $T$ we are not talking about any norms, instead we are talking about the square of the norm, which is perfectly differentiable. In the expression for $V$, the situation is quite dire, we are not just talking about a norm, but even about the function $1/|vec{q}_{i} - vec{q}_{j}|$, which behaves even more poorly. I tink one simply assumes that $vec{q}_{i} neq vec{q}_{j}$ for $i neq j$...







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Apr 21 '17 at 12:44









            PeterPeter

            1,294421




            1,294421












            • $begingroup$
              An alternative notation (but the same basic idea) is used in ocw.mit.edu/courses/aeronautics-and-astronautics/… which says to let $i$ range from $1$ to $3N$ to account for all the coordinates of $N$ bodies in three dimensions.
              $endgroup$
              – David K
              Apr 21 '17 at 12:48










            • $begingroup$
              This is something you can do, but I think it's not so obvious how to rewrite the gravitational energy, $sum_{i<j} 1/|vec{q}_{i} - vec{q}_{j} |$.
              $endgroup$
              – Peter
              Apr 21 '17 at 12:52










            • $begingroup$
              True, we would be trading off more complexity in how we write $V$ (having to keep track of which three $q_i$ belong to each body) for a slight simplification of $T.$ Possibly the notes I linked to put this forward more as a conceptual aid (to resolve the "but $q_i$ is a vector!" misconception) than as a practical way to organize the equations.
              $endgroup$
              – David K
              Apr 21 '17 at 13:00












            • $begingroup$
              Hey, thanks for your remark! Now I have corrected the formula for $T$. Next I tried to rewrite $V$ and received $V = G sum_{i<j} frac{m_i m_j}{sqrt{sum_{a=1}^3 (q_{i,a} - q_{j,a})^2}}$. The derivative $frac{partial T}{partial q_{k,b}}$ is easily calculated as $m_k dot{q_{k,b}}$. But how the heck can I candle $frac{partial V}{partial q_{k,b}}$? This looks absolutely horrible...
              $endgroup$
              – Diglett
              Apr 21 '17 at 16:36










            • $begingroup$
              I don't have much time to go into it right now, but I can say that it's not as bad as it looks, and that the chain rule is your friend.
              $endgroup$
              – Peter
              Apr 21 '17 at 16:48


















            • $begingroup$
              An alternative notation (but the same basic idea) is used in ocw.mit.edu/courses/aeronautics-and-astronautics/… which says to let $i$ range from $1$ to $3N$ to account for all the coordinates of $N$ bodies in three dimensions.
              $endgroup$
              – David K
              Apr 21 '17 at 12:48










            • $begingroup$
              This is something you can do, but I think it's not so obvious how to rewrite the gravitational energy, $sum_{i<j} 1/|vec{q}_{i} - vec{q}_{j} |$.
              $endgroup$
              – Peter
              Apr 21 '17 at 12:52










            • $begingroup$
              True, we would be trading off more complexity in how we write $V$ (having to keep track of which three $q_i$ belong to each body) for a slight simplification of $T.$ Possibly the notes I linked to put this forward more as a conceptual aid (to resolve the "but $q_i$ is a vector!" misconception) than as a practical way to organize the equations.
              $endgroup$
              – David K
              Apr 21 '17 at 13:00












            • $begingroup$
              Hey, thanks for your remark! Now I have corrected the formula for $T$. Next I tried to rewrite $V$ and received $V = G sum_{i<j} frac{m_i m_j}{sqrt{sum_{a=1}^3 (q_{i,a} - q_{j,a})^2}}$. The derivative $frac{partial T}{partial q_{k,b}}$ is easily calculated as $m_k dot{q_{k,b}}$. But how the heck can I candle $frac{partial V}{partial q_{k,b}}$? This looks absolutely horrible...
              $endgroup$
              – Diglett
              Apr 21 '17 at 16:36










            • $begingroup$
              I don't have much time to go into it right now, but I can say that it's not as bad as it looks, and that the chain rule is your friend.
              $endgroup$
              – Peter
              Apr 21 '17 at 16:48
















            $begingroup$
            An alternative notation (but the same basic idea) is used in ocw.mit.edu/courses/aeronautics-and-astronautics/… which says to let $i$ range from $1$ to $3N$ to account for all the coordinates of $N$ bodies in three dimensions.
            $endgroup$
            – David K
            Apr 21 '17 at 12:48




            $begingroup$
            An alternative notation (but the same basic idea) is used in ocw.mit.edu/courses/aeronautics-and-astronautics/… which says to let $i$ range from $1$ to $3N$ to account for all the coordinates of $N$ bodies in three dimensions.
            $endgroup$
            – David K
            Apr 21 '17 at 12:48












            $begingroup$
            This is something you can do, but I think it's not so obvious how to rewrite the gravitational energy, $sum_{i<j} 1/|vec{q}_{i} - vec{q}_{j} |$.
            $endgroup$
            – Peter
            Apr 21 '17 at 12:52




            $begingroup$
            This is something you can do, but I think it's not so obvious how to rewrite the gravitational energy, $sum_{i<j} 1/|vec{q}_{i} - vec{q}_{j} |$.
            $endgroup$
            – Peter
            Apr 21 '17 at 12:52












            $begingroup$
            True, we would be trading off more complexity in how we write $V$ (having to keep track of which three $q_i$ belong to each body) for a slight simplification of $T.$ Possibly the notes I linked to put this forward more as a conceptual aid (to resolve the "but $q_i$ is a vector!" misconception) than as a practical way to organize the equations.
            $endgroup$
            – David K
            Apr 21 '17 at 13:00






            $begingroup$
            True, we would be trading off more complexity in how we write $V$ (having to keep track of which three $q_i$ belong to each body) for a slight simplification of $T.$ Possibly the notes I linked to put this forward more as a conceptual aid (to resolve the "but $q_i$ is a vector!" misconception) than as a practical way to organize the equations.
            $endgroup$
            – David K
            Apr 21 '17 at 13:00














            $begingroup$
            Hey, thanks for your remark! Now I have corrected the formula for $T$. Next I tried to rewrite $V$ and received $V = G sum_{i<j} frac{m_i m_j}{sqrt{sum_{a=1}^3 (q_{i,a} - q_{j,a})^2}}$. The derivative $frac{partial T}{partial q_{k,b}}$ is easily calculated as $m_k dot{q_{k,b}}$. But how the heck can I candle $frac{partial V}{partial q_{k,b}}$? This looks absolutely horrible...
            $endgroup$
            – Diglett
            Apr 21 '17 at 16:36




            $begingroup$
            Hey, thanks for your remark! Now I have corrected the formula for $T$. Next I tried to rewrite $V$ and received $V = G sum_{i<j} frac{m_i m_j}{sqrt{sum_{a=1}^3 (q_{i,a} - q_{j,a})^2}}$. The derivative $frac{partial T}{partial q_{k,b}}$ is easily calculated as $m_k dot{q_{k,b}}$. But how the heck can I candle $frac{partial V}{partial q_{k,b}}$? This looks absolutely horrible...
            $endgroup$
            – Diglett
            Apr 21 '17 at 16:36












            $begingroup$
            I don't have much time to go into it right now, but I can say that it's not as bad as it looks, and that the chain rule is your friend.
            $endgroup$
            – Peter
            Apr 21 '17 at 16:48




            $begingroup$
            I don't have much time to go into it right now, but I can say that it's not as bad as it looks, and that the chain rule is your friend.
            $endgroup$
            – Peter
            Apr 21 '17 at 16:48











            2












            $begingroup$

            $
            letssscriptstyle
            letsssscriptscriptstyle
            letdsdisplaystyle
            renewcommand{+}{hspace{1mu}}
            renewcommand{bs}[1]{boldsymbol{#1}}
            renewcommand{dt}[1]{overset{sss bullet}{#1}}
            renewcommand{ddt}[1]{overset{sss bullet bullet}{#1}}
            renewcommand{pow}[1]{raise{.8ex}{ss{#1}}}
            renewcommand{a}{alpha}
            renewcommand{p}{partial}
            renewcommand{r}{bs{r}}
            renewcommand{rdot}{dt{r}}
            renewcommand{qdot}{dt{q}}
            renewcommand{F}{bs{F}}
            renewcommand{L}{mathcal{L}}
            renewcommand{deriv}[3]{frac{{#1}{#2}}{{#1}{#3}}}
            renewcommand{ddx}[2]{deriv{d}{#1}{#2}}
            renewcommand{pdx}[2]{deriv{partial}{#1}{#2}}
            renewcommand{lagrange}[1]{ddx{}{t} pdx{#1}{qdot_a} + - + pdx{#1}{q_a}}
            $



            Let me change your notation slightly. Let $q_a$ be the set of coordinates we use to specify the positions $bs{r}_i = boldsymbol{r}_i(q)$ of the planets. Starting with Newton's law, if we introduce virtual work and change our philosophy we arrive at d'Alembert's principle, for which the equations of motion take the form
            begin{equation}
            sum_i (F_i - m ,bs{a}_i) cdot delta r_i ; = ; 0
            end{equation}
            where $F_i$ is the force-on and $bs{a}_i$ is the acceleration-of the $i$th planet. Setting the virtual displacements to $delta r_i = sum_a (pr_i + / + p q_a) ; delta q_a $ leads us to the set of $3n$ Lagrange's equations (see Goldstein sec. 1-4)
            begin{equation}
            L_a[T] = ; F_a
            end{equation}
            where the generalized force $F_a = sum_i F_i ! cdot ! pdx{r_i}{q_a}$, the kinetic energy $T = sum_i frac{1}{2} m_i bs{v}_i ! cdot ! bs{v}_i$, and the Lagrange operator $L_a = lagrange{}$. Let us use a non-script $L$ to denote the Lagrangian. In writing down the equations of motion, we can freely switch between using the forces
            begin{equation}
            F_i = sum_{j ; : ; j neq i} frac{ G , m_i m_j , (r_j - r_i)}{|r_j - r_i|^3}
            end{equation}
            and using the potential
            begin{equation}
            V = sum_{i,j ; : ; i<j} frac{-G , m_i m_j}{|r_j - r_i|}
            end{equation}
            The equivalence stems from the fact that the forces can be written as the gradient $F_i = -nabla_i V$, which can be used to equate the generalized force to $L[V]$
            begin{equation}
            F_a ;; = ;; sum_i -nabla_i V ! cdot ! pdx{r_i}{q_a} ;; = ;; -pdx{V}{q_a} ;; = ;; L_a[V]
            end{equation}
            Since $L$ is a linear operator, we can combine $T$ and $V$ into the Lagrangian $L=T-V$ to arrive at the Euler-Lagrange equations of motion
            begin{equation}
            L_a[L] = 0
            end{equation}
            I often see people claim that Lagrange's or Hamilton's equations are inapplicable when there are forces present that cannot be written as a potential (eg. non-conservative forces). But there is nothing stopping us from leaving the corresponding generalized forces on the RHS. Now, if we want a more explicit expression for the equations of motion we need to choose coordinates. For simplicity, let's use Cartesian coordinates and assume that there are no constraints on the system ${q_1, q_2, q_3, q_4, ldots, q_{3n}} equiv {x_1, y_1, z_1, x_2, ldots, z_n }$. Non-Cartesian coordinates are best handled with tensor notation -- which I'd rather not introduce in a Stack Exchange post. It is useful to see the vectors expanded out.
            begin{equation}
            begin{array}{rcl}
            r_i &=& q_{3i-2} + bs{i} + q_{3i-1} + bs{j} + q_{3i} + bs{k} \
            bs{v}_i &=& qdot_{3i-2} + bs{i} + qdot_{3i-1} + bs{j} + qdot_{3i} + bs{k} \
            F_i &=& F_{i1} + bs{i} + F_{i2} + bs{j} + F_{i3} + bs{k} \
            end{array}
            end{equation}
            The positions only depend on three coordinates so the terms $pdx{r_i}{q_a}$ are nonzero for only three values of $alpha$ (for which they become $bs{i}, bs{j},$ or $bs{k}$). It is not hard to see that $L_a[T]$ are the coordinate accelerations and that $F_a$ are the force components. Thus, Lagrange's equations $L_a[T] = F_a$ mirror Newton's law
            begin{equation}
            m_{i} ddt{q}_{3i+j-3} = F_{ij}
            end{equation}
            where we identified $a = 3i+j-3$ for convenience. We can condense these $3n$ equations down to $n$ vector equations
            begin{equation}
            m_{i} bs{a}_i = F_i
            end{equation}
            We've come full circle. Indeed, there is really no reason to introduce the Lagrangian at all because: one there are no constraints, two we are using Cartesian coordinates, and three we have explicit expressions for the forces.






            share|cite|improve this answer











            $endgroup$


















              2












              $begingroup$

              $
              letssscriptstyle
              letsssscriptscriptstyle
              letdsdisplaystyle
              renewcommand{+}{hspace{1mu}}
              renewcommand{bs}[1]{boldsymbol{#1}}
              renewcommand{dt}[1]{overset{sss bullet}{#1}}
              renewcommand{ddt}[1]{overset{sss bullet bullet}{#1}}
              renewcommand{pow}[1]{raise{.8ex}{ss{#1}}}
              renewcommand{a}{alpha}
              renewcommand{p}{partial}
              renewcommand{r}{bs{r}}
              renewcommand{rdot}{dt{r}}
              renewcommand{qdot}{dt{q}}
              renewcommand{F}{bs{F}}
              renewcommand{L}{mathcal{L}}
              renewcommand{deriv}[3]{frac{{#1}{#2}}{{#1}{#3}}}
              renewcommand{ddx}[2]{deriv{d}{#1}{#2}}
              renewcommand{pdx}[2]{deriv{partial}{#1}{#2}}
              renewcommand{lagrange}[1]{ddx{}{t} pdx{#1}{qdot_a} + - + pdx{#1}{q_a}}
              $



              Let me change your notation slightly. Let $q_a$ be the set of coordinates we use to specify the positions $bs{r}_i = boldsymbol{r}_i(q)$ of the planets. Starting with Newton's law, if we introduce virtual work and change our philosophy we arrive at d'Alembert's principle, for which the equations of motion take the form
              begin{equation}
              sum_i (F_i - m ,bs{a}_i) cdot delta r_i ; = ; 0
              end{equation}
              where $F_i$ is the force-on and $bs{a}_i$ is the acceleration-of the $i$th planet. Setting the virtual displacements to $delta r_i = sum_a (pr_i + / + p q_a) ; delta q_a $ leads us to the set of $3n$ Lagrange's equations (see Goldstein sec. 1-4)
              begin{equation}
              L_a[T] = ; F_a
              end{equation}
              where the generalized force $F_a = sum_i F_i ! cdot ! pdx{r_i}{q_a}$, the kinetic energy $T = sum_i frac{1}{2} m_i bs{v}_i ! cdot ! bs{v}_i$, and the Lagrange operator $L_a = lagrange{}$. Let us use a non-script $L$ to denote the Lagrangian. In writing down the equations of motion, we can freely switch between using the forces
              begin{equation}
              F_i = sum_{j ; : ; j neq i} frac{ G , m_i m_j , (r_j - r_i)}{|r_j - r_i|^3}
              end{equation}
              and using the potential
              begin{equation}
              V = sum_{i,j ; : ; i<j} frac{-G , m_i m_j}{|r_j - r_i|}
              end{equation}
              The equivalence stems from the fact that the forces can be written as the gradient $F_i = -nabla_i V$, which can be used to equate the generalized force to $L[V]$
              begin{equation}
              F_a ;; = ;; sum_i -nabla_i V ! cdot ! pdx{r_i}{q_a} ;; = ;; -pdx{V}{q_a} ;; = ;; L_a[V]
              end{equation}
              Since $L$ is a linear operator, we can combine $T$ and $V$ into the Lagrangian $L=T-V$ to arrive at the Euler-Lagrange equations of motion
              begin{equation}
              L_a[L] = 0
              end{equation}
              I often see people claim that Lagrange's or Hamilton's equations are inapplicable when there are forces present that cannot be written as a potential (eg. non-conservative forces). But there is nothing stopping us from leaving the corresponding generalized forces on the RHS. Now, if we want a more explicit expression for the equations of motion we need to choose coordinates. For simplicity, let's use Cartesian coordinates and assume that there are no constraints on the system ${q_1, q_2, q_3, q_4, ldots, q_{3n}} equiv {x_1, y_1, z_1, x_2, ldots, z_n }$. Non-Cartesian coordinates are best handled with tensor notation -- which I'd rather not introduce in a Stack Exchange post. It is useful to see the vectors expanded out.
              begin{equation}
              begin{array}{rcl}
              r_i &=& q_{3i-2} + bs{i} + q_{3i-1} + bs{j} + q_{3i} + bs{k} \
              bs{v}_i &=& qdot_{3i-2} + bs{i} + qdot_{3i-1} + bs{j} + qdot_{3i} + bs{k} \
              F_i &=& F_{i1} + bs{i} + F_{i2} + bs{j} + F_{i3} + bs{k} \
              end{array}
              end{equation}
              The positions only depend on three coordinates so the terms $pdx{r_i}{q_a}$ are nonzero for only three values of $alpha$ (for which they become $bs{i}, bs{j},$ or $bs{k}$). It is not hard to see that $L_a[T]$ are the coordinate accelerations and that $F_a$ are the force components. Thus, Lagrange's equations $L_a[T] = F_a$ mirror Newton's law
              begin{equation}
              m_{i} ddt{q}_{3i+j-3} = F_{ij}
              end{equation}
              where we identified $a = 3i+j-3$ for convenience. We can condense these $3n$ equations down to $n$ vector equations
              begin{equation}
              m_{i} bs{a}_i = F_i
              end{equation}
              We've come full circle. Indeed, there is really no reason to introduce the Lagrangian at all because: one there are no constraints, two we are using Cartesian coordinates, and three we have explicit expressions for the forces.






              share|cite|improve this answer











              $endgroup$
















                2












                2








                2





                $begingroup$

                $
                letssscriptstyle
                letsssscriptscriptstyle
                letdsdisplaystyle
                renewcommand{+}{hspace{1mu}}
                renewcommand{bs}[1]{boldsymbol{#1}}
                renewcommand{dt}[1]{overset{sss bullet}{#1}}
                renewcommand{ddt}[1]{overset{sss bullet bullet}{#1}}
                renewcommand{pow}[1]{raise{.8ex}{ss{#1}}}
                renewcommand{a}{alpha}
                renewcommand{p}{partial}
                renewcommand{r}{bs{r}}
                renewcommand{rdot}{dt{r}}
                renewcommand{qdot}{dt{q}}
                renewcommand{F}{bs{F}}
                renewcommand{L}{mathcal{L}}
                renewcommand{deriv}[3]{frac{{#1}{#2}}{{#1}{#3}}}
                renewcommand{ddx}[2]{deriv{d}{#1}{#2}}
                renewcommand{pdx}[2]{deriv{partial}{#1}{#2}}
                renewcommand{lagrange}[1]{ddx{}{t} pdx{#1}{qdot_a} + - + pdx{#1}{q_a}}
                $



                Let me change your notation slightly. Let $q_a$ be the set of coordinates we use to specify the positions $bs{r}_i = boldsymbol{r}_i(q)$ of the planets. Starting with Newton's law, if we introduce virtual work and change our philosophy we arrive at d'Alembert's principle, for which the equations of motion take the form
                begin{equation}
                sum_i (F_i - m ,bs{a}_i) cdot delta r_i ; = ; 0
                end{equation}
                where $F_i$ is the force-on and $bs{a}_i$ is the acceleration-of the $i$th planet. Setting the virtual displacements to $delta r_i = sum_a (pr_i + / + p q_a) ; delta q_a $ leads us to the set of $3n$ Lagrange's equations (see Goldstein sec. 1-4)
                begin{equation}
                L_a[T] = ; F_a
                end{equation}
                where the generalized force $F_a = sum_i F_i ! cdot ! pdx{r_i}{q_a}$, the kinetic energy $T = sum_i frac{1}{2} m_i bs{v}_i ! cdot ! bs{v}_i$, and the Lagrange operator $L_a = lagrange{}$. Let us use a non-script $L$ to denote the Lagrangian. In writing down the equations of motion, we can freely switch between using the forces
                begin{equation}
                F_i = sum_{j ; : ; j neq i} frac{ G , m_i m_j , (r_j - r_i)}{|r_j - r_i|^3}
                end{equation}
                and using the potential
                begin{equation}
                V = sum_{i,j ; : ; i<j} frac{-G , m_i m_j}{|r_j - r_i|}
                end{equation}
                The equivalence stems from the fact that the forces can be written as the gradient $F_i = -nabla_i V$, which can be used to equate the generalized force to $L[V]$
                begin{equation}
                F_a ;; = ;; sum_i -nabla_i V ! cdot ! pdx{r_i}{q_a} ;; = ;; -pdx{V}{q_a} ;; = ;; L_a[V]
                end{equation}
                Since $L$ is a linear operator, we can combine $T$ and $V$ into the Lagrangian $L=T-V$ to arrive at the Euler-Lagrange equations of motion
                begin{equation}
                L_a[L] = 0
                end{equation}
                I often see people claim that Lagrange's or Hamilton's equations are inapplicable when there are forces present that cannot be written as a potential (eg. non-conservative forces). But there is nothing stopping us from leaving the corresponding generalized forces on the RHS. Now, if we want a more explicit expression for the equations of motion we need to choose coordinates. For simplicity, let's use Cartesian coordinates and assume that there are no constraints on the system ${q_1, q_2, q_3, q_4, ldots, q_{3n}} equiv {x_1, y_1, z_1, x_2, ldots, z_n }$. Non-Cartesian coordinates are best handled with tensor notation -- which I'd rather not introduce in a Stack Exchange post. It is useful to see the vectors expanded out.
                begin{equation}
                begin{array}{rcl}
                r_i &=& q_{3i-2} + bs{i} + q_{3i-1} + bs{j} + q_{3i} + bs{k} \
                bs{v}_i &=& qdot_{3i-2} + bs{i} + qdot_{3i-1} + bs{j} + qdot_{3i} + bs{k} \
                F_i &=& F_{i1} + bs{i} + F_{i2} + bs{j} + F_{i3} + bs{k} \
                end{array}
                end{equation}
                The positions only depend on three coordinates so the terms $pdx{r_i}{q_a}$ are nonzero for only three values of $alpha$ (for which they become $bs{i}, bs{j},$ or $bs{k}$). It is not hard to see that $L_a[T]$ are the coordinate accelerations and that $F_a$ are the force components. Thus, Lagrange's equations $L_a[T] = F_a$ mirror Newton's law
                begin{equation}
                m_{i} ddt{q}_{3i+j-3} = F_{ij}
                end{equation}
                where we identified $a = 3i+j-3$ for convenience. We can condense these $3n$ equations down to $n$ vector equations
                begin{equation}
                m_{i} bs{a}_i = F_i
                end{equation}
                We've come full circle. Indeed, there is really no reason to introduce the Lagrangian at all because: one there are no constraints, two we are using Cartesian coordinates, and three we have explicit expressions for the forces.






                share|cite|improve this answer











                $endgroup$



                $
                letssscriptstyle
                letsssscriptscriptstyle
                letdsdisplaystyle
                renewcommand{+}{hspace{1mu}}
                renewcommand{bs}[1]{boldsymbol{#1}}
                renewcommand{dt}[1]{overset{sss bullet}{#1}}
                renewcommand{ddt}[1]{overset{sss bullet bullet}{#1}}
                renewcommand{pow}[1]{raise{.8ex}{ss{#1}}}
                renewcommand{a}{alpha}
                renewcommand{p}{partial}
                renewcommand{r}{bs{r}}
                renewcommand{rdot}{dt{r}}
                renewcommand{qdot}{dt{q}}
                renewcommand{F}{bs{F}}
                renewcommand{L}{mathcal{L}}
                renewcommand{deriv}[3]{frac{{#1}{#2}}{{#1}{#3}}}
                renewcommand{ddx}[2]{deriv{d}{#1}{#2}}
                renewcommand{pdx}[2]{deriv{partial}{#1}{#2}}
                renewcommand{lagrange}[1]{ddx{}{t} pdx{#1}{qdot_a} + - + pdx{#1}{q_a}}
                $



                Let me change your notation slightly. Let $q_a$ be the set of coordinates we use to specify the positions $bs{r}_i = boldsymbol{r}_i(q)$ of the planets. Starting with Newton's law, if we introduce virtual work and change our philosophy we arrive at d'Alembert's principle, for which the equations of motion take the form
                begin{equation}
                sum_i (F_i - m ,bs{a}_i) cdot delta r_i ; = ; 0
                end{equation}
                where $F_i$ is the force-on and $bs{a}_i$ is the acceleration-of the $i$th planet. Setting the virtual displacements to $delta r_i = sum_a (pr_i + / + p q_a) ; delta q_a $ leads us to the set of $3n$ Lagrange's equations (see Goldstein sec. 1-4)
                begin{equation}
                L_a[T] = ; F_a
                end{equation}
                where the generalized force $F_a = sum_i F_i ! cdot ! pdx{r_i}{q_a}$, the kinetic energy $T = sum_i frac{1}{2} m_i bs{v}_i ! cdot ! bs{v}_i$, and the Lagrange operator $L_a = lagrange{}$. Let us use a non-script $L$ to denote the Lagrangian. In writing down the equations of motion, we can freely switch between using the forces
                begin{equation}
                F_i = sum_{j ; : ; j neq i} frac{ G , m_i m_j , (r_j - r_i)}{|r_j - r_i|^3}
                end{equation}
                and using the potential
                begin{equation}
                V = sum_{i,j ; : ; i<j} frac{-G , m_i m_j}{|r_j - r_i|}
                end{equation}
                The equivalence stems from the fact that the forces can be written as the gradient $F_i = -nabla_i V$, which can be used to equate the generalized force to $L[V]$
                begin{equation}
                F_a ;; = ;; sum_i -nabla_i V ! cdot ! pdx{r_i}{q_a} ;; = ;; -pdx{V}{q_a} ;; = ;; L_a[V]
                end{equation}
                Since $L$ is a linear operator, we can combine $T$ and $V$ into the Lagrangian $L=T-V$ to arrive at the Euler-Lagrange equations of motion
                begin{equation}
                L_a[L] = 0
                end{equation}
                I often see people claim that Lagrange's or Hamilton's equations are inapplicable when there are forces present that cannot be written as a potential (eg. non-conservative forces). But there is nothing stopping us from leaving the corresponding generalized forces on the RHS. Now, if we want a more explicit expression for the equations of motion we need to choose coordinates. For simplicity, let's use Cartesian coordinates and assume that there are no constraints on the system ${q_1, q_2, q_3, q_4, ldots, q_{3n}} equiv {x_1, y_1, z_1, x_2, ldots, z_n }$. Non-Cartesian coordinates are best handled with tensor notation -- which I'd rather not introduce in a Stack Exchange post. It is useful to see the vectors expanded out.
                begin{equation}
                begin{array}{rcl}
                r_i &=& q_{3i-2} + bs{i} + q_{3i-1} + bs{j} + q_{3i} + bs{k} \
                bs{v}_i &=& qdot_{3i-2} + bs{i} + qdot_{3i-1} + bs{j} + qdot_{3i} + bs{k} \
                F_i &=& F_{i1} + bs{i} + F_{i2} + bs{j} + F_{i3} + bs{k} \
                end{array}
                end{equation}
                The positions only depend on three coordinates so the terms $pdx{r_i}{q_a}$ are nonzero for only three values of $alpha$ (for which they become $bs{i}, bs{j},$ or $bs{k}$). It is not hard to see that $L_a[T]$ are the coordinate accelerations and that $F_a$ are the force components. Thus, Lagrange's equations $L_a[T] = F_a$ mirror Newton's law
                begin{equation}
                m_{i} ddt{q}_{3i+j-3} = F_{ij}
                end{equation}
                where we identified $a = 3i+j-3$ for convenience. We can condense these $3n$ equations down to $n$ vector equations
                begin{equation}
                m_{i} bs{a}_i = F_i
                end{equation}
                We've come full circle. Indeed, there is really no reason to introduce the Lagrangian at all because: one there are no constraints, two we are using Cartesian coordinates, and three we have explicit expressions for the forces.







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Jul 17 '17 at 4:09

























                answered Jul 8 '17 at 6:01









                Andrew SzymczakAndrew Szymczak

                1,177616




                1,177616






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2244916%2fequations-of-motion-for-the-n-body-problem%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Magento 2 - Add success message with knockout Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Success / Error message on ajax request$.widget is not a function when loading a homepage after add custom jQuery on custom themeHow can bind jQuery to current document in Magento 2 When template load by ajaxRedirect page using plugin in Magento 2Magento 2 - Update quantity and totals of cart page without page reload?Magento 2: Quote data not loaded on knockout checkoutMagento 2 : I need to change add to cart success message after adding product into cart through pluginMagento 2.2.5 How to add additional products to cart from new checkout step?Magento 2 Add error/success message with knockoutCan't validate Post Code on checkout page

                    Fil:Tokke komm.svg

                    Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?