+
    i&                        R t ^ RIHtHt ^ RIHt ^ RIHtHt ^ RI	H
t
 ^ RIHtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHt ^ RIH t H!t!H"t" ^ RI#H$t$H%t% ^ RI&H't'H(t(H)t)H*t* ^ RI+H,t, ^ RI-H.t.H/t/H0t0 ^ RI1H2t2 ^ RI3H4t4H5t5H6t6H7t7 ^ RI8H9t9 ^ RI:H;t; ^ RI<H=t= ^ RI>H?t? ^ RI@HAtAHBtB ^ RICHDtD ^ RIEHFtFHGtGHHtHHItIHJtJ ^ RIKHLtL ^ RIMHNtNHOtO ^ RIPHQtQ ^ RIRHStS ^ RITHUtU  ! R R ]V4      tW ! R! R"]4      tXR# tYR$ tZ]Z! R%4      t[R& t\][]\R'3R( l4       t] ! R) R*]X4      t^R+ t_R, t` ! R- R.]a4      tbR/ tc]Z! R'4      RVR0 l4       tdR1se ! R2 R3]X4      tfR4 tg]Z! R'4      RWR5 l4       th ! R6 R7]X4      ti ! R8 R9]i4      tjR: tk ! R; R<]i4      tlR= tm]Z! R'4      RWR> l4       tn ! R? R@]X4      to ! RA RB]o4      tpRC tq ! RD RE]o4      trRF ts ! RG RH]o4      ttRI tu ! RJ RK]o4      tvRL tw]Z! R'4      RWRM l4       tx ! RN RO]X4      ty ! RP RQ]y4      tzRR t{ ! RS RT]y4      t|RU t}^ R1I~Hu Ht ]EP                  t]EP                  t]EP                  t]EP
                  t]EP                  t]EP                  tR1# )XzIntegral Transforms )reducewraps)repeat)Spi)Add)AppliedUndef	count_opsexpand
expand_mulFunction)Mul)igcdilcm)default_sort_key)Dummy)postorder_traversal)	factorialrf)reargAbs)exp	exp_polar)coshcothsinhtanh)ceiling)MaxMinsqrt)piecewise_fold)coscotsintan)besselj)	Heaviside)gamma)meijerg)	integrateIntegral)_dummy)to_cnf	conjuncts	disjunctsOrAnd)roots)factorPoly)CRootOf)iterable)debugc                   6   a a ] tR t^(t oRtV 3R ltRtVtV ;t# )IntegralTransformErrorav  
Exception raised in relation to problems computing transforms.

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

This class is mostly used internally; if integrals cannot be computed
objects representing unevaluated transforms are usually returned.

The hint ``needeval=True`` can be used to disable returning transform
objects, and instead raise this exception if an integral cannot be
computed.
c                B   < \         SV `  V: R V: R24       W n        R# )z" Transform could not be computed: .N)super__init__function)self	transformr?   msg	__class__s   &&&&z/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/integrals/transforms.pyr>   IntegralTransformError.__init__6   s    9BCH	J     )r?   )	__name__
__module____qualname____firstlineno____doc__r>   __static_attributes____classdictcell____classcell__)rC   __classdict__s   @@rD   r:   r:   (   s     ! !rF   r:   c                      a  ] tR t^<t o Rt]R 4       t]R 4       t]R 4       t]R 4       t	R t
R tR tR	 tR
 t]R 4       tR tRtV tR# )IntegralTransformaE  
Base class for integral transforms.

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

This class represents unevaluated transforms.

To implement a concrete transform, derive from this class and implement
the ``_compute_transform(f, x, s, **hints)`` and ``_as_integral(f, x, s)``
functions. If the transform cannot be computed, raise :obj:`IntegralTransformError`.

Also set ``cls._name``. For instance,

>>> from sympy import LaplaceTransform
>>> LaplaceTransform._name
'Laplace'

Implement ``self._collapse_extra`` if your function returns more than just a
number and possibly a convergence condition.
c                (    V P                   ^ ,          # )z The function to be transformed. argsr@   s   &rD   r?   IntegralTransform.functionS        yy|rF   c                (    V P                   ^,          # )z:The dependent variable of the function to be transformed. rS   rU   s   &rD   function_variable#IntegralTransform.function_variableX   rW   rF   c                (    V P                   ^,          # )z$The independent transform variable. rS   rU   s   &rD   transform_variable$IntegralTransform.transform_variable]   rW   rF   c                    V P                   P                  P                  V P                  04      V P                  0,
          # )zR
This method returns the symbols that will exist when the transform
is evaluated.
)r?   free_symbolsunionr\   rY   rU   s   &rD   r_   IntegralTransform.free_symbolsb   s;     }}))//1H1H0IJ%%&' 	'rF   c                    \         hNNotImplementedErrorr@   fxshintss   &&&&,rD   _compute_transform$IntegralTransform._compute_transformk       !!rF   c                    \         hrc   rd   r@   rg   rh   ri   s   &&&&rD   _as_integralIntegralTransform._as_integraln   rm   rF   c                h    \        V!  pVR 8X  d"   \        V P                  P                  RR4      hV# )FN )r2   r:   rC   name)r@   extraconds   && rD   _collapse_extra!IntegralTransform._collapse_extraq   s0    E{5=()<)<dBGGrF   c                  a  R p\         ;QJ d<    V 3R lS P                  P                  \        4       4       F  '       g   K   RM1	  RM-! V 3R lS P                  P                  \        4       4       4      '       * pV'       d5    S P                  ! S P                  S P
                  S P                  3/ VB pS P                  pVP                  '       g   \        V4      pWB3#   \         d    \        R4       R p LFi ; i)Nc              3   Z   <"   T F   pVP                  SP                  4      x  K"  	  R # 5irc   )hasrY   ).0funcr@   s   & rD   	<genexpr>2IntegralTransform._try_directly.<locals>.<genexpr>y   s+      N+L4  $xx(>(>??+Ls   (+TFz6[IT _try ] Caught IntegralTransformError, returns None)anyr?   atomsr   rk   rY   r\   r:   r8   is_Addr   )r@   rj   Ttry_directlyfns   f,   rD   _try_directlyIntegralTransform._try_directlyw   s    3 N+/==+>+>|+LN333 N+/==+>+>|+LN N N++DMM**D,C,CNGLN ]]yyyBBu * NOs   3C% %D ?D c           
        VP                  RR4      pVP                  RR4      pW1R&   V P                  ! R/ VB w  rEVe   V# VP                  '       EdU   W!R&   VP                   Uu. uFE  pV P                  ! V.\        V P                  R,          4      ,           !  P                  ! R/ VB NKG  	  pp. p. p	V F  p\        V\        4      '       g   V.pV	P                  V^ ,          4       \        V4      ^8X  d   VP                  V^,          4       K^  \        V4      ^8  g   Kp  WR,          .,          pK  	  VR8X  d   \        V	!  P                  4       pM	\        V	!  pV'       g   V#  V P                  V4      p\        V4      '       d   V3\        V4      ,           # Wx3# V'       d,   \        V P                  P                   V P"                  R4      hVP%                  V P&                  4      w  rWP                  ! \)        V!  .\        V P                  R,          4      ,           !  ,          # u upi   \         d     Li ; i)a]  
Try to evaluate the transform in closed form.

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

This general function handles linearity, but apart from that leaves
pretty much everything to _compute_transform.

Standard hints are the following:

- ``simplify``: whether or not to simplify the result
- ``noconds``: if True, do not return convergence conditions
- ``needeval``: if True, raise IntegralTransformError instead of
                returning IntegralTransform objects

The default values of these hints depend on the concrete transform,
usually the default is
``(simplify, noconds, needeval) = (True, False, False)``.
needevalFsimplifyT:   NN )popr   r   rT   rC   listdoit
isinstancetupleappendlenr   r   rw   r7   r:   _namer?   as_coeff_mulrY   r   )r@   rj   r   r   r   r   rh   resru   resscoeffrests   &,          rD   r   IntegralTransform.doit   s   * 99Z/99Z.$j""+U+=H999 (*GG%#q >>QC$tyy}*=$=?DDMuM#  %ED!!U++AAaD!q6Q;LL1&VaZeW$E  ~4j))+4j
,,U3E??6E%L00<' ($$dmmZA A ood&<&<=^^sDzlT$))B-5H&HJJJK%4 * s   (AH924H> 'H> >IIc                d    V P                  V P                  V P                  V P                  4      # rc   )rp   r?   rY   r\   rU   s   &rD   as_integralIntegralTransform.as_integral   s,      0F0F!%!8!8: 	:rF   c                    V P                   # rc   )r   )r@   rT   kwargss   &*,rD   _eval_rewrite_as_Integral+IntegralTransform._eval_rewrite_as_Integral   s    rF   r   N)rG   rH   rI   rJ   rK   propertyr?   rY   r\   r_   rk   rp   rw   r   r   r   r   rL   rM   rO   s   @rD   rQ   rQ   <   s     ,       ' '"""EKN : :   rF   rQ   c                 `    V'       d&   ^ RI Hp ^ RIHp V! V! \	        V 4      RR7      4      # V # )    )r   )	powdenestT)polar)sympy.simplifyr   sympy.simplify.powsimpr   r"   )exprr   r   r   s   &&  rD   	_simplifyr      s'    +4	."6dCDDKrF   c                   a  V 3R lpV# )a&  
This is a decorator generator for dropping convergence conditions.

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

Suppose you define a function ``transform(*args)`` which returns a tuple of
the form ``(result, cond1, cond2, ...)``.

Decorating it ``@_noconds_(default)`` will add a new keyword argument
``noconds`` to it. If ``noconds=True``, the return value will be altered to
be only ``result``, whereas if ``noconds=False`` the return value will not
be altered.

The default value of the ``noconds`` keyword will be ``default`` (i.e. the
argument of this function).
c                 :   <a  \        S 4      R S/V 3R ll4       pV# )nocondsc                 :   < S! V/ VB pV '       d
   V^ ,          # V# r   r   )r   rT   r   r   r}   s   $*, rD   wrapper0_noconds_.<locals>.make_wrapper.<locals>.wrapper   s#    ''C1vJrF   )r   )r}   r   defaults   f rD   make_wrapper_noconds_.<locals>.make_wrapper   s'    	t	7 	 
	
 rF   r   )r   r   s   f rD   	_noconds_r      s    $ rF   Fc                 V    \        W\        P                  \        P                  34      # rc   )r+   r   ZeroInfinity)rg   rh   s   &&rD   _default_integratorr     s    QAFFAJJ/00rF   Tc                $  a \        RRV 4      oV! VS^,
          ,          V ,          V4      pVP                  \        4      '       gL   \        VP	                  SV4      V4      \
        P                  \
        P                  3\
        P                  3# VP                  '       g   \        RV R4      hVP                  ^ ,          w  rVVP                  \        4      '       d   \        RV R4      hV3R lp\        V4       Uu. uF
  q! V4      NK  	  p	pV	 Uu. uF  q^,          R8w  g   K  VNK  	  p	pV	P                  R R	7       V	'       g   \        RV R
4      hV	^ ,          w  rp\        VP	                  SV4      V4      W3V3# u upi u upi )z/Backend function to compute Mellin transforms. ri   zmellin-transformMellincould not compute integralintegral in unexpected formc                  < ^ RI Hp \        P                  p\        P                  p\        P
                  p\        \        V 4      4      p\        RRR7      pV EF  p\        P                  p\        P                  p	. p
\        V4       EF  pVP                  \        R 4      P                  \        S4      V4      pVP                  '       d@   VP                  R9   g/   VP                  S4      '       g   VP                  V4      '       g   W.,          p
K  V! W4      pVP                  '       d   VP                  R9   d   W.,          p
K  VP                   V8X  d   \#        VP$                  V	4      p	K  \'        VP                   V4      pEK  	  V\        P                  Jd   W8w  d   \#        W4      pEKc  V	\        P                  Jd   W8w  d   \'        W4      pEK  \)        V\+        V
!  4      pEK  	  W#V3# )z>
Turn ``cond`` into a strip (a, b), and auxiliary conditions.
)_solve_inequalitytT)realc                 0    V P                  4       ^ ,          # r   )as_real_imagrh   s   &rD   <lambda>:_mellin_transform.<locals>.process_conds.<locals>.<lambda>)  s    !.."21"5rF   )z==z!=)sympy.solvers.inequalitiesr   r   NegativeInfinityr   truer/   r.   r   r0   replacer   subsis_Relationalrel_opr{   ltsr   gtsr    r2   r1   )rv   r   abauxcondsr   ca_b_aux_dd_solnri   s   &             rD   process_conds(_mellin_transform.<locals>.process_conds  s|    	AJJff&,'#D!AB##BDq\YY577;tBqE1~ HH,66!99BFF1IICKD(/)))|3CKD88q=TXXr*BTXXr*B! "" #J1---"'J#r4y)5 6 SyrF   Fc                 T    V ^ ,          V ^,          ,
          \        V ^,          4      3# r   )r	   r   s   &rD   r   #_mellin_transform.<locals>.<lambda>B  s    adQqTk9QqT?;rF   keyzno convergence found)r-   r{   r,   r   r   r   r   r   r   is_Piecewiser:   rT   r0   sort)rg   rh   s_
integratorr   Frv   r   r   r   r   r   r   ri   s   &&&&&        @rD   _mellin_transformr     sQ   
 	s&*A1q1u:>1%A55??21A4F4F

3SUVU[U[[[>>>$Xq2NOOffQiGAuuX$a68 	8%N (17!]1E7/11QQE/	JJ;J<$Xq2HIIaIA#QVVAr]H-vs:: 8/s   FF,Fc                   :   a  ] tR tRt o RtRtR tR tR tRt	V t
R# )	MellinTransformiK  z
Class representing unevaluated Mellin transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute Mellin transforms, see the :func:`mellin_transform`
docstring.
r   c                    \        WV3/ VB # rc   )r   rf   s   &&&&,rD   rk   "MellinTransform._compute_transformW  s     q2E22rF   c                    \        WV^,
          ,          ,          V\        P                  \        P                  34      # r   )r,   r   r   r   ro   s   &&&&rD   rp   MellinTransform._as_integralZ  s(    a!e*q!&&!**&=>>rF   c                   . p. p. pV F#  w  w  rVpW%.,          pW6.,          pWG.,          pK%  	  \        V!  \        V!  3\        V!  3pV^ ,          ^ ,          V^ ,          ^,          8  R8X  g   V^,          R8X  d   \        RRR4      hV# )r   TFr   Nzno combined convergence.)r   r    r2   r:   )	r@   ru   r   r   rv   sasbr   r   s	   &&       rD   rw   MellinTransform._collapse_extra]  s     KHRaIAIACKD ! AwQ #t*,F1IQ"t+s1v($ :< <
rF   r   N)rG   rH   rI   rJ   rK   r   rk   rp   rw   rL   rM   r   s   @rD   r   r   K  s%      E3? rF   r   c                :    \        WV4      P                  ! R/ VB # )a  
Compute the Mellin transform `F(s)` of `f(x)`,

.. math :: F(s) = \int_0^\infty x^{s-1} f(x) \mathrm{d}x.

For all "sensible" functions, this converges absolutely in a strip
  `a < \operatorname{Re}(s) < b`.

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

The Mellin transform is related via change of variables to the Fourier
transform, and also to the (bilateral) Laplace transform.

This function returns ``(F, (a, b), cond)``
where ``F`` is the Mellin transform of ``f``, ``(a, b)`` is the fundamental strip
(as above), and ``cond`` are auxiliary convergence conditions.

If the integral cannot be computed in closed form, this function returns
an unevaluated :class:`MellinTransform` object.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`. If ``noconds=False``,
then only `F` will be returned (i.e. not ``cond``, and also not the strip
``(a, b)``).

Examples
========

>>> from sympy import mellin_transform, exp
>>> from sympy.abc import x, s
>>> mellin_transform(exp(-x), x, s)
(gamma(s), (0, oo), True)

See Also
========

inverse_mellin_transform, laplace_transform, fourier_transform
hankel_transform, inverse_hankel_transform
r   )r   r   )rg   rh   ri   rj   s   &&&,rD   mellin_transformr   l  s     R 1#((1511rF   c                p   V w  rE\        V\        ,          4      p\        V\        ,          4      p\        V) V,          VP                  4       ^ ,          ,
          4      p\	        WA,          V,           V,           4      \	        ^V,
          V,
          WA,          ,
          4      RV,          \        ,          3# )a,  
Re-write the sine function ``sin(m*s + n)`` as gamma functions, compatible
with the strip (a, b).

Return ``(gamma1, gamma2, fac)`` so that ``f == fac/(gamma1 * gamma2)``.

Examples
========

>>> from sympy.integrals.transforms import _rewrite_sin
>>> from sympy import pi, S
>>> from sympy.abc import s
>>> _rewrite_sin((pi, 0), s, 0, 1)
(gamma(s), gamma(1 - s), pi)
>>> _rewrite_sin((pi, 0), s, 1, 0)
(gamma(s - 1), gamma(2 - s), -pi)
>>> _rewrite_sin((pi, 0), s, -1, 0)
(gamma(s + 1), gamma(-s), -pi)
>>> _rewrite_sin((pi, pi/2), s, S(1)/2, S(3)/2)
(gamma(s - 1/2), gamma(3/2 - s), -pi)
>>> _rewrite_sin((pi, pi), s, 0, 1)
(gamma(s), gamma(1 - s), -pi)
>>> _rewrite_sin((2*pi, 0), s, 0, S(1)/2)
(gamma(2*s), gamma(1 - 2*s), pi)
>>> _rewrite_sin((2*pi, 0), s, S(1)/2, 1)
(gamma(2*s - 1), gamma(2 - 2*s), -pi)
)r   r   r   r   r)   )m_nri   r   r   mnrs   &&&&   rD   _rewrite_sinr     s    J DA1R4A1R4A1q~~'**+Aq1uQUQY_5QwrzAArF   c                       ] tR tRtRtRtR# )MellinTransformStripErrori  z>
Exception raised by _rewrite_gamma. Mainly for internal use.
r   N)rG   rH   rI   rJ   rK   rL   r   rF   rD   r   r     s     	rF   r   c           
       a aa/a0a1a2 \        W#.4      w  o/o0V/V03R lp. pS P                  \        4       Fw  pVP                  S4      '       g   K  VP                  ^ ,          pVP
                  '       d   VP                  ! S4      ^,          pVP                  ! S4      w  rWX.,          pKy  	  S P                  \        \        \        \        4       F  pVP                  S4      '       g   K  VP                  ^ ,          pVP
                  '       d   VP                  ! S4      ^,          pVP                  ! S4      w  rWX\        ,          .,          pK  	  V U
u. uF!  qP                  '       d   \        V
4      MT
NK#  	  pp
\         P                  pV F  p
V
P                   '       d   K  T
p M	  V U
u. uF  qV,          NK  	  pp
\"        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   VP                  '       g   \%        RRR4      hT\'        \(        V U
u. uF  p
\        V
P*                  4      NK  	  up
\         P                  4      ,          pW8X  dN   \-        V4      ^ 8X  d   TpM:T\'        \.        V U
u. uF  p
\        V
P0                  4      NK  	  up
4      ,          pS P3                  SSV,          4      o \         P                  V,          p\         P                  V,          pS/e
   S/V,          o/S0e
   S0V,          o0S P5                  4       w  pp\6        P8                  ! V4      p\6        P8                  ! V4      p\;        \=        V\?        R4      4      4      \;        \=        V\?        R4      4      4      ,           p. p. p. p. p. pV 3R lo1V'       Ed=   VPA                  4       w  o2pV'       d   TTppTpMTTppTpV1V2V3R	 lpS2P                  S4      '       g   VS2.,          pK\  S2PB                  '       g   \E        S2\F        4      '       d   S2PB                  '       d   S2PH                  pS2PF                  pM\K        ^4      pS2PF                  pVPL                  '       d0   TpV^ 8  d   V'       * pVVV3.\        V4      ,          ,          pEK  VP                  S4      '       gA   V! V4      w  r#V'       g
   ^V,          pVVV,          .,          pVVV,          .,          pEK^  S1! S24      hS2PO                  S4      '       Edf   \Q        S2S4      pVPS                  4       ^8w  d   VPU                  4       ^,          p\W        VS4      p \-        V 4      VPS                  4       8w  d   \X        PZ                  ! V4      p VV.,          pTV  U!u. uF  p!SV!,
          V3NK  	  up!,          pEK%  VP]                  4       w  pp!VV.,          pV!V) ,          p!V! V!V4      '       dA   V\         P                  V!) ^,           3.,          pV\         P                  V!) 3.,          pEK  VR.,          pV\         P^                  V!^,           3.,          pV\         P^                  V!3.,          pEK  \E        S2\        4      '       dw   V! S2P                  ^ ,          4      w  r#V'       dF   V^ 8  d   V! V) V,          V4      R8X  g   V^ 8  d"   V! V) V,          V4      R8X  d   \a        R
4      hVW#3.,          pEKo  \E        S2\        4      '       d   S2P                  ^ ,          pV'       d;   \        V\        ,          4      \        ^V\        ,          ,
          4      \        p$p#p"M\c        V! V4      SS/S04      w  p"p#p$VV"V'       * 3V#V'       * 3.,          pVV$.,          pEK  \E        S2\        4      '       dS   S2P                  ^ ,          pV\        VRR7      V3\        \        ^,          V,
          RR7      V'       * 3.,          pEK  \E        S2\        4      '       d@   S2P                  ^ ,          pV\        \        ^,          V,
          RR7      V3.,          pEK  \E        S2\        4      '       dS   S2P                  ^ ,          pV\        \        ^,          V,
          RR7      V3\        VRR7      V'       * 3.,          pEK=  S1! S24      hV\7        V!  \7        V!  ,          ,          p. . . . 3w  p%p&p'p(VV%V'R3VV(V&R33 EF  w  p)p*p+pV)'       g   K  V)PA                  4       w  pp!VR8w  Ed?   V^8w  Ed7   \        \        V4      4      pVV,          p,V!V,          p-VPL                  '       g   \e        R4      h\g        V4       F  p.V)V,V-V.V,          ,           3.,          p)K  	  V'       d_   V^\        ,          ^V,
          ^,          ,          VV!\         Ph                  ,
          ,          ,          ,          pVVV,          .,          pM^V^\        ,          ^V,
          ^,          ,          VV!\         Ph                  ,
          ,          ,          ,          pVVV) ,          .,          pEKc  V^8X  d   V*Pk                  ^V!,
          4       EK  V+Pk                  V!4       EK  	  \7        V!  pV%Pm                  \n        R7       V&Pm                  \n        R7       V'Pm                  \n        R7       V(Pm                  \n        R7       V%V&3V'V(3W~V3# u up
i u up
i u up
i u up
i u up!i )a8  
Try to rewrite the product f(s) as a product of gamma functions,
so that the inverse Mellin transform of f can be expressed as a meijer
G function.

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

Return (an, ap), (bm, bq), arg, exp, fac such that
G((an, ap), (bm, bq), arg/z**exp)*fac is the inverse Mellin transform of f(s).

Raises IntegralTransformError or MellinTransformStripError on failure.

It is asserted that f has no poles in the fundamental strip designated by
(a, b). One of a and b is allowed to be None. The fundamental strip is
important, because it determines the inversion contour.

This function can handle exponentials, linear factors, trigonometric
functions.

This is a helper function for inverse_mellin_transform that will not
attempt any transformations on f.

Examples
========

>>> from sympy.integrals.transforms import _rewrite_gamma
>>> from sympy.abc import s
>>> from sympy import oo
>>> _rewrite_gamma(s*(s+3)*(s-1), s, -oo, oo)
(([], [-3, 0, 1]), ([-2, 1, 2], []), 1, 1, -1)
>>> _rewrite_gamma((s-1)**2, s, -oo, oo)
(([], [1, 1]), ([2, 2], []), 1, 1, 1)

Importance of the fundamental strip:

>>> _rewrite_gamma(1/s, s, 0, oo)
(([1], []), ([], [0]), 1, 1, 1)
>>> _rewrite_gamma(1/s, s, None, oo)
(([1], []), ([], [0]), 1, 1, 1)
>>> _rewrite_gamma(1/s, s, 0, None)
(([1], []), ([], [0]), 1, 1, 1)
>>> _rewrite_gamma(1/s, s, -oo, 0)
(([], [1]), ([0], []), 1, 1, -1)
>>> _rewrite_gamma(1/s, s, None, 0)
(([], [1]), ([0], []), 1, 1, -1)
>>> _rewrite_gamma(1/s, s, -oo, None)
(([], [1]), ([0], []), 1, 1, -1)

>>> _rewrite_gamma(2**(-s+3), s, -oo, oo)
(([], []), ([], []), 1/2, 1, 8)
c                N  < \        \        V 4      4      p Sf   S\        P                  J d   R# Sf   V S8  # Sf   V S8*  # V S8  R8X  d   R# V S8*  R8X  d   R# V'       d   R# SP                  '       g%   SP                  '       g   V P                  '       d   R# \        R4      h)zE
Decide whether pole at c lies to the left of the fundamental strip.
NTFzPole inside critical strip?)r
   r   r   r   r_   r   )r   is_numerr   r   s   &&rD   left_rewrite_gamma.<locals>.left  s    
 2a5M:"

*:r6M:7NGG???booo ((EFFrF   c              3   8   "   T F  qP                   x  K  	  R # 5irc   )is_Rational)r|   rh   s   & rD   r~   !_rewrite_gamma.<locals>.<genexpr>?  s     5}!}s   FTGammaNzNonrational multiplierc                 ,   < \        R SRV ,          4      # )Inverse MellinzUnrecognised form '%s'.)r:   )factrg   s   &rD   	exception!_rewrite_gamma.<locals>.exceptiona  s    %&6;TW[;[\\rF   c                   < V P                   ! S4      '       g	   S! S4      h\        V S4      pVP                  4       ^8w  d	   S! S4      hVP                  4       # )z6Test if arg is of form a*s+b, raise exception if not. )is_polynomialr5   degree
all_coeffs)r   pr
  r	  ri   s   & rD   
linear_arg"_rewrite_gamma.<locals>.linear_argl  sL    $$Q''o%S!AxxzQo%<<>!rF   z Gammas partially over the strip.)evaluateza is not an integerr   r   )8r   r   r)   r{   rT   r   as_independentr   r%   r#   r&   r$   r   is_extended_realr   Oner  allr:   r   r   qr   r   r  r   as_numer_denomr   	make_argsr   zipr   r   is_Powr   r   baser   
is_Integerr  r5   r  LTr3   r6   	all_rootsr  NegativeOnere   r   	TypeErrorrangeHalfr   r   r   )3rg   ri   r   r   r  s_multipliersgr   r   _rh   common_coefficients_multiplierfacexponentnumerdenomrT   facsdfacsnumer_gammasdenom_gammasexponentialsr   ugammaslgammasufacsr  r  exp_rv   r  rsr   gamma1gamma2fac_anapbmbqgammasplusminusnewanewckr   r   r
  r	  s3   ff&&                                           @@@@rD   _rewrite_gammarE    s+	   ~ vYFBG4 MWWU^uuQxxffQi:::$$Q'*C##A&   WWS#sC(uuQxxffQi:::$$Q'*C##A&(# ) CPP-Q111SVq8-MP}}}!"  4AA=a)))=MAC5}5CCC5}555///$Wd4LMM%fT6C4E6C 56accF6C4EFGee'M ML)}"-L-}=}!qv}=>?L 	
q!L.!A
%%
Cuu\!H	~
l	~
l ##%LE5MM% EMM% EE6$<()DUF5M1J,KKDDELLL]
$h+\WGE+\WGE	" xx{{dVOE[[[JtS11{{{yyxx |xx!8#8D$s4y00XXa[[!$'T6Dq	)q	!o%""T1AxxzQ q	1a[r7ahhj( **1-B% B7Bq!a%*B77<<>DAqaSLE!GAAx  QUUQBFO,,QUUQBK=("Q]]AE233Q]]A.//e$$diil+DAEtQBqD(3u<EtQBqD(3t;-:< <xGc"" 		!A',QrT{E!ad(OR'3JqM1b"'M$f(l+f(l-CDDDdVOEc""		!Ac!e,h7"Q$(U3\BD DDc""		!Ac"Q$(U3X>??Dc""		!Ac"Q$(U3X>!e,(l;= =D D/!3:c5k!!C R^NBB+7R*F+7R*G*I%eXf::<DAqBw17!Iss|||#$9::qAdQqSj122F "AbDQUAI.QZ@@C QTF*LAbDQUAI.QZ@@C Q!WI-LBwAE"Q/*I: |
C GG G!GG G!GG G!GG G!8b"Xsc11y Q B4E >b 8s   'l;9m 4mm
7mc                   \        RRV RR7      pV P                  \        4      p \        V 4      \	        V 4      \        V 4      3 EF  pVP                  '       d   VP                   Uu. uF  p\        WqWSVRR7      NK  	  ppV U	u. uF  q^,          NK  	  p
p	V U	u. uF  q^ ,          NK  	  pp	\        V!  pV'       g    \        WP                  \        4      R7      pVP                  WR4      \        V
!  3u #  \        WaV^ ,          V^,          4      w  rrp \!        YYT,          ,          4      pT'       d   TpM ^ RIHp T! T4      pTP*                  '       d   \-        TP                  4      ^8X  d   \        T\/        T4      ,
          4      TP                  ^ ,          P                  ^ ,          ,          \        \/        T4      T,
          4      TP                  ^,          P                  ^ ,          ,          ,           p\/        \1        TP2                  4      4      TP4                  \6        ,          8  .pT\        \9        \-        TP:                  4      \-        TP<                  4      8g  ^ \?        TP@                  4      ^,           8  4      \/        \1        TP2                  4      4      TP4                  \6        ,          8H  4      .,          p\9        T!  pTR8X  d   \        R	T R4      hTT,          P                  YR4      T3u # 	  \        R	V R4      hu upi u up	i u up	i   \         d     EK  i ; i  \"         d     EK  i ; i  \(         d    \        R	T R
4      hi ; i)zjA helper for the real inverse_mellin_transform function, this one here
assumes x to be real and positive. r   zinverse-mellin-transformT)positiveF)r   )gens)hyperexpandr  zCould not calculate integralzdoes not convergers   )!r-   rewriter)   r4   r   r
   r   rT   _inverse_mellin_transformr   r   r(   r   r2   rE  r:   r*   
ValueErrorr   rI  re   r   r   r   r   argumentdeltar   r1   r<  r>  r   nu)r   ri   x_strip
as_meijergrh   r&  Gr   r  r   r   r   r   Cer*  hrI  rv   s   &&&&&               rD   rK  rK    s    	s.DAA 	
		%AQiAq	2888 VV%# .aAj6;=#  % $((4aqTT4E("&'$QaDD$D't*CSyy';<88A?CK//	,Q58U1XFOA!	a1f%A AI6N
 ~~~#aff+"2a#a&j)!&&)..*;;A
+AFF1INN1,==>
 C

O$qwwrz12 	RADD	SY.RX\0ABQZZ)QWWRZ79 : 	:4y5=( !%8: :#||A"D((_ 3b !!11b
99]% )' & 		  		 ' I,$a)GI IIsB   )L!L&L+>L0MM0M ?M MMM/Nc                   j   a  ] tR tRt o RtRt]! R4      t]! R4      tR t	]
R 4       tR tR	 tR
tV tR# )InverseMellinTransformi5  z
Class representing unevaluated inverse Mellin transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute inverse Mellin transforms, see the
:func:`inverse_mellin_transform` docstring.
r  Noner   c                    Vf   \         P                  pVf   \         P                  p\        P                  ! WW#WE3/ VB # rc   )rX  _none_sentinelrQ   __new__)clsr   ri   rh   r   r   optss   &&&&&&,rD   r\  InverseMellinTransform.__new__C  s<    9&55A9&55A ((qDtDDrF   c                    V P                   ^,          V P                   ^,          r!V\        P                  J d   RpV\        P                  J d   RpW3# )   N)rT   rX  r[  )r@   r   r   s   &  rD   fundamental_strip(InverseMellinTransform.fundamental_stripJ  sH    yy|TYYq\1&555A&555AtrF   c                   VP                  R R4       \        f?   \        \        \        \
        \        \        \        \        \        \        \        \        0s\        V4       FY  pVP                  '       g   K  VP!                  V4      '       g   K0  VP"                  \        9  g   KG  \%        RVRV,          4      h	  V P&                  p\)        WW63/ VB # )r   Tr  zComponent %s not recognised.)r   _allowedr   r)   r%   r#   r&   r$   r   r   r   r   r   r   r   is_Functionr{   r}   r:   rb  rK  )r@   r   ri   rh   rj   rg   rQ  s   &&&&,  rD   rk   )InverseMellinTransform._compute_transformS  s     			*d#UCc3dD$2H %Q'A}}}qaffH.D,-=q%Ca%GI I ( &&(qA5AArF   c                p   V P                   P                  p\        WV) ,          ,          W$\        P                  \        P
                  ,          ,
          V\        P                  \        P
                  ,          ,           34      ^\        P                  ,          \        P                  ,          ,          #    )rC   _cr,   r   ImaginaryUnitr   Pi)r@   r   ri   rh   r   s   &&&& rD   rp   #InverseMellinTransform._as_integralc  sv    NNqb'	A1??1::+E'Eq$%OOAJJ$>H? $@ ABCADD&BXZ 	ZrF   r   N)rG   rH   rI   rJ   rK   r   r   r[  rk  r\  r   rb  rk   rp   rL   rM   r   s   @rD   rX  rX  5  sO      E6]N	sBE  B Z ZrF   rX  c                X    \        WW#^ ,          V^,          4      P                  ! R/ VB # )a  
Compute the inverse Mellin transform of `F(s)` over the fundamental
strip given by ``strip=(a, b)``.

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

This can be defined as

.. math:: f(x) = \frac{1}{2\pi i} \int_{c - i\infty}^{c + i\infty} x^{-s} F(s) \mathrm{d}s,

for any `c` in the fundamental strip. Under certain regularity
conditions on `F` and/or `f`,
this recovers `f` from its Mellin transform `F`
(and vice versa), for positive real `x`.

One of `a` or `b` may be passed as ``None``; a suitable `c` will be
inferred.

If the integral cannot be computed in closed form, this function returns
an unevaluated :class:`InverseMellinTransform` object.

Note that this function will assume x to be positive and real, regardless
of the SymPy assumptions!

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.

Examples
========

>>> from sympy import inverse_mellin_transform, oo, gamma
>>> from sympy.abc import x, s
>>> inverse_mellin_transform(gamma(s), s, x, (0, oo))
exp(-x)

The fundamental strip matters:

>>> f = 1/(s**2 - 1)
>>> inverse_mellin_transform(f, s, x, (-oo, -1))
x*(1 - 1/x**2)*Heaviside(x - 1)/2
>>> inverse_mellin_transform(f, s, x, (-1, 1))
-x*Heaviside(1 - x)/2 - Heaviside(x - 1)/(2*x)
>>> inverse_mellin_transform(f, s, x, (1, oo))
(1/2 - x**2/2)*Heaviside(1 - x)/x

See Also
========

mellin_transform
hankel_transform, inverse_hankel_transform
r   )rX  r   )r   ri   rh   rQ  rj   s   &&&&,rD   inverse_mellin_transformrp  i  s*    j "!8U1X>CCLeLLrF   c                   \        W0,          \        V\        P                  ,          V,          V,          4      ,          V\        P                  \        P
                  34      pVP                  \        4      '       g   \        Wv4      \        P                  3# \        W\        P                  \        P
                  34      pV\        P                  \        P
                  \        P                  39   g   VP                  \        4      '       d   \        WPR4      hVP                  '       g   \        WPR4      hVP                  ^ ,          w  ryVP                  \        4      '       d   \        WPR4      h\        Wv4      V	3# )z
Compute a general Fourier-type transform

.. math::

    F(k) = a \int_{-\infty}^{\infty} e^{bixk} f(x)\, dx.

For suitable choice of *a* and *b*, this reduces to the standard Fourier
and inverse Fourier transforms.
z$function not integrable on real axisr   r   )r+   r   r   rl  r   r   r{   r,   r   r   NaNr:   r   rT   )
rg   rh   rD  r   r   rt   r   r   
integral_frv   s
   &&&&&&&   rD   _fourier_transformrt    s    	!#c!AOO+A-a/001a6H6H!**2UVA55??%qvv--1!"4"4ajjABJa((!**aee<<
x@X@X$T.TUU>>>$T.JKKffQiGAuuX$T.KLLQ!4''rF   c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	FourierTypeTransformi  z"Base class for Fourier transforms.c                :    \        R V P                  ,          4      hz,Class %s must implement a(self) but does notre   rC   rU   s   &rD   r   FourierTypeTransform.a      !:T^^KM 	MrF   c                :    \        R V P                  ,          4      hz,Class %s must implement b(self) but does notry  rU   s   &rD   r   FourierTypeTransform.b  r{  rF   c                    \        WVV P                  4       V P                  4       V P                  P                  3/ VB # rc   )rt  r   r   rC   r   r@   rg   rh   rD  rj   s   &&&&,rD   rk   'FourierTypeTransform._compute_transform  s<    !!"&&&(DFFH"&.."6"6A:?A 	ArF   c                
   V P                  4       pV P                  4       p\        WA,          \        V\        P
                  ,          V,          V,          4      ,          V\        P                  \        P                  34      # rc   )r   r   r,   r   r   rl  r   r   )r@   rg   rh   rD  r   r   s   &&&&  rD   rp   !FourierTypeTransform._as_integral  sX    FFHFFHC!// 1! 3A 566A<N<NPQPZPZ8[\\rF   r   NrG   rH   rI   rJ   rK   r   r   rk   rp   rL   rM   r   s   @rD   rv  rv    s&     -MMA
] ]rF   rv  c                   4   a  ] tR tRt o RtRtR tR tRtV t	R# )FourierTransformi  z
Class representing unevaluated Fourier transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute Fourier transforms, see the :func:`fourier_transform`
docstring.
Fourierc                    ^# r   r   rU   s   &rD   r   FourierTransform.a      rF   c                0    R\         P                  ,          # )rj  r   rm  rU   s   &rD   r   FourierTransform.b  s    !$$wrF   r   N
rG   rH   rI   rJ   rK   r   r   r   rL   rM   r   s   @rD   r  r    s       E rF   r  c                :    \        WV4      P                  ! R/ VB # )a"  
Compute the unitary, ordinary-frequency Fourier transform of ``f``, defined
as

.. math:: F(k) = \int_{-\infty}^\infty f(x) e^{-2\pi i x k} \mathrm{d} x.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`FourierTransform` object.

For other Fourier transform conventions, see the function
:func:`sympy.integrals.transforms._fourier_transform`.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import fourier_transform, exp
>>> from sympy.abc import x, k
>>> fourier_transform(exp(-x**2), x, k)
sqrt(pi)*exp(-pi**2*k**2)
>>> fourier_transform(exp(-x**2), x, k, noconds=False)
(sqrt(pi)*exp(-pi**2*k**2), True)

See Also
========

inverse_fourier_transform
sine_transform, inverse_sine_transform
cosine_transform, inverse_cosine_transform
hankel_transform, inverse_hankel_transform
mellin_transform, laplace_transform
r   )r  r   rg   rh   rD  rj   s   &&&,rD   fourier_transformr    s     N A!$))2E22rF   c                   4   a  ] tR tRt o RtRtR tR tRtV t	R# )InverseFourierTransformi  z
Class representing unevaluated inverse Fourier transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute inverse Fourier transforms, see the
:func:`inverse_fourier_transform` docstring.
zInverse Fourierc                    ^# r   r   rU   s   &rD   r   InverseFourierTransform.a#  r  rF   c                0    ^\         P                  ,          # ri  r  rU   s   &rD   r   InverseFourierTransform.b&  s    vrF   r   Nr  r   s   @rD   r  r    s       E rF   r  c                :    \        WV4      P                  ! R/ VB # )aF  
Compute the unitary, ordinary-frequency inverse Fourier transform of `F`,
defined as

.. math:: f(x) = \int_{-\infty}^\infty F(k) e^{2\pi i x k} \mathrm{d} k.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`InverseFourierTransform` object.

For other Fourier transform conventions, see the function
:func:`sympy.integrals.transforms._fourier_transform`.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import inverse_fourier_transform, exp, sqrt, pi
>>> from sympy.abc import x, k
>>> inverse_fourier_transform(sqrt(pi)*exp(-(pi*k)**2), k, x)
exp(-x**2)
>>> inverse_fourier_transform(sqrt(pi)*exp(-(pi*k)**2), k, x, noconds=False)
(exp(-x**2), True)

See Also
========

fourier_transform
sine_transform, inverse_sine_transform
cosine_transform, inverse_cosine_transform
hankel_transform, inverse_hankel_transform
mellin_transform, laplace_transform
r   )r  r   r   rD  rh   rj   s   &&&,rD   inverse_fourier_transformr  *  s     N #1+009599rF   c                   \        W0,          V! WA,          V,          4      ,          V\        P                  \        P                  34      pVP	                  \
        4      '       g   \        W4      \        P                  3# VP                  '       g   \        W`R4      hVP                  ^ ,          w  rVP	                  \
        4      '       d   \        W`R4      h\        W4      V	3# )z
Compute a general sine or cosine-type transform
    F(k) = a int_0^oo b*sin(x*k) f(x) dx.
    F(k) = a int_0^oo b*cos(x*k) f(x) dx.

For suitable choice of a and b, this reduces to the standard sine/cosine
and inverse sine/cosine transforms.
r   r   )r+   r   r   r   r{   r,   r   r   r   r:   rT   )
rg   rh   rD  r   r   Krt   r   r   rv   s
   &&&&&&&&  rD   _sine_cosine_transformr  X  s     	!#aAh,AFFAJJ 78A55??%qvv-->>>$T.JKKffQiGAuuX$T.KLLQ!4''rF   c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	SineCosineTypeTransformiq  z?
Base class for sine and cosine transforms.
Specify cls._kern.
c                :    \        R V P                  ,          4      hrx  ry  rU   s   &rD   r   SineCosineTypeTransform.aw  r{  rF   c                :    \        R V P                  ,          4      hr}  ry  rU   s   &rD   r   SineCosineTypeTransform.b{  r{  rF   c           	         \        WVV P                  4       V P                  4       V P                  P                  V P                  P
                  3/ VB # rc   )r  r   r   rC   _kernr   r  s   &&&&,rD   rk   *SineCosineTypeTransform._compute_transform  sL    %aA&*ffh&*nn&:&:&*nn&:&:E ?DE 	ErF   c                   V P                  4       pV P                  4       pV P                  P                  p\	        WA,          V! WR,          V,          4      ,          V\
        P                  \
        P                  34      # rc   )r   r   rC   r  r,   r   r   r   )r@   rg   rh   rD  r   r   r  s   &&&&   rD   rp   $SineCosineTypeTransform._as_integral  sS    FFHFFHNN  Aac!eHq!&&!**&=>>rF   r   Nr  r   s   @rD   r  r  q  s&     
MM
E? ?rF   r  c                   8   a  ] tR tRt o RtRt]tR tR t	Rt
V tR# )SineTransformi  z
Class representing unevaluated sine transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute sine transforms, see the :func:`sine_transform`
docstring.
Sinec                @    \        ^4      \        \        4      ,          # ri  r!   r   rU   s   &rD   r   SineTransform.a      AwtBxrF   c                "    \         P                  # rc   r   r  rU   s   &rD   r   SineTransform.b      uurF   r   NrG   rH   rI   rJ   rK   r   r%   r  r   r   rL   rM   r   s   @rD   r  r    s%      EE  rF   r  c                :    \        WV4      P                  ! R/ VB # )a  
Compute the unitary, ordinary-frequency sine transform of `f`, defined
as

.. math:: F(k) = \sqrt{\frac{2}{\pi}} \int_{0}^\infty f(x) \sin(2\pi x k) \mathrm{d} x.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`SineTransform` object.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import sine_transform, exp
>>> from sympy.abc import x, k, a
>>> sine_transform(x*exp(-a*x**2), x, k)
sqrt(2)*k*exp(-k**2/(4*a))/(4*a**(3/2))
>>> sine_transform(x**(-a), x, k)
2**(1/2 - a)*k**(a - 1)*gamma(1 - a/2)/gamma(a/2 + 1/2)

See Also
========

fourier_transform, inverse_fourier_transform
inverse_sine_transform
cosine_transform, inverse_cosine_transform
hankel_transform, inverse_hankel_transform
mellin_transform, laplace_transform
r   )r  r   r  s   &&&,rD   sine_transformr    s     H q!&&///rF   c                   8   a  ] tR tRt o RtRt]tR tR t	Rt
V tR# )InverseSineTransformi  z
Class representing unevaluated inverse sine transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute inverse sine transforms, see the
:func:`inverse_sine_transform` docstring.
zInverse Sinec                @    \        ^4      \        \        4      ,          # ri  r  rU   s   &rD   r   InverseSineTransform.a  r  rF   c                "    \         P                  # rc   r  rU   s   &rD   r   InverseSineTransform.b  r  rF   r   Nr  r   s   @rD   r  r    s%      EE  rF   r  c                :    \        WV4      P                  ! R/ VB # )a  
Compute the unitary, ordinary-frequency inverse sine transform of `F`,
defined as

.. math:: f(x) = \sqrt{\frac{2}{\pi}} \int_{0}^\infty F(k) \sin(2\pi x k) \mathrm{d} k.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`InverseSineTransform` object.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import inverse_sine_transform, exp, sqrt, gamma
>>> from sympy.abc import x, k, a
>>> inverse_sine_transform(2**((1-2*a)/2)*k**(a - 1)*
...     gamma(-a/2 + 1)/gamma((a+1)/2), k, x)
x**(-a)
>>> inverse_sine_transform(sqrt(2)*k*exp(-k**2/(4*a))/(4*sqrt(a)**3), k, x)
x*exp(-a*x**2)

See Also
========

fourier_transform, inverse_fourier_transform
sine_transform
cosine_transform, inverse_cosine_transform
hankel_transform, inverse_hankel_transform
mellin_transform, laplace_transform
r   )r  r   r  s   &&&,rD   inverse_sine_transformr    s     J  a(--666rF   c                   8   a  ] tR tRt o RtRt]tR tR t	Rt
V tR# )CosineTransformi  z
Class representing unevaluated cosine transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute cosine transforms, see the :func:`cosine_transform`
docstring.
Cosinec                @    \        ^4      \        \        4      ,          # ri  r  rU   s   &rD   r   CosineTransform.a  r  rF   c                "    \         P                  # rc   r  rU   s   &rD   r   CosineTransform.b  r  rF   r   NrG   rH   rI   rJ   rK   r   r#   r  r   r   rL   rM   r   s   @rD   r  r    s%      EE  rF   r  c                :    \        WV4      P                  ! R/ VB # )a  
Compute the unitary, ordinary-frequency cosine transform of `f`, defined
as

.. math:: F(k) = \sqrt{\frac{2}{\pi}} \int_{0}^\infty f(x) \cos(2\pi x k) \mathrm{d} x.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`CosineTransform` object.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import cosine_transform, exp, sqrt, cos
>>> from sympy.abc import x, k, a
>>> cosine_transform(exp(-a*x), x, k)
sqrt(2)*a/(sqrt(pi)*(a**2 + k**2))
>>> cosine_transform(exp(-a*sqrt(x))*cos(a*sqrt(x)), x, k)
a*exp(-a**2/(2*k))/(2*k**(3/2))

See Also
========

fourier_transform, inverse_fourier_transform,
sine_transform, inverse_sine_transform
inverse_cosine_transform
hankel_transform, inverse_hankel_transform
mellin_transform, laplace_transform
r   )r  r   r  s   &&&,rD   cosine_transformr    s     H 1#((1511rF   c                   8   a  ] tR tRt o RtRt]tR tR t	Rt
V tR# )InverseCosineTransformi?  z
Class representing unevaluated inverse cosine transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute inverse cosine transforms, see the
:func:`inverse_cosine_transform` docstring.
zInverse Cosinec                @    \        ^4      \        \        4      ,          # ri  r  rU   s   &rD   r   InverseCosineTransform.aL  r  rF   c                "    \         P                  # rc   r  rU   s   &rD   r   InverseCosineTransform.bO  r  rF   r   Nr  r   s   @rD   r  r  ?  s%      EE  rF   r  c                :    \        WV4      P                  ! R/ VB # )a  
Compute the unitary, ordinary-frequency inverse cosine transform of `F`,
defined as

.. math:: f(x) = \sqrt{\frac{2}{\pi}} \int_{0}^\infty F(k) \cos(2\pi x k) \mathrm{d} k.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`InverseCosineTransform` object.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import inverse_cosine_transform, sqrt, pi
>>> from sympy.abc import x, k, a
>>> inverse_cosine_transform(sqrt(2)*a/(sqrt(pi)*(a**2 + k**2)), k, x)
exp(-a*x)
>>> inverse_cosine_transform(1/sqrt(k), k, x)
1/sqrt(x)

See Also
========

fourier_transform, inverse_fourier_transform,
sine_transform, inverse_sine_transform
cosine_transform
hankel_transform, inverse_hankel_transform
mellin_transform, laplace_transform
r   )r  r   r  s   &&&,rD   inverse_cosine_transformr  S  s     H "!*//8%88rF   c                   \        V \        W2V,          4      ,          V,          V\        P                  \        P                  34      pVP                  \        4      '       g   \        We4      \        P                  3# VP                  '       g   \        W@R4      hVP                  ^ ,          w  rgVP                  \        4      '       d   \        W@R4      h\        We4      V3# )zj
Compute a general Hankel transform

.. math:: F_\nu(k) = \int_{0}^\infty f(r) J_\nu(k r) r \mathrm{d} r.
r   r   )r+   r'   r   r   r   r{   r,   r   r   r   r:   rT   )rg   r   rD  rO  rt   r   r   rv   s   &&&&&&  rD   _hankel_transformr  ~  s     	!GB!$$Q&AFFAJJ(?@A55??%qvv-->>>$T.JKKffQiGAuuX$T.KLLQ!4''rF   c                   F   a  ] tR tRt o RtR tR tR t]R 4       t	Rt
V tR# )	HankelTypeTransformi  z#
Base class for Hankel transforms.
c                    V P                   ! V P                  V P                  V P                  V P                  ^,          3/ VB # ra  )rk   r?   rY   r\   rT   )r@   rj   s   &,rD   r   HankelTypeTransform.doit  sB    &&t}}'+'='='+'>'>'+yy|0 */	0 	0rF   c                2    \        WW4V P                  3/ VB # rc   )r  r   )r@   rg   r   rD  rO  rj   s   &&&&&,rD   rk   &HankelTypeTransform._compute_transform  s     qdjjBEBBrF   c                    \        V\        WCV,          4      ,          V,          V\        P                  \        P                  34      # rc   )r,   r'   r   r   r   )r@   rg   r   rD  rO  s   &&&&&rD   rp    HankelTypeTransform._as_integral  s1    '"c**1,q!&&!**.EFFrF   c                    V P                  V P                  V P                  V P                  V P                  ^,          4      # r  )rp   r?   rY   r\   rT   rU   s   &rD   r   HankelTypeTransform.as_integral  s8      !%!7!7!%!8!8!%1/ 	/rF   r   N)rG   rH   rI   rJ   rK   r   rk   rp   r   r   rL   rM   r   s   @rD   r  r    s/     0CG / /rF   r  c                       ] tR tRtRtRtRtR# )HankelTransformi  z
Class representing unevaluated Hankel transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute Hankel transforms, see the :func:`hankel_transform`
docstring.
Hankelr   NrG   rH   rI   rJ   rK   r   rL   r   rF   rD   r  r    s     ErF   r  c                :    \        WW#4      P                  ! R/ VB # )aY  
Compute the Hankel transform of `f`, defined as

.. math:: F_\nu(k) = \int_{0}^\infty f(r) J_\nu(k r) r \mathrm{d} r.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`HankelTransform` object.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import hankel_transform, inverse_hankel_transform
>>> from sympy import exp
>>> from sympy.abc import r, k, m, nu, a

>>> ht = hankel_transform(1/r**m, r, k, nu)
>>> ht
2*k**(m - 2)*gamma(-m/2 + nu/2 + 1)/(2**m*gamma(m/2 + nu/2))

>>> inverse_hankel_transform(ht, k, r, nu)
r**(-m)

>>> ht = hankel_transform(exp(-a*r), r, k, 0)
>>> ht
a/(k**3*(a**2/k**2 + 1)**(3/2))

>>> inverse_hankel_transform(ht, k, r, 0)
exp(-a*r)

See Also
========

fourier_transform, inverse_fourier_transform
sine_transform, inverse_sine_transform
cosine_transform, inverse_cosine_transform
inverse_hankel_transform
mellin_transform, laplace_transform
r   )r  r   )rg   r   rD  rO  rj   s   &&&&,rD   hankel_transformr    s     \ 1',,5u55rF   c                       ] tR tRtRtRtRtR# )InverseHankelTransformi  z
Class representing unevaluated inverse Hankel transforms.

For usage of this class, see the :class:`IntegralTransform` docstring.

For how to compute inverse Hankel transforms, see the
:func:`inverse_hankel_transform` docstring.
zInverse Hankelr   Nr  r   rF   rD   r  r    s     ErF   r  c                :    \        WW#4      P                  ! R/ VB # )a_  
Compute the inverse Hankel transform of `F` defined as

.. math:: f(r) = \int_{0}^\infty F_\nu(k) J_\nu(k r) k \mathrm{d} k.

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

If the transform cannot be computed in closed form, this
function returns an unevaluated :class:`InverseHankelTransform` object.

For a description of possible hints, refer to the docstring of
:func:`sympy.integrals.transforms.IntegralTransform.doit`.
Note that for this transform, by default ``noconds=True``.

Examples
========

>>> from sympy import hankel_transform, inverse_hankel_transform
>>> from sympy import exp
>>> from sympy.abc import r, k, m, nu, a

>>> ht = hankel_transform(1/r**m, r, k, nu)
>>> ht
2*k**(m - 2)*gamma(-m/2 + nu/2 + 1)/(2**m*gamma(m/2 + nu/2))

>>> inverse_hankel_transform(ht, k, r, nu)
r**(-m)

>>> ht = hankel_transform(exp(-a*r), r, k, 0)
>>> ht
a/(k**3*(a**2/k**2 + 1)**(3/2))

>>> inverse_hankel_transform(ht, k, r, 0)
exp(-a*r)

See Also
========

fourier_transform, inverse_fourier_transform
sine_transform, inverse_sine_transform
cosine_transform, inverse_cosine_transform
hankel_transform
mellin_transform, laplace_transform
r   )r  r   )r   rD  r   rO  rj   s   &&&&,rD   inverse_hankel_transformr    s     \ "!.33<e<<rF   )F)T)rK   	functoolsr   r   	itertoolsr   
sympy.corer   r   sympy.core.addr   sympy.core.functionr   r	   r
   r   r   sympy.core.mulr   sympy.core.intfuncr   r   sympy.core.sortingr   sympy.core.symbolr   sympy.core.traversalr   (sympy.functions.combinatorial.factorialsr   r   $sympy.functions.elementary.complexesr   r   r   &sympy.functions.elementary.exponentialr   r   %sympy.functions.elementary.hyperbolicr   r   r   r   #sympy.functions.elementary.integersr   (sympy.functions.elementary.miscellaneousr   r    r!   $sympy.functions.elementary.piecewiser"   (sympy.functions.elementary.trigonometricr#   r$   r%   r&   sympy.functions.special.besselr'   'sympy.functions.special.delta_functionsr(   'sympy.functions.special.gamma_functionsr)   sympy.functions.special.hyperr*   sympy.integralsr+   r,   sympy.integrals.meijerintr-   sympy.logic.boolalgr.   r/   r0   r1   r2   sympy.polys.polyrootsr3   sympy.polys.polytoolsr4   r5   sympy.polys.rootoftoolsr6   sympy.utilities.iterablesr7   sympy.utilities.miscr8   re   r:   rQ   r   r   _nocondsr   r   r   r   r   rL  r   rE  rK  re  rX  rp  rt  rv  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  sympy.integrals.laplace	integralslaplace_laplaceLaplaceTransformlaplace_transformlaplace_correspondencelaplace_initial_condsInverseLaplaceTransforminverse_laplace_transformr   rF   rD   <module>r     s    #   ; ;  ) / # 4 B = = A H H 7 C C ? G G 2 = 9 1 / , E E ' . + . &!0 !(Y  Y x6 U1 
+> A; 
A;H' B)2X*BZ	
 	h2V	 48: 8:t 1Z. 1Zh5Mx 4( (<], ],+ &'3T2 &':\ 4( (0?/ ?8+ ($0N2 (%7P- ($2N4 ($9V 4( (*/+ /4
) 
.6b
0 
.=l + *,, .. !88  66 ":: $>> rF   