| Server IP : 93.86.61.54 / Your IP : 216.73.216.206 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
�8VaY) � @ sz d Z ddlmZmZmZmZmZmZmZm Z m
Z
mZmZ ddl
mZmZmZ dd� Zdd� Zdd d
�Zdd� Zd
d� ZdS )zAThis module implements tools for integrating rational functions. � )�S�Symbol�symbols�I�log�atan�roots�RootSum�Lambda�cancel�Dummy)�Poly� resultant�ZZc
K s* t | �tur
| �� \}}n| \}}t||ddd�t||ddd�}}|�|�\}}}|�|�\}}|�|��� }|jr?|| S t |||�\}} | �� \}
}t|
|�}
t||�}|
�|�\}}|||�|��� 7 }|j�s|�
dd�}
t|
t�s}t
|
�}n|
�� }t||||�}|�
d�}|du r�t | �tur�| �� }n| \}}|�� |�� B }||h D ] }|js�d} nq�d}tj}|s�|D ]\} }| �� \}} |t|t||t| �� � �dd�7 }q�n/|D ],\} }| �� \}} t| |||�}|dur�||7 }q�|t|t||t| �� � �dd�7 }q�||7 }|| S ) aa
Performs indefinite integration of rational functions.
Explanation
===========
Given a field :math:`K` and a rational function :math:`f = p/q`,
where :math:`p` and :math:`q` are polynomials in :math:`K[x]`,
returns a function :math:`g` such that :math:`f = g'`.
Examples
========
>>> from sympy.integrals.rationaltools import ratint
>>> from sympy.abc import x
>>> ratint(36/(x**5 - 2*x**4 - 2*x**3 + 4*x**2 + x - 2), x)
(12*x + 6)/(x**2 - 1) + 4*log(x - 2) - 4*log(x + 1)
References
==========
.. [1] M. Bronstein, Symbolic Integration I: Transcendental
Functions, Second Edition, Springer-Verlag, 2005, pp. 35-70
See Also
========
sympy.integrals.integrals.Integral.doit
sympy.integrals.rationaltools.ratint_logpart
sympy.integrals.rationaltools.ratint_ratpart
FT)� composite�field�symbol�t�realN)� quadratic)�type�tuple�as_numer_denomr
r �div� integrate�as_expr�is_zero�ratint_ratpart�get�
isinstancer r �as_dummy�ratint_logpart�atoms�is_extended_realr �Zero� primitiver r
r �log_to_real)�f�x�flags�p�q�coeff�poly�result�g�h�P�Q�rr r �Lr r"