Euler Lagrange - Maple Help

VariationalCalculus

 EulerLagrange
 construct the Euler-Lagrange equations

 Calling Sequence EulerLagrange(f, t, x(t))

Parameters

 f - expression in t, x(t), and x'(t) t - independent variable x(t) - unknown function (or list of functions)

Description

 • The EulerLagrange(f, t, x(t)) command computes the Euler-Lagrange equations of a functional $J=\underset{a}{\overset{b}{\int }}f\left(t,x\left(t\right),x'\left(t\right)\right)ⅆt$ subject to $x\left(a\right)=A$ and $x\left(b\right)=B$.
 In general, the Euler-Lagrange equations are not independent.
 The Euler-Lagrange equations are returned as expressions.
 • If they can be calculated, the trivial first integrals are also returned.
 The first integrals are set equal to generated global indexed variables ${K}_{i}$ that denote arbitrary constants.
 • For higher-order functionals, for example, f(t, y(t), y'(t), y''(t)), use variables to represent derivatives. For example, set x1(t) = y(t) and x2(t)=y'(t), and then determine the Euler-Lagrange equations of the functional f + L*( x1'(t) - x2(t) )^2. To find the equations for the higher-order problem, substitute x2(t) = x1'(t) into the result.

Examples

 > $\mathrm{with}\left(\mathrm{VariationalCalculus}\right)$
 $\left[{\mathrm{ConjugateEquation}}{,}{\mathrm{Convex}}{,}{\mathrm{EulerLagrange}}{,}{\mathrm{Jacobi}}{,}{\mathrm{Weierstrass}}\right]$ (1)

Geodesics in the plane

 > $f≔{\left({\mathrm{diff}\left(x\left(t\right),t\right)}^{2}+{\mathrm{diff}\left(y\left(t\right),t\right)}^{2}\right)}^{\frac{1}{2}}$
 ${f}{≔}\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}$ (2)
 > $\mathrm{EulerLagrange}\left(f,t,\left[x\left(t\right),y\left(t\right)\right]\right)$
 $\left\{\frac{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right){}\left({2}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right){+}{2}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)\right)}{{2}{}{\left({\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}\right)}^{{3}}{{2}}}}{-}\frac{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)}{\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{,}\frac{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right){}\left({2}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right){+}{2}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)\right)}{{2}{}{\left({\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}\right)}^{{3}}{{2}}}}{-}\frac{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)}{\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{,}\frac{\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)}{\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{=}{{K}}_{{1}}{,}\frac{\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)}{\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{=}{{K}}_{{2}}{,}\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}{-}\frac{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}}{\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{-}\frac{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}{\sqrt{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)\right)}^{{2}}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{=}{{K}}_{{3}}\right\}$ (3)

Brachistochrone

 > $g≔\frac{{\left(1+{\mathrm{diff}\left(y\left(t\right),t\right)}^{2}\right)}^{\frac{1}{2}}}{{y\left(t\right)}^{\frac{1}{2}}}$
 ${g}{≔}\frac{\sqrt{{1}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{\sqrt{{y}{}\left({t}\right)}}$ (4)
 > $\mathrm{EulerLagrange}\left(g,t,y\left(t\right)\right)$
 $\left\{{-}\frac{\sqrt{{1}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{{2}{}{{y}{}\left({t}\right)}^{{3}}{{2}}}}{+}\frac{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}{}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}{{\left({1}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}\right)}^{{3}}{{2}}}{}\sqrt{{y}{}\left({t}\right)}}{+}\frac{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}{{2}{}\sqrt{{1}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}{}{{y}{}\left({t}\right)}^{{3}}{{2}}}}{-}\frac{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)}{\sqrt{{1}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}{}\sqrt{{y}{}\left({t}\right)}}{,}\frac{\sqrt{{1}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}}{\sqrt{{y}{}\left({t}\right)}}{-}\frac{{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}{\sqrt{{1}{+}{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right)}^{{2}}}{}\sqrt{{y}{}\left({t}\right)}}{=}{{K}}_{{1}}\right\}$ (5)