+
    ‹°³jl  ã                   óp   € R t ^ RIHt ^ RIHtHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt R
R ltR	# )zX
This module implements a method to find
Euler-Lagrange Equations for given Lagrangian.
)Úcombinations_with_replacement)Ú
DerivativeÚFunctionÚdiff)ÚEq)ÚS)ÚSymbol©Úsympify)Úiterablec                óÚ  € \        V4      '       d   \        V4      MV3pV'       g    \        V P                  \        4      4      pM1V F+  p\	        V\        4      '       d   K  \        RV,          4      h	  \        V4      '       d   \        V4      MV3pV'       g   V^ ,          P                  pM,\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      p\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   \        RV,          4      hV F&  pW#P                  8X  d   K  \        RV: RV: 24      h	  \        V P                  \        4       Uu. uF+  pVP                  V9   g   K  \        VP                  4      NK-  	  up^ .,           4      p. pV F«  p\        W4      p\        ^V^,           4       FQ  p\!        W(4       F?  p	V\"        P$                  V,          \        V \        V.V	O5!  .V	O5!  ,          ,           pKA  	  KS  	  \'        V^ 4      p
\	        V
\&        4      '       g   Kš  VP)                  V
4       K­  	  V# u upi )	a‘  
Find the Euler-Lagrange equations [1]_ for a given Lagrangian.

Parameters
==========

L : Expr
    The Lagrangian that should be a function of the functions listed
    in the second argument and their derivatives.

    For example, in the case of two functions $f(x,y)$, $g(x,y)$ and
    two independent variables $x$, $y$ the Lagrangian has the form:

        .. math:: L\left(f(x,y),g(x,y),\frac{\partial f(x,y)}{\partial x},
                  \frac{\partial f(x,y)}{\partial y},
                  \frac{\partial g(x,y)}{\partial x},
                  \frac{\partial g(x,y)}{\partial y},x,y\right)

    In many cases it is not necessary to provide anything, except the
    Lagrangian, it will be auto-detected (and an error raised if this
    cannot be done).

funcs : Function or an iterable of Functions
    The functions that the Lagrangian depends on. The Euler equations
    are differential equations for each of these functions.

vars : Symbol or an iterable of Symbols
    The Symbols that are the independent variables of the functions.

Returns
=======

eqns : list of Eq
    The list of differential equations, one for each function.

Examples
========

>>> from sympy import euler_equations, Symbol, Function
>>> x = Function('x')
>>> t = Symbol('t')
>>> L = (x(t).diff(t))**2/2 - x(t)**2/2
>>> euler_equations(L, x(t), t)
[Eq(-x(t) - Derivative(x(t), (t, 2)), 0)]
>>> u = Function('u')
>>> x = Symbol('x')
>>> L = (u(t, x).diff(t))**2/2 - (u(t, x).diff(x))**2/2
>>> euler_equations(L, u(t, x), [t, x])
[Eq(-Derivative(u(t, x), (t, 2)) + Derivative(u(t, x), (x, 2)), 0)]

References
==========

.. [1] https://en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation

zFunction expected, got: %sc              3   ó8   "  € T F  p\        V4      x € K  	  R # 5i©Nr	   )Ú.0Úvars   & ÚU/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/calculus/euler.pyÚ	<genexpr>Ú"euler_equations.<locals>.<genexpr>V   s   é € Ð2©T c”W˜S—\�\«Tùs   ‚c              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5ir   )Ú
isinstancer   )r   Úvs   & r   r   r   X   s   é € Ð3©d¨Œz˜!œV×$Ð$«dùs   ‚FTz!Variables are not symbols, got %sz
Variables z do not match args: )r   ÚtupleÚatomsr   r   Ú	TypeErrorÚargsÚallÚ
ValueErrorÚmaxr   ÚexprÚlenÚ	variablesr   Úranger   r   ÚNegativeOner   Úappend)ÚLÚfuncsÚvarsÚfÚdÚorderÚeqnsÚeqÚiÚpÚnew_eqs   &&&        r   Úeuler_equationsr/      sÝ  € ôt % UŸOšOŒE�%ŒL°%°€EçÜ�a—g‘gœhÓ'Ó(‰ãˆAÜ˜a¤×*Ô*ÜÐ <¸qÕ @ÓAÐAñ ô # 4Ÿ.š.Œ5�Œ;¨t¨g€DçØ�Q�x�}‰}‰çŒuÑ2©TÓ2�u‰uÑ2©TÓ2Ó2ˆç‹3Ñ3©dÓ3�3�3Š3Ñ3©dÓ3×3Ò3ÜÐ;¸dÕBÓCÐCãˆØ—v‘vŽ~ÝÃTÊ1ÐMÓNÐNñ ô ¨1¯7©7´:Ô+>ó ,Ñ+> aØŸ6™6 U™?ô "”�Q—[‘[Ö!Ñ+>ñ ,Ø/0¨cõ2ó 3€Eð €DÛˆÜ�!‹ZˆÜ�q˜% !�)Ö$ˆAÜ2°4Ö;�Øœ!Ÿ-™-¨Õ*¬4°´4¸°;¸A³;Ð+CÀÓ+CÕCÕC’ó <ñ %ô �B˜“ˆÜ�fœb×!Ô!Ø�K‰K˜Öñ ð €Kùò,s   Å3I(ÆI(N)© r0   )Ú__doc__Ú	itertoolsr   Úsympy.core.functionr   r   r   Úsympy.core.relationalr   Úsympy.core.singletonr   Úsympy.core.symbolr   Úsympy.core.sympifyr
   Úsympy.utilities.iterablesr   r/   r0   ó    r   Ú<module>r:      s*   ðñõ 4ß <Ñ <Ý $Ý "Ý $Ý &Ý .ö^r9   