Questions tagged [variational-calculus]
The variational-calculus tag has no usage guidance.
76
questions
0
votes
0
answers
36
views
Variation of Lagrangian with respect to components of inverse of metric tensor
I am super new to Mathematica, so I apologize if the question is trivial.
I have defined metric tensor (4x4 matrix), inverse metric and Lagrangian:
...
1
vote
1
answer
144
views
NDSolve with absolute value function
I am trying to optimize a curve such that it minimalizes the following functional.
$$
E = \int_0^T dt \left| \left[ m x''(t) + C \sqrt{w^2 + 2 w x'(t) \sin{x(t)} + x'(t)^2} \left(w \sin{x(t)} + x'(t)\...
0
votes
0
answers
78
views
Scalar field theory in xAct mathematica
I have this action
I want to vary this action. How do I do it?
This is my code
...
0
votes
0
answers
87
views
Use Mathematica to derive the probability distributions using the Principle of Maximum Entropy
I am reading the article of Deriving probability distributions using the Principle of Maximum Entropy
and I am trying to derive some of the equations in it automatically using Mathematica.
1. ...
0
votes
0
answers
36
views
Gâteaux derivative of classic DIrichlet energy in dimension higher than 1
I need to calculate the Gâteaux derivatives of some functional, and I started playing a bit with very simple cases. I know there's the VariationalMethods package that's required, but I don't know how ...
1
vote
1
answer
101
views
Finding Hamiltonian from a perturbative Action
I am given a perturbative action $$\frac{S}{\mathcal{T}}=\int dt\sum _{n=0,1} (\dot{c_n}{}^2-c_n^2 \omega _n^2)+7.11 c_0^3+35.3 c_0 c_1^2+4.66 c_0 \dot{c_0}{}^2+1.32 c_0 \dot{c_1}{}^2-7.57 \dot{c_0} ...
2
votes
0
answers
138
views
How to use VarD to vary $\partial T$
I know that how the VarD works which is $ VarD[T, covd][expr] $. What about when I want to vary to a partial of a tensor ($\partial T)$? Let me say a simple question I wanted to test:
$ L = \partial_{...
11
votes
2
answers
490
views
Methods of Numerically Finding Function Minimizing Functional
Say we have some functional like the following: $H = (\partial_yf(y))^2 -w(y) f(y)^2 +f(y)^4/2$. This is the functional for the Gross Pitaevskii equation. Lets say $w(y)$, the trapping potential in ...
3
votes
2
answers
320
views
Roots, multivariable functions and Mathematica [closed]
Let
$f(x,y)=(10 x^2 + 4 x y - 2 x + 4 y^2 - 4 y + 1)^2 (32 x^2 - 64 x y + 24 x + 40 y^2 - 28 y + 5)^2$
...
2
votes
1
answer
180
views
How to get numerical value of functional derivative at specific point
I have a functional in the form:
$$F[s(x)]=\int_0^1(s(x)-a(x))^2\mathrm{d}x$$ where $a(x)$ is a parameter function, and I would like to find the functional derivative of $F$ with respect to $s$.
...
0
votes
0
answers
86
views
Is an analytic solution possible?
I have this problem: the parameters are T1, T2, R, Rthhot, Rthcold, and Z with feasible range >0.
The variables are Rth and Rload.
X and Y are functions of Rload and Rth given by the 2 equations:
<...
8
votes
0
answers
282
views
Shortest Distance between two points on a 2D surface
I am working on an interesting problem, that consists of trying to compute the shortest distance between two points on a 2D surface. This 2D surface can be represented in a 3D space by the function $f(...
5
votes
1
answer
224
views
Geodesics on arbitrary 2D surfaces
Geodesics on 2D Function Surfaces
I am trying to approximately find the shortets path between two point on a surface defined as z=F[x,y]. I am solving for X,Y as function t. However, when trying to ...
0
votes
0
answers
38
views
Solving constraint optimization problem for different intervals using VariationalD
I have been trying to solve for a constraint optimization problem (which eventually yields to a Laplace distribution).
Consider the following equation (1)
\begin{equation*}
J=\int^{\infty}_{-\infty} p(...
1
vote
1
answer
79
views
Using VariationalD, getting derivative of Implicit Functions, derivative independent variables [closed]
Hey I am trying to solve this problem with wolfram:
I figured using VariationalD was the way. However I can not figure out how this package works. It would be nice if someone could help me. I ...
2
votes
2
answers
126
views
Minimization problem in proving Fermat's principle
I am trying to prove the Fermat's Principle of least distance, the problem statement goes:
...
0
votes
2
answers
322
views
Plot of the derivative of a function
I have a function functionSL as a function of t (t<0) where I want to find the extremum ...
4
votes
2
answers
215
views
Use of variational operator, 𝛿 in Mathematica
I am working in Hamilton's principle.
Part of deriving the equation of motion is to use the delta operator (𝛿) which can be operated just like a differential operator.
It is not the function ...
2
votes
2
answers
91
views
Do not evaluate function composition in total derivative
How to achieve that Dt[] does not touch certain function compositions, but still applies all the other derivative transformations. Example:
...
6
votes
1
answer
640
views
Finding a possible Lagrangian corresponding to a differential equation
A typical problem in the calculus of variations is to extremize a functional
$$ J[y]=\int f(x,y,y') \, \mathrm{d} x.$$
This usually involves solving the Euler-Lagrange equation
$$\frac{\mathrm{d}}{\...
2
votes
1
answer
146
views
How do I find the equations of motions for a relativistic particle?
I have it working for the Lagrangian of a classical particle in a gravitational potential:
...
1
vote
1
answer
306
views
How to use the variational method to solve this problem
I see this mechanical problem here.
I want to solve this problem with the variational method. The Lagrangian of this system is obtained by subtracting potential energy from kinetic energy.
...
9
votes
1
answer
2k
views
Euler-Lagrange equation with a damping term
We know that there is a function VariationalMethods`EulerEquations readily handling the Euler-Lagrange equation of the "standard" form
$$
\frac{\partial L}...
1
vote
0
answers
60
views
Tackling variational problem with constraints [closed]
I need to minimize (preferably symbolically) functional with constraints:
$$
F = \int_{0}^{\pi/2} f(x)cos{x}dx\,\\
1.1 \geq f(x) \geq 0\\
2.\int_{0}^{\pi/2} f(x)dx=Const\\
3. f(0) =1\\
4.f(\pi/2) = 0\...
4
votes
1
answer
515
views
Find geodesics given two points
Suppose I want to find the geodesic on a paraboloid going through two points located on the paraboloid, using Mathematica 12.
I chose the paraboloid parametrization as follows:
...
0
votes
1
answer
147
views
How do I solve this variational problem?
I have to find the function $\rho(r)$ that extremizes the functional $F$:
...
1
vote
2
answers
197
views
How to find the variational result of this functional according to the definition of textbook [duplicate]
I see this variational problem here.
The functional is :
$$J(y)=y^{2}(x_{0})+\int_{x_{0}}^{x_{1}}(xy+y'^{2}) dx$$
In the textbook, the result of finding the functional variation according to the ...
1
vote
1
answer
171
views
How to find the variation of this functional according to the definition of Lagrange
The functional is :
$$J(y)=y^{2}(x_{0})+\int_{x_{0}}^{x_{1}}(xy+y'^{2}) dx$$
In the textbook, the result of finding the functional variation according to the functional variation defined by Lagrange ...
0
votes
1
answer
135
views
How to find Euler equation of complex function by the textbook definition
In the help document, we know that EulerEquations[y[x] Sqrt[1 + Derivative[1][y][x]^2], y[x], x] can solve the following Euler ...
1
vote
1
answer
301
views
How to solve the differential equation of a Brachistochrone Problem
This is a differential equation to solve the most brachistochrone line, but it can't find the exact analytical solution :
...
2
votes
1
answer
266
views
How to interpolate {{xi,yi},... ,{xn,yn}} with minimum bending energy?
Thin Plate Splines are explained here, and a Mathematica implementation of that for real samples { { x1, y2, z1 }, { x2, y2, z2 }, ... , { xn, yn, zn } } is ...
0
votes
0
answers
197
views
NDSolve with Functions Depending on time and time dependent Functions
EDIT:
following the advice of using Raw Input Form, the equations have the following form
...
4
votes
1
answer
932
views
How to compute functional derivative against vector in xAct, xTensor or xTras?
I want to compute the functional derivative against vectors.
For example, I have an object that looks like this
$R = h_{ijkl}a^i a^j a^k a^l$
I need to compute $\frac{\delta R}{\delta a^p}= 4 h_{...
0
votes
0
answers
132
views
Minimal Surface of Revolution - Integrate Challenge
I'm trying to use Mathematica to go from equation (11) to equation (12) in this example of a Minimal Surface of Revolution. There is a MMA notebook on that link, but it only shows how to find the ...
2
votes
0
answers
275
views
Solving for a minimum action path in mathematica
I am interested in computing a quantity that is mathematically defined as follows,
$$\phi(x_1,x_2) = \inf_{T>0} \inf_{\gamma \in C^{x_2}_{x_1 }(0,T)} \int_{0}^T L(\gamma, \dot{\gamma})\mathrm{d}t$$...
1
vote
1
answer
161
views
$\min \int_{0}^{\infty} (a f'(x)^2+b f(x)^2+c |f(x)|) dx$
Can Mathematica solve
$\min_{f(x) s.t. f(0)=f_0} \int_{0}^{\infty} (a f'(x)^2+b f(x)^2+c |f(x)|$)dx ?
I tried
...
0
votes
0
answers
105
views
Problems with the VariationalD (VariationalMethods package)
I'm facing the following problem: The VariationalD function doens't commute with the series expasion. Physically this means that if I compute the equation of motion starting with an Hamiltonian with a ...
0
votes
0
answers
59
views
How to include `TimeConstraint` in `EulerEquations`? Is there any error here?
There is a complicated statement which takes a long time to compute.
IS THERE ANY ERROR IN THE ATTACHED PICTURE? If YES, how can I include TimeConstraint of ...
2
votes
0
answers
140
views
How to remove the Riemann tensor derivatives using Bianchi identity?
For the third-order Lovelock gravity, after varying the Lagrangian versus the metric, I found some derivatives of the Riemann tensor which should not be appeared. How can I remove them? Maybe using ...
0
votes
1
answer
91
views
Could not able to set up a differential equations using EulerEquations command
I have a constructed the Lagrangian of a mechanical system by finding the kinetic and potential energy of the system. Then I tried using EulerEquations to set up a differential equation by taking the ...
1
vote
1
answer
494
views
Increasing the time constraint on EulerEquations [closed]
How can I set the Infinity time constraint in EulerEquations?
Actually, there is an error I don't have any idea about. Can you ...
0
votes
1
answer
63
views
Defining an expression to insert into NDSolve
Consider the follwoing Code:
...
0
votes
0
answers
504
views
How to differentiate with respect to a function
I have some complicated expression, let's call it $X_n$, for which I don't have a closed form, but I do have a recurrence relation. It is given in terms of some functions $u(x,y),$ $v(x,y),$ and ...
9
votes
1
answer
473
views
Computing a functional derivative using the VariationalMethods package
To test the VariationalMethods` toolbox, I tried to compute $\frac{\delta I[y]}{\delta y(x)}$ for the following functional, assuming $w(x)$ is some well-behaved ...
11
votes
3
answers
1k
views
Minimum energy path of a potential energy surface
I have calculated the energies of a molecule by varying two parameters (Data points are here data). I want to find the minimum energy path from the point (180.0, 179.99, 21.132) to (124.5, 124.49, 0) ...
6
votes
2
answers
522
views
Black hole orbit in Mathematica
I am currently investigating the motion of a particle around a black hole. The Lagrangian for the system is
$$ \mathcal{L}=F(r)\dot{t}^2-\frac{\dot{r}^2}{F(r)}-(r\dot{\phi})^2 $$
Where $ F(r) = 1 - ...
2
votes
3
answers
1k
views
Use of variational operator, 𝛿 in Wolfram Mathematica (Version 11.0) [closed]
I have been working on a problem which requires the use of Energy Methods which is based on the variational principles. I am finding it hard to replicate my formulated equations in Mathematica.
How ...
1
vote
1
answer
589
views
Does Mathematica understand the concept of infinitesimal increment?
Commonly, in textbooks, differential of differential increment vanishes, good example is how Euler-Lagrange equations are derived using the differential (from step 2 to step 3 here, you can see ...
4
votes
1
answer
1k
views
How to take derivative of a expression with respect to a function?
I want to program the Euler-Lagrange equations for continuous systems.
But in this formulation I have to compute the derivative of the Lagrangian with respect to all the derivatives of the generalized ...
0
votes
1
answer
130
views
VariationalD of Nested Integral
I am trying to calculate the variational derivative with respect to f of the the nested integral below
$$ \mathcal{J}\left[f(x) \right] = \int\limits_a^b \text{d} x \,e^{-f(x)} \int\limits_a^x \text{...