## `detools::euler` -- Euler operator of variational calculus

#### Introduction

`detools::euler``(L,t,z)` applies the Euler operator to the Lagrangian L and returns the left hand side of the corresponding Euler-Lagrange equations. The Lagrangian can be of any order and there can be any number of independent variables t and of dependent variables z.

#### Call(s)

`detools::euler(L, t, z)`
`detools::euler(L, DV)`

#### Parameters

`L` | - | the Lagrangian: an expression or an element of a domain of `Cat::DifferentialFunction(DV)`.
`t` | - | the independent variable(s): either a single (indexed) identifier or a list of (indexed) identifiers.
`z` | - | the dependent variable(s): either a single identifier or a list of identifiers.
`DV` | - | the domain of the differential variables: `DV` must belong to `Cat::DifferentialVariable`.

#### Returns

either a single expression or a list ofexpressions; if for L an element of a domain of `Cat::DifferentialFunction` was given, the output will also consist of elements of this domain.

#### Details

- Let z be some functions of the variable(s) t. Let furthermore L be a function depending on t, z and the derivatives of z with respect to t up to a fixed order q. Then the Euler operator yields differential equations for z which are necessary conditions for the function z to be a minimum of the action integral, i.e. the integral over L with respect to all variables t.
- Internally all calculations are performed within suitably chosen domains of `Cat::DifferentialFunction`. If an object of type `DOM_EXPR` is passed as Lagrangian L, conversions are needed which may cost some time.
- If no specific domains are prescribed, `detools::euler` generates automatically for `DV` the domain `Dom::DifferentialVariable(t,z)` and the calculations are performed in the domain `Dom::DifferentialExpression(DV)`. Thus for `t` and `z` anything can be entered that is accepted by the constructor `Dom::DifferentialVariable`.

#### Example 1

This is a finite dimensional example computing the equations of motion of a particle moving in the plane under the influence of a potential V.

    >> L := 1/2*(diff(x(t), t)^2 + diff(y(t), t)^2) - V(x(t), y(t)):
       detools::euler(L, t, [x, y])

            [x([t, t]) + D([1], V)(x, y), y([t, t]) + D([2], V)(x, y)]

#### Example 2

This is a simple example for the generation of field equations. The field u depends here on two variables t,x.

    >> L := 1/2*(diff(u(t, x), t)^2 + diff(u(t, x), x)^2) - u(t, x)^2:
       detools::euler(L, [x, t], u)

                            u([t, t]) + u([x, x]) + 2 u

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000