Questions tagged [variational-calculus]
The variational-calculus tag has no usage guidance.
80 questions
1
vote
0
answers
76
views
Integration by parts for Green's first identity
How should one implement
$$\int _{\Omega }\nabla u\cdot \nabla v\,d\Omega \ =\ \int _{\Gamma }v\,\nabla u\cdot {\hat {\mathbf {n} }}\,d\Gamma -\int _{\Omega }v\,\nabla ^{2}u\,d\Omega\,,$$
Symbolically ...
0
votes
0
answers
51
views
performance of the NDEigensystem and DEigensystem
I can't find any result and I can't understand what is going wrong. Any help please? My code is:
...
3
votes
1
answer
260
views
Varying Einstein-Hilbert action through xAct gives extra terms
I am trying to find the associated field equation by varying this action:
$$S=\int d^4x \sqrt{-g}(\kappa \mathcal{R}+\Lambda)$$
This should give me the below field equation when I vary above w.r.t the ...
2
votes
1
answer
164
views
Speeding up minimization problem related to a minimal surface
I am trying to find the minimum of the function $$f(x)=\int_0^1(1+t^x)\sqrt{1+x^2 t^{2(x-1)}}dt$$ which arises from trying to minimize the surface area of a function rotated around the $x$ axis. Here ...
-1
votes
1
answer
122
views
Expression for an integral
I am facing a problem obtaining an expression for my integral. My code goes in a time-consuming loop whenever I execute this integral. The code is:
...
1
vote
1
answer
197
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)\...
1
vote
0
answers
359
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
124
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
51
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
125
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
205
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
922
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
592
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
198
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
87
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:
<...
10
votes
1
answer
462
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
262
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
41
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
87
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
140
views
Minimization problem in proving Fermat's principle
I am trying to prove the Fermat's Principle of least distance, the problem statement goes:
...
1
vote
2
answers
378
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
1
answer
267
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
112
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
823
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
181
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
393
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
3k
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
63
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
583
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
170
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
209
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
196
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
146
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
412
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
304
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
220
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
1k
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
141
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
337
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
162
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
110
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
177
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
92
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
527
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
66
views
Defining an expression to insert into NDSolve
Consider the follwoing Code:
...
0
votes
0
answers
575
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
579
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
2k
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
633
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 - ...