Skip to main content
18 votes
Accepted

Minimum energy path of a potential energy surface

Smooth Equations Let $\varphi \colon \mathbb{R}^d \to \mathbb{R}$ denote a potential function (e.g., from OP's data file). We attempt to solve the system $$ \left\{ \begin{aligned} \gamma(0) &...
Henrik Schumacher's user avatar
16 votes
Accepted

Lagrangian to Hamiltonian

Here is how you would do it using the standard add-on package VariationalMethods, which is meant for calculations like this: ...
Jens's user avatar
  • 97.5k
14 votes

Minimum energy path of a potential energy surface

Interesting problem. Decided to treat it as a graph problem, rather than fitting an InterpolatingFunction to it and getting descent directions from there. If I knew ...
MikeY's user avatar
  • 7,173
13 votes

Computing a functional derivative using the VariationalMethods package

You could use FunctionalD from my answer to Non-trivial functional derivatives, which I repeat here: ...
Carl Woll's user avatar
  • 131k
10 votes

Lagrangian to Hamiltonian

genCoords = {x[t]}; ke = 1/2 m x'[t]^2; v = 1/2 k x[t]^2; q = -c x'[t]; l = ke - v; Solve for x'[t] in terms of ...
march's user avatar
  • 23.9k
9 votes

Minimum energy path of a potential energy surface

If I understand the problem correctly, we just need to extract the path from StreamPlot, don't we? If you have difficulty in accessing the data in dropbox in the ...
xzczd's user avatar
  • 67k
9 votes
Accepted

Drawing geodesic lines on the membrane (Plot3D)

Plot the surface. surface = Plot3D[x + y - x y, {x, -5, 5}, {y, -5, 5}, AxesLabel -> {"x", "y", "z"}] The aim is to draw geodesics - i.e. minimum distance ...
Stephen Luttrell's user avatar
9 votes

Methods of Numerically Finding Function Minimizing Functional

I'd typically go for "discretize and optimize". Here is a quick and dirty implementation of this strategy that avoids all symbolic computation and that utilizes Sobolev gradient descent with ...
Henrik Schumacher's user avatar
7 votes

Help to solve the brachistochrone problem using Euler equations?

You are trying to minimize time, $T$, among all possible paths of a point moving from height $y$ to direction, $x$ from $x_1 = a$ to $x_2=b$. We know that by definition $dx/dt = v$, were $v$ - ...
garej's user avatar
  • 4,885
7 votes
Accepted

Legendre Transform of a function of a 3-vector

Direct answer: The function you were trying to transform in the question is not a scalar and can therefore not be used as an example. Here is a version of ...
Jens's user avatar
  • 97.5k
7 votes
Accepted

Euler-Lagrange equation with a damping term

Yes, it is possible. First of all I recommend you to read these two papers: J. Guerrero, F. F. López-Ruiz, V. Aldaya, and F. Cossio A round trip from Caldirola to Bateman systems, J. Phys.: Conf. Ser....
yarchik's user avatar
  • 19.1k
7 votes

Geodesics on arbitrary 2D surfaces

The problem above calls for determining the geodesic curve between points {2,1} and {5,2} on a paraboloid. This can be done as ...
bbgodfrey's user avatar
  • 61.7k
6 votes
Accepted

Increasing the time constraint on EulerEquations

Sometimes a function has a Method option that can be used to modify the options used by an internal function. This is not true for ...
Carl Woll's user avatar
  • 131k
6 votes
Accepted

How to get numerical value of functional derivative at specific point

Try this: ...
Alexei Boulbitch's user avatar
5 votes
Accepted

How to formulate the Hamiltonian equations of motion? Part II

First, I think p=... has a typo, and should read p = FullSimplify[Table[D[L, vel[[i]]], {i, 1, n}]] One way to use Hamilton's ...
jjc385's user avatar
  • 3,483
5 votes

Black hole orbit in Mathematica

I wonder if the problem lies in the numerical solution of the differential equation. With all due respect, I question the differential equation itself you obtained. Because this might tell a different ...
Αλέξανδρος Ζεγγ's user avatar
5 votes

Black hole orbit in Mathematica

If you change the intial condition to w'[0]=.01 you get a variing solution ...
Ulrich Neumann's user avatar
5 votes

Use of variational operator, 𝛿 in Wolfram Mathematica (Version 11.0)

Maybe you are looking for D[u[x] + x^2 u[x] - 2 u[x] u'[x] + 2 x*Sin[u[x]], {{u[x], u'[x]}, 1}] $\left\{-2 u'(x)+2 x \cos (u(x))+x^2+1,-2 u(x)\right\}$ or for ...
Henrik Schumacher's user avatar
5 votes

Use of variational operator, 𝛿 in Wolfram Mathematica (Version 11.0)

You can use the the function VariationalD in package VariationalMethods: ...
kglr's user avatar
  • 398k
5 votes
Accepted

How to use the variational method to solve this problem

This is the problem I solved sometime ago. Same problem as you show. The angle $\theta$ used is measured from x-axis, positive anti-clockwise, as it was simpler to do so, but it does not affect the ...
Nasser's user avatar
  • 146k
5 votes

Roots, multivariable functions and Mathematica

Perhaps you mean real roots?: ...
Michael E2's user avatar
  • 238k
5 votes
Accepted

Speeding up minimization problem related to a minimal surface

Calculating the integral without any assumptions we obtain a ConditionalExpression which may not work quite seamlessly with ...
Artes's user avatar
  • 57.5k
4 votes
Accepted

Does Mathematica understand the concept of infinitesimal increment?

I don't really approve of your intention but anyway. You can use ...
AccidentalFourierTransform's user avatar
4 votes
Accepted

How to take derivative of a expression with respect to a function?

It is straightforward. Let us take a Lagrangian L = 1/2 D[y[x, t], t]^2 - 1/(2 c^2) D[y[x, t], x]^2 + 1/2 y[x, t]^2; We need to load the package: ...
Alexei Boulbitch's user avatar
4 votes
Accepted

Numerically Integrating a Hamiltonian but getting different results when compared with alternative equivalent equations

Here's my guess at how it should be done. There were a couple of changes. You need separate q and p variables in order to ...
Michael E2's user avatar
  • 238k
4 votes
Accepted

Natural boundary conditions variational methods

As far as I know there is no function currently in the Variational Methods package that does that. This function however should do the trick: ...
Ahmed Allam's user avatar
4 votes
Accepted

How to find the variation of this functional according to the definition of Lagrange

You should notice that $y$ is a function, and $J$ is a function with function as argument, then things become clearly ...
wuyingddg's user avatar
  • 1,943
4 votes

Finding a possible Lagrangian corresponding to a differential equation

There doesn't seem to be an easily identifiable function for this: ...
Sjoerd Smit's user avatar
  • 23.8k
4 votes
Accepted

Do not evaluate function composition in total derivative

You can change a system option so that derivatives of Conjugate are not performed: ...
Carl Woll's user avatar
  • 131k
4 votes

Use of variational operator, 𝛿 in Mathematica

Indeed, VariationalD does perform integration by parts which might be unwanted. For this simple univariat case, one can hack together a quick function ...
Natas's user avatar
  • 2,310

Only top scored, non community-wiki answers of a minimum length are eligible