| Server IP : 93.86.61.54 / Your IP : 216.73.216.156 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/sympy/integrals/__pycache__/ |
Upload File : |
o
�8Va � @ s4 d dl mZmZ d dlmZ d dlmZ dd� ZdS )� )�SingularityFunction�
DiracDelta)�sympify)� integratec C s� | � t�sdS | jtkrCt| jd �}t| jd �}t| jd �}|js'|jr3t|||d �|d S |dks;|dkrCt|||d �S | jsI| jrX| � t
�}t||�}|� t�S dS )aI
This function handles the indefinite integrations of Singularity functions.
The ``integrate`` function calls this function internally whenever an
instance of SingularityFunction is passed as argument.
Explanation
===========
The idea for integration is the following:
- If we are dealing with a SingularityFunction expression,
i.e. ``SingularityFunction(x, a, n)``, we just return
``SingularityFunction(x, a, n + 1)/(n + 1)`` if ``n >= 0`` and
``SingularityFunction(x, a, n + 1)`` if ``n < 0``.
- If the node is a multiplication or power node having a
SingularityFunction term we rewrite the whole expression in terms of
Heaviside and DiracDelta and then integrate the output. Lastly, we
rewrite the output of integration back in terms of SingularityFunction.
- If none of the above case arises, we return None.
Examples
========
>>> from sympy.integrals.singularityfunctions import singularityintegrate
>>> from sympy import SingularityFunction, symbols, Function
>>> x, a, n, y = symbols('x a n y')
>>> f = Function('f')
>>> singularityintegrate(SingularityFunction(x, a, 3), x)
SingularityFunction(x, a, 4)/4
>>> singularityintegrate(5*SingularityFunction(x, 5, -2), x)
5*SingularityFunction(x, 5, -1)
>>> singularityintegrate(6*SingularityFunction(x, 5, -1), x)
6*SingularityFunction(x, 5, 0)
>>> singularityintegrate(x*SingularityFunction(x, 0, -1), x)
0
>>> singularityintegrate(SingularityFunction(x, 1, -1) * f(x), x)
f(1)*SingularityFunction(x, 1, 0)
Nr � � ������)�hasr �funcr �args�is_positive�is_zero�is_Mul�is_Pow�rewriter r )�f�x�a�n�expr� r �F/usr/lib/python3/dist-packages/sympy/integrals/singularityfunctions.py�singularityintegrate s
+
r N)�sympy.functionsr r �
sympy.corer �sympy.integralsr r r r r r �<module> s