+
    ‹°³j  ã                   óV   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHtHt ^RI	H
t
Ht R tR tR# )	é    )ÚMul)ÚS)Údefault_sort_key)Ú
DiracDeltaÚ	Heaviside)ÚIntegralÚ	integratec           
     ó  € . pRpV P                  4       w  rE\        V\        R7      pVP                  V4       V FÃ  pVP                  '       di   \        VP                  \        4      '       dI   VP                  VP                  VP                  VP                  ^,
          4      4       VP                  pVf2   \        V\        4      '       d   VP                  V4      '       d   TpK²  VP                  V4       KÅ  	  V'       gø   . pV FÈ  p\        V\        4      '       d%   VP                  VP                  RVR7      4       K=  VP                  '       di   \        VP                  \        4      '       dI   VP                  VP                  VP                  P                  RVR7      VP                  4      4       K·  VP                  V4       KÊ  	  W&8w  d   \        V!  P                  4       pRV3# RpRV3# V\        V!  3# )aõ  change_mul(node, x)

Rearranges the operands of a product, bringing to front any simple
DiracDelta expression.

Explanation
===========

If no simple DiracDelta expression was found, then all the DiracDelta
expressions are simplified (using DiracDelta.expand(diracdelta=True, wrt=x)).

Return: (dirac, new node)
Where:
  o dirac is either a simple DiracDelta expression or None (if no simple
    expression was found);
  o new node is either a simplified DiracDelta expressions or None (if it
    could not be simplified).

Examples
========

>>> from sympy import DiracDelta, cos
>>> from sympy.integrals.deltafunctions import change_mul
>>> from sympy.abc import x, y
>>> change_mul(x*y*DiracDelta(x)*cos(x), x)
(DiracDelta(x), x*y*cos(x))
>>> change_mul(x*y*DiracDelta(x**2 - 1)*cos(x), x)
(None, x*y*cos(x)*DiracDelta(x - 1)/2 + x*y*cos(x)*DiracDelta(x + 1)/2)
>>> change_mul(x*y*DiracDelta(cos(x))*cos(x), x)
(None, None)

See Also
========

sympy.functions.special.delta_functions.DiracDelta
deltaintegrate
N)ÚkeyT©Ú
diracdeltaÚwrt)Úargs_cncÚsortedr   ÚextendÚis_PowÚ
isinstanceÚbaser   ÚappendÚfuncÚexpÚ	is_simpleÚexpandr   )	ÚnodeÚxÚnew_argsÚdiracÚcÚncÚsorted_argsÚargÚnnodes	   &&       Ú_/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/integrals/deltafunctions.pyÚ
change_mulr$      sŒ  € ðN €HØ€Eð �M‰M‹O�E€AÜ˜Ô 0Ô1€KØ×Ñ�rÔãˆØ�:�:ˆ:œ* S§X¡X¬z×:Ò:Ø�O‰O˜CŸH™H S§X¡X¨s¯w©w¸­{Ó;Ô<Ø—(‘(ˆCØŠ=œj¨¬j×9Ò9¸c¿m¹mÈA×>NÒ>NØŠEà�O‰O˜CÖ ñ ÷ ØˆÛˆCÜ˜#œz×*Ò*Ø—‘ §
¡
°dÀ 
Ó BÖCØ——�¤
¨3¯8©8´Z× @Ò @Ø—‘ §¡¨¯©¯©ÀDÈa¨Ó)PÐRU×RYÑRYÓ ZÖ[à—‘ Ö$ñ ð Ô"Ü˜‘N×)Ñ)Ó+ˆEð �eˆ}Ðð ˆEØ�eˆ}ÐØ”3˜‘>Ð"Ð"ó    c                ó   € V P                  \        4      '       g   R# V P                  \        8X  dø   V P                  RVR7      pW 8X  dÒ   V P	                  V4      '       d¸   \        V P                  4      ^8:  g   V P                  ^,          ^ 8X  d   \        V P                  ^ ,          4      # \        V P                  ^ ,          V P                  ^,          ^,
          4      V P                  ^ ,          P                  4       P                  4       ,          #  R# \        W!4      pV# V P                  '       g   V P                  '       Ed°   V P                  4       pW8w  d*   \        WA4      pVe   \        V\        4      '       g   V# R# \        W4      w  rVV'       g   V'       d   \        Wa4      pV#  R# ^ RIHp VP                  RVR7      pVP                  '       d   \        WQ4      w  rXWh,          pV! VP                  ^ ,          V4      ^ ,          p	\        VP                  4      ^8X  d   ^ MVP                  ^,          p
^ pV
^ 8¼  d›   \$        P&                  V
,          VP)                  W4      P+                  W4      ,          pVP,                  '       d   V
^,          p
V^,          pKi  V^ 8X  d   V\        W,
          4      ,          # V\        W^,
          4      ,          # \$        P.                  # R# )aK  
deltaintegrate(f, x)

Explanation
===========

The idea for integration is the following:

- If we are dealing with a DiracDelta expression, i.e. DiracDelta(g(x)),
  we try to simplify it.

  If we could simplify it, then we integrate the resulting expression.
  We already know we can integrate a simplified expression, because only
  simple DiracDelta expressions are involved.

  If we couldn't simplify it, there are two cases:

  1) The expression is a simple expression: we return the integral,
     taking care if we are dealing with a Derivative or with a proper
     DiracDelta.

  2) The expression is not simple (i.e. DiracDelta(cos(x))): we can do
     nothing at all.

- If the node is a multiplication node having a DiracDelta term:

  First we expand it.

  If the expansion did work, then we try to integrate the expansion.

  If not, we try to extract a simple DiracDelta term, then we have two
  cases:

  1) We have a simple DiracDelta term, so we return the integral.

  2) We didn't have a simple term, but we do have an expression with
     simplified DiracDelta terms, so we integrate this expression.

Examples
========

    >>> from sympy.abc import x, y, z
    >>> from sympy.integrals.deltafunctions import deltaintegrate
    >>> from sympy import sin, cos, DiracDelta
    >>> deltaintegrate(x*sin(x)*cos(x)*DiracDelta(x - 1), x)
    sin(1)*cos(1)*Heaviside(x - 1)
    >>> deltaintegrate(y**2*DiracDelta(x - z)*DiracDelta(y - z), y)
    z**2*DiracDelta(x - z)*Heaviside(y - z)

See Also
========

sympy.functions.special.delta_functions.DiracDelta
sympy.integrals.integrals.Integral
NTr   )Úsolve)Úhasr   r   r   r   ÚlenÚargsr   Úas_polyÚLCr	   Úis_Mulr   r   r   r$   Úsympy.solversr'   r   ÚNegativeOneÚdiffÚsubsÚis_zeroÚZero)Úfr   ÚhÚfhÚgÚ	deltatermÚ	rest_multr'   Úrest_mult_2ÚpointÚnÚmÚrs   &&           r#   Údeltaintegrater?   Q   sS  € ðp �5‰5”×ÒÙð 	‡v�v”ÔØ�H‰H ¨!ˆHÓ,ˆØŒ6ð �{‰{˜1�~Š~Ü˜Ÿ™“K 1Ô$¨¯©¨q­	°Q¬Ü$ Q§V¡V¨A¥YÓ/Ð/ä& q§v¡v¨a¥y°!·&±&¸µ)¸aµ-Ó@ØŸ™˜q�	×)Ñ)Ó+×.Ñ.Ó0õ1ð 2ð	 ñn ôa ˜1“ˆBØˆIØ	
��ˆ�Q—X—X‘XØ�H‰H‹JˆØŒ6Ü˜1“ˆBØŠ~¤j°´X×&>Ò&>Ø�	ñR ôM $.¨aÓ#3Ñ ˆIçßÜ" 9Ó0�BØ�Ið ñF õ? 0Ø%×,Ñ,¸À!Ð,ÓD�	Ø×#×#Ð#Ü-7¸	Ó-EÑ*�IØ )Õ 5�IÙ˜iŸn™n¨QÕ/°Ó3°AÕ6�ô ˜iŸn™nÓ-¨qÔ0‘Q°i·n±nÀQÕ6G�Ø�Ø˜1”fÜŸ™ qÕ(¨¯©¸Ó)=×)BÑ)BÀ1Ó)LÕL�AØ—y—y�yØ˜Q�˜Ø˜Q�šà œ6Ø#$¤Y¨q­yÓ%9Õ#9Ð9à#$¤Z°°Aµ#Ó%6Õ#6Ð6ô —v‘v�Ùr%   N)Úsympy.core.mulr   Úsympy.core.singletonr   Úsympy.core.sortingr   Úsympy.functionsr   r   Ú	integralsr   r	   r$   r?   © r%   r#   Ú<module>rF      s!   ðÝ Ý "Ý /ß 1ß *òF#ôRxr%   