Conservation of energy is, usually, a $\textbf{first order}$ non linear differential equation, generally written as  $$ \frac{m\dot{q}^2}{2} +V(q) = cte. $$  Taking the derivative yields the usual equation of motion.  $$ m\ddot{q} + V'(q) = 0 $$  (The $\dot{q}$ term vanishes.) Which is a $\textbf{second order}$ ODE. Since the non linear term $\dot{q}^2$ vanishes, this is easier to solve. There are hints for a kind of duality between first order and second order equations.  The same system could be described by Lagrange's equations  $$ \frac{d}{dt}\left(\frac{\partial L}{\partial\dot{x}}\right) = \frac{\partial L}{\partial x} $$  or Hamilton's equations,  $$ \frac{dp}{dt} = -\frac{\partial H}{\partial q}\quad ,\quad \frac{dq}{dt} =\frac{\partial H}{\partial p} $$  Again, there is the same hint about duality. Lagrange's equations are second order, and Hamilton's equations are first order. $\textbf{Is this the same duality as before?}$ Or is it a coincidence?
I'm reading a proof about Lagrangian => Hamiltonian and one part of it just doesn't make sense to me.  The Lagrangian is written $L(q, \dot q, t)$, and is convex in $\dot q$, and then the Hamiltonian is defined via the Legendre transform  $$H(p,q,t) = \max_{\dot q} [p \cdot \dot q - L(q, \dot q, t)]$$  Under the right conditions there exists a function $\dot Q (p,q,t)$ such that  $$H(p,q,t) = p \cdot \dot Q(p,q,t) - L(q, \dot Q(p,q,t), t)$$  i.e. when some $\dot Q(p,q,t)$ satisfies $p = \frac{\partial L}{\partial \dot q}\rvert_{(q, \dot Q(p,q,t), t)} = \frac{\partial L}{\partial \dot q}(q, \dot Q(p,q,t), t)$  (Finding this function is usually called "inverting p")  By taking partials in the $p$ variable and using the relationship, we can obtain the relationship  $$\dot Q = \frac{\partial H}{\partial p}$$  Because of the notation I chose, I get the strong urge to say $\dot q = \frac{\partial H}{\partial p}$  , and in fact this is what the textbook does. But have we proved this?    In other words, how can we deduce that  $$q'(t) = \frac{\partial H}{\partial p}(p(t), q'(t), t)$$ for any differentiable vector valued function $q$? (or maybe there are more conditions we need on $q$? Here  $$p(t) = \frac{\partial L}{\partial \dot q}(q(t), q'(t), t)$$ according to Lagrange's equations.
What is wrong with \ifnum#1=0.09\relax? The following code does not compile with the following error message     Missing = inserted for \ifnum   \documentclass[pstricks,border=4pt]{standalone} \usepackage{multido}  \psset{linewidth=.5\pslinewidth} \psset{xunit=2cm}  \newcommand\FixedScale[1]{%     \multips(0,0)(.1,0){\the\numexpr10*#1+1\relax}{\psline(0,0)(0,-3pt)}     \multips(0,0)(.5,0){\the\numexpr2*#1+1\relax}{\psline(0,0)(0,-6pt)}     \multips(0,0)(1,0){\the\numexpr#1+1\relax}{\psline(0,0)(0,-9pt)}     \multido{\i=0+1}{\the\numexpr#1+1\relax}{\uput[-90](\i,-5pt){$\i$}} }  \newcommand\VernierScale[2][0.09]{%     \rput(#2,0){%     \psset{xunit=#1,linecolor=red}%     \multips(0,0)(1,0){11}{\psline(0,0)(0,3pt)}%     \multips(5,0)(5,0){1}{\psline(0,0)(0,6pt)}%     \multips(0,0)(10,0){2}{\psline(0,0)(0,9pt)}%     \ifnum#1=0.11\relax         \multido{\i=0+5}{3}{\uput[90](\i,8pt){\tiny$\the\numexpr10-\i\relax$}}     \else         \multido{\i=0+5}{3}{\uput[90](\i,8pt){\tiny$\i$}}     \fi     } }  \begin{document} \multido{\n=0.00+0.01}{21}{% \begin{pspicture}(0,-.5)(2,.55) \FixedScale{2} \VernierScale[0.09]{\n} \end{pspicture}} \end{document}   What is wrong with \ifnum#1=0.09\relax? I am a new QGIS user and i have a challenge to convert legend from right to left reading in QGIS like ArcGIS. How to store pipe ( | ) in a variable? The idea would be to use it as... a pipe in a command. For instance: say there's some kind of long path which has to be retyped again and again, followed by a pipe and a second program, i.e.  "directory1/directory2/direcotry3/file.dat | less -I "   I'd like that part to be stored in a variable, so it could be used like this:  r="directory1/directory2/direcotry3 \| less -I -p " $ cat path1/path2/$r &lt;searchterm&gt;   Instead, I get  cat: invalid option -- I Try `cat --help' for more information.   ... meaning the pipe clearly didn't work. Can I use multiple regression when I have mixed categorical and continuous predictors? It looks like you can use coding for one categorical variable, but I have two categorical and one continuous predictor variable. Can i use multiple regression for this in SPSS and if so how? thanks! What book has criminals wear a ring? I remember reading one of my father's books when I was younger.  It was about a guy who ended up getting in trouble with the law and was required to wear a ring that could not be removed and would shock the wearer any time they committed a crime (No matter how minor.)    The book was probably published in the early to mid 80s.  I thought the name of the book was 'The Ring', but I am unable to locate anything.  The cover had a car with a single wheel driving on a metal I-beam. Is it possible in Minecraft to switch over from survival to creative in single player? `find` with multiple `-name` and `-exec` executes only the last matches of `-name` This is a question I've been asked several times by students and I tend to have a hard time phrasing it in terms they can understand. This is a natural question to ask and it is not usually well covered in textbooks, so I would like to know of various perspectives and explanations that I can use when teaching.  The question comes up naturally in what is usually students' second course in quantum physics / quantum mechanics. At that stage one is fairly comfortable with the concept of wavefunctions and with the Schrödinger equation, and has had some limited exposure to operators. One common case, for example, is to explain that some operators commute and that this means the corresponding observables are 'compatible' and that there exists a mutual eigenbasis; the commutation relation is usually expressed as $[A,B]=0$ but no more is said about that object.  This naturally leaves students wondering     what is, exactly, the physical significance of the object $[A,B]$ itself?   and this is not an easy question. I would like answers to address this directly, ideally at a variety of levels of abstraction and required background. Note also that I'm much more interested in the object $[A,B]$ itself than what the consequences and interpretations are when it is zero, as those are far easier and explored in much more depth in most resources.    One reason this is a hard question (and that commutators are such confusing objects for students) is that they serve a variety of purposes, with only thin connecting threads between them (at least as seen from the bottom-up perspective).   Commutation relations are usually expressed in the form $[A,B]=0$ even though, a priori, there appears to be little motivation for the introduction of such terminology. A lot of stock is placed behind the canonical commutation relation $[x,p]=i \hbar$, though it is not always clear what it means.  (In my view, the fundamental principle that this encodes is essentially de Broglie's relation $\lambda=h/p$; this is made rigorous by the  but that's quite a bit to expect a student to grasp at a first go.) From this there is a natural extension to the Heisenberg Uncertainty Principle, which in its general form includes a commutator (and an anticommutator, to make things worse). Canonically-conjugate pairs of observables are often introduced, and this is often aided by observations on commutators. (On the other hand, the energy-time and angle-angular momentum conjugacy relations cannot be expressed in terms of commutators, making things even fuzzier.) Commutators are used very frequently, for example, when studying the angular momentum algebra of quantum mechanics. It is clear they play a big role in encoding symmetries in quantum mechanics but it is hardly made clear how and why, and particularly why the combination $AB-BA$ should be important for symmetry considerations.  This becomes even more important in more rigorous treatments of quantum mechanics, where the specifics of the Hilbert space become less important and the algebra of observable operators takes centre stage. The commutator is the central operation of that algebra, but again it's not very clear why that combination should be special. An analogy is occasionally made to the Poisson brackets of hamiltonian mechanics, but this hardly helps - Poisson brackets are equally mysterious. This also ties the commutator in with time evolution, both on the classical side and via the Heisenberg equation of motion.   I can't think of any more at the moment but they are a huge number of opposing directions which can make everything very confusing, and there is rarely a uniting thread. So: what are commutators, exactly, and why are they so important? Any way to add CSS for a single page/node? I'm cleaning up my big crazy style sheets (possibly pertinent to a future question) and I'm wondering the best way to add custom CSS to a specific node or page. In particular, my work site's home page is a Panel Page and it has a bunch of different styling. Right now the CSS is just included with the main theme style sheet. Is there a way to say, &quot;if this is node Foo, then add foo.css&quot;? Is  what I'm looking for? I might be interested in generalizing this to other nodes/sections/etc, but at the moment I just want to handle this one item. The Canon L lenses are much more expensive and presumably much better quality than non-L lenses. What makes an "L" lens? How much better are they over a similar length/speed "ordinary" canon lenses? Find a combinatorial argument for the following binomial identity:   $$n(n+1)2^{n-2} = \sum_{k=1}^{n}k^2\binom{n}{k} .$$   Algebraic proofs can be found at  , and a related identity at  . Relationship between Partial Harmonic Sum and Logarithm. Database design for products with bundles of products I am supposed to integrate $f(z)=$$\frac{5}{z}$ from -3 t0 3 but I am having trouble understanding how to do this. I've done the integration the "hard" way by using parametrizations but now I need to use the fact that $f(z)$ is analytic everywhere except at $z=0$ and a different method to perform the integration but I am stumped. Converting a year from 4 digit to 2 digit and back again in C# My credit card processor requires I send a two-digit year from the credit card expiration date. Here is how I am currently processing:   I put a DropDownList of the 4-digit year on the page. I validate the expiration date in a DateTime field to be sure that the expiration date being passed to the CC processor isn't expired. I send a two-digit year to the CC processor (as required). I do this via a substring of the value from the year DDL.   Is there a method out there to convert a four-digit year to a two-digit year. I am not seeing anything on the DateTime object. Or should I just keep processing it as I am? $\operatorname{rank}(T^3) + \operatorname{rank}(T) \geq 2\operatorname{rank}(T^2)$ for finite-dimensional $V$ Preventing itemize environment to insert initial vertical space Sufficient and necessary conditions to get an infinite fiber $g^{-1}(w)$ Can NDSolve handle discontinuous data? Can space expand with unlimited speed? just after the Big Bang and before inflation the currently observable universe was the size of a coin. One millionth of a second later the universe was the size of the Solar System, which is an expansion much much faster than speed of light. Can space expand with unlimited speed?