Friday, November 21, 2025
HomeLanguagessympy.integrals.rationaltools.ratint_logpart() in python

sympy.integrals.rationaltools.ratint_logpart() in python

With the help of ratint_logpart() method, we can integrate the indefinite rational function by implementing Lazard Rioboo Trager algorithm by using this method and returns the integrated polynomial.

Syntax : ratint_logpart(f, g, x, t=None)

Return : Return the integrated function.

Example #1 :

In this example we can see that by using ratint_logpart() method, we are able to compute the indefinite rational integration using Lazard Rioboo Trager algorithm.

Python3




# import ratint_logpart
from sympy.integrals.rationaltools import ratint_logpart
from sympy.abc import x
from sympy import Poly
  
# Using ratint_logpart() method
gfg = ratint_logpart(Poly(1, x, domain='ZZ'), 
                     Poly(x*2 + x + 1, x, domain='ZZ'), x)
  
print(gfg)


Output :

[(Poly(3*x + 1, x, domain=’ZZ’), Poly(-3*_t + 1, _t, domain=’ZZ’))]

Example #2 :

Python3




# import ratint_logpart
from sympy.integrals.rationaltools import ratint_logpart
from sympy.abc import x, y
from sympy import Poly
  
# Using ratint_logpart() method
gfg = ratint_logpart(Poly(10, y, domain='ZZ'), 
               Poly(y**2 - 3*y - 2, y, domain='ZZ'), y)
  
print(gfg)


Output :

[(Poly(y – 17*_t/20 – 3/2, y, domain=’QQ[_t]’), Poly(-17*_t**2 + 100, _t, domain=’ZZ’))]

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32405 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6781 POSTS0 COMMENTS
Nicole Veronica
11928 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11995 POSTS0 COMMENTS
Shaida Kate Naidoo
6907 POSTS0 COMMENTS
Ted Musemwa
7166 POSTS0 COMMENTS
Thapelo Manthata
6862 POSTS0 COMMENTS
Umr Jansen
6847 POSTS0 COMMENTS