# Talk:2904: Physics vs. Magic

Isn't the first law of thermodynamics a conservation law? 172.69.134.217 21:27, 8 March 2024 (UTC)

In Lagrangian Mechanics,the Lagrangian is a function of time, position and speed. The action of the system is defined as the integral of the Lagrangian between the initial and final time. Movement equations are derived as those that minimize action. In that sense it can be loosely interpreted that by only setting initial condition and outcome you can get the full picture of all intermediate events. 198.41.230.215 22:46, 8 March 2024 (UTC)

This is why statistics is magical Phlaxyr (talk) 23:33, 8 March 2024 (UTC)

Both thermodynamics and conservation laws make predictions without telling us anything about what exactly is happening in the intermediate steps. In that sense they're no different from the curse in the comic. An example for thermodynamics could be: your coffee cup will get cold if left on your desk (zeroth law). And an example from conservation laws could be: it doesn't matter what method you're going to use to stop a moving car, in all cases the car has lost the same amount of energy (1/2mv^2). 141.101.99.110 00:33, 9 March 2024 (UTC)

I've always been a little bit annoyed by thermodynamics. I mean it has a temperature, it has energy, why can't I have the energy without something colder lying around? "Remove heat energy from this object and charge a battery with it"... It sucks because the inverse is true, I can certainly discharge a battery and make heat energy from chemical... Anyway back on topic, can someone magic me such a device? I promise to share 50% of the big oil hush money. 172.68.210.23 04:04, 9 March 2024 (UTC)

- What exactly would be your contribution? Anyone with such device would be already swimming in money from U.S. department of defense. Or, more likely, killed by them. Because it certainly can be used as a bomb. -- Hkmaly (talk) 20:48, 9 March 2024 (UTC)
- Anonymity. With magic up their sleeve they probably want to solve a few more world problems too, this allows them to get one out of the way without drawing attention to themselves. 172.68.210.73 01:17, 10 March 2024 (UTC)

The talk had a better explanation of why Thermodynamics, Conservation laws and Lagrangians are 'magic' than the actual explanation. I added a few paragraphs briefly explaining to the explanation, I hope that's helpful, but I left the paragraph about scientific laws being empirical themselves in place despite the fact that I'm pretty dubious about whether that's actually part of the joke. 141.101.99.111 16:46, 9 March 2024 (UTC)

- To be frank I just think part of the joke is how naive definitions of science can lead to baffling counterexamples 198.41.230.214 08:03, 10 March 2024 (UTC)

**About the stationary action concept**

At first sight it looks as if Hamilton's stationary action implies some form of teleology. On closer inspection that turns out not to be the case.

I will use the following case as example of application of calculus or variations in physics: the catenary problem. The properties of the catenary problem that make it lend itself to variational treatment generalize to other areas of physics in which calculus of variations is applied

Take a catenary and divide it into subsections. Here's the thing: each of those subsections is an instance of the catenary problem. The *ratio* of horizontal and vertical displacement is different for each subsection, of course, but that is not an obstacle.

Solving the catenary problem with calculus of variations consists of the following: you subdivide the total length in infinitesimally small subsections. You then set up an equation that addresses all subsections concurrently.

That equation-for-every-infinitesimal-subsection-concurrently is the Euler-Lagrange equation. You solve the problem by restating the equation as a *differential equation*.

A differential equation is non-local in the sense that to solve the problem you require that the equation is to be satisfied over the whole domain *concurrently*.

The derivation of the Euler-Lagrange equation is a generic derivation. That is, the result of that derivation is applicable for *any* problem that is stated in variational form.

Stating a problem in variational form means that it is stated as an integral. (In the case of the catenary problem that integral is the integral of the potential energy from one point of suspension to the next point of suspension.) The problem statement is then: which curve has the property that for that curve the *derivative* of the integral of the potential energy is zero.

In the case of the catenary problem:

The integral is integration with respect to the horizontal coordinate. The variation that is applied is perpendicular to that; the variation is applied in the *vertical* direction. The derivative-is-zero criterion is for the derivative of the integral with respect to that *vertical* direction.

Key to the derivation of the Euler-Lagrange equation is that it works towards the goal of transforming the integral expression to a differential expression. That is essential: in order to make progress the integration must be replaced with differentiation.

The result of the transformation, the Euler-Lagrange equation, imposes a constraint that is just as demanding as the initial formulation with an integral. The differential equation is to be satisfied concurrently over the whole domain.

There is a derivation of the Euler-Lagrange equation that just skips stating the integral; it goes straight to the differential expression. Geometric derivation of the Euler-Lagrange equation Author: Preetum Nakkiran.

(Preetum Nakkiran uses the catenary problem as motivating example, the result has general validity.)

Further reading: discussion of Hamilton's stationary action in an answer I submitted to physics.stackexchange: Hamilton's stationary action

**The relation between Newtonian mechanics and conservation of energy**

We have that in order to formulate a theory of mechanics we must at minimum use these three quantities: position, velocity, acceleration. These three are in a cascading relation: velocity is the time derivative of position, acceleration is the time derivative of velocity.

v = ds/dt, a = dv/dt (1)

In the case of uniform acceleration from a starting velocity of zero we have:

v = at (2)

s = ½at² (3)

Take (3), multiply both sides with acceleration *a*, and substitute according to (2):

as = a½at² = ½a²t² = ½(at)² = ½v²

as = ½v² (5)

The relation (5) is known as Torricelli's formula.

In case the initial position coordinate and the initial velocity are non-zero the derivation works out as follows:

v - v₀ = at (6)

s - s₀ = v₀t + ½at² (7)

Multiply all terms of (7) with acceleration *a*:

a(s - s₀) = av₀t + a½at² (8)

a(s - s₀) = v₀(at) + ½(at)² (9)

a(s - s₀) = v₀(v -v₀) + ½(v -v₀)² (10)

a(s - s₀) = vv₀ - v₀² + ½v² - vv₀ + ½v₀² (11)

a(s - s₀) = ½v² - ½v₀² (12)

Next we go to the more general case of allowing non-uniform acceleration. Interestingly, the result of the integration is identical to (12).

∫ a ds = ½v² - ½(v₀)² (13)

(To understand (13): we have that integration is summation of infinitesimal strips. The integration consists of concatenating instances of (12), in the limit of infinitesimal increments. All of the in-between terms drop away against each other, resulting in (13))

The work-energy theorem is obtained as follows: start with *F*=*ma*, and integrate both sides with respect to the position coordinate.

∫ F ds = ∫ ma ds (14)

Use (13) to process the right hand side:

∫ F ds = ½mv² - ½m(v₀)² (15)

(15) is the work-energy theorem

The work-energy theorem is the reason that it is useful to formulate the concepts of potential energy and kinetic energy. If we formulate potential energy and kinetic energy in accordance with the work-energy theorem then we have that the sum of potential energy and kinetic energy is a conserved quantity.

The work-energy theorem consists of two elements: *F*=*ma*, and (13).

Here (13) was stated in terms of the familiar quantities of mechanics: position, velocity, acceleration. (13) generalizes to any set of three quantites that features that cascading relation: state, first time derivative, second time derivative.

Example: electric current and electromotive force in an LC circuit

Amount of current is a first derivative (displacement of charge per unit of time)

*Change* of current strength is a second derivative

For current through an inductor: the rate of change of current strength (second time derivative) is proportional to the electromotive force.

So we see that in the case of an LC circuit the elements necessary to result in a conservation property are present.

Cleonis (talk) 11:50, 10 March 2024 (UTC)

Thinking further on this, I believe part of the apparent strangeness of the Lagrangian formalism is the fact that the system state is specified at both ends forces you into thinking 'backwards in time' in a way that you don't have to in the Newtonian formalism, but the Newtonian formalism is quite happy to infer the past state from the future and give sensible answers if you integrate backwards in time. So in that sense it's true to say that the Lagrangian formalism implies no more teleology than the Newtonian formalism, but only because the unsettling backwards propagation of cause and effect is actually hidden in the Newtonian approach too. Maybe the interesting thing here is a connection between entropy, whence we get a distinction between past and future, and the philosophical notion of 'purpose' or 'ends' or whatever the term in teleology is. I'm not a philosopher (nor a physicist) so forgive me if I'm mischaracterizing teleology. 172.71.178.177 19:25, 10 March 2024 (UTC)

- I concur that assumption of some form of teleology is not in any way necessary.

- Chad Orzel, discussing Lagrangian formalism, offered a comparison. Let's say we have a train traveling to a destination at a constant velocity. We can state that case as an
*initial value problem*as follows: the train travels at a velocity of 100 units of distance per hour. That constraint determines how much*time*it will take to reach a destination that is 100 units of distance away. We can state that case as a*boundary value problem*as follows: at one hour from t=0 the train must arrive at a destination that is 100 units of distance away. That constraint determines what the*velocity*must be.

- Next we introduce a potential, the potential introduces an acceleration profile to the case. When the problem is stated as an initial value problem we use the given initial velocity (and given acceleration profile) to extrapolate what the arrival time will be. When the case is stated as a boundary value problem we do what is effectively an interpolation: we infer which initial velocity will produce that travel duration of 1 hour.

- I used used the words 'extrapolation' and 'interpolation' because of their common element, of course. The element 'polation' is related to words such as 'polished'. A physical trajectory is free from discontinuity. Extrapolation and interpolation have in common that they capitalize on continuity. Calculation can proceed in any direction; that does not imply anything about causality. Cleonis (talk) 22:43, 10 March 2024 (UTC)

We haven't seen anything about daylight savings time yet... maybe we'll see one tomorrow... why am i eepy during the middle of the day... -- megan ^{she}/_{her} ^{talk}/_{contribs} 23:01, 10 March 2024 (UTC)

Conservation laws and Lagrangian refer to their role in particle physics. For example, conservation of electrical charge is simply postulated as something that your theory should satisfy, but physics does not tell us why it is there in the first place (hence: magic). Similarly, Lagrangians are usually formulated in a way that the outcomes are compatible with experimental observations and not starting out based on fundamental principles. The statement "Lagrangian mechanics instead takes the initial and final states of a system as inputs" is wrong by the way. The Euler-Lagrange equation yields a differential equation that is usually solved as an initial value problem, as it is done in Newtonian mechanics. 172.70.110.144 (talk) 07:38, 11 March 2024 *(please sign your comments with ~~~~)*

Probably not the clearest way to put that I suppose, but while the Euler-Lagrange equations might not take initial and final states as inputs, the least action principle from which they are derived is formalised that way, at least insofar as it takes the generalized coordinates at each end of an interval and gives a rule for the evolution between them. The fact that in practice you usually grind the Lagrangian into ELEs in order to solve it doesn't mean that there's anything stopping you doing it directly by, say, discretizing the interval to turn the action integral into a form you can minimize directly. I still think that the least-action principle from classical mechanics makes much more sense as the root for this joke than their use specifically in particle physics. 172.70.86.189 17:50, 14 March 2024 (UTC)

- Sure, it is possible to implement stationary action numerically. For instance, around 2003 Edwin F. Taylor and Jozef Hanc collaborated on a series of articles, and Slavomir Tuleja created a Java simulation in which the concept of 'hunting for the true trajectory' is implemented. (I created a numerical implementation too, it's on my website.) In order to home in on the true trajectory an iterative algorithm must be implemented. The total time interval is subdivided in
*n*time intervals: t_1, t_2, t_3, t_4, ... t_n. As seed for the iterations start with a straight line. First iteration: adjust the height at t_2, while keeping the height at t_1 and t_3 the same; next adjust the height at t_3, while keeping the height at t_2 and t_4 the same, and so on until you are at t_n. Start again with the triplet t_1, t_2, t_3. Keep iterating until the vertical increments become negligably small. In the Tuleja applet the size of the time increment is adjustable. The smaller the time increments the higher the accuracy of the numerical approximation. My point is: in the end the only distinction between implementing a differential solver and implementing a stationary action solver is order of operations; in both cases the*unit of operation*is inherently a*differential operation*. To push for higher accuracy you must make the time increments smaller. General assertion: contrary to its appearance the stationary action concept is*inherently*a differential concept Cleonis (talk) 10:04, 17 March 2024 (UTC)

I feel like this explanation needs a Simple English rewrite. The introduction is ok, but I came here with the simple question "What are Lagrangians?" and the sci-speak is so opaque it might as well be just "magic". 172.70.91.61 20:03, 15 March 2024 (UTC)

- Langrangian: a kind of sofa with a double cup-holder... ;) 172.71.242.29 21:58, 15 March 2024 (UTC)

No comment on the "falls out of" terminology for the Lagrangian? It's been yonks since I learnt anything to do with Lagrangians, and I can't say I ever mastered them, but I remember the solution "falling out of" the equations being a feature. 172.68.144.147 12:20, 25 March 2024 (UTC)

## Arguably, it is magic[edit]

I don't know if this has a place in the explainer body, but this piece https://arxiv.org/abs/1101.5056 nearly argues that it *is* magic (as well as providing a summary of historic attempts to violate it.)

“in the present paper we try to argue that we have not yet any truly cogent argument (known fundamental physical laws) to exclude its possible macroscopic violation. Even Landauer's information-theoretic principle seems to fall short of the initial expectations of being the fundamental `physical' reason of all Maxwell's demons failure.”

172.71.30.193 01:07, 20 May 2024 (UTC)