Sunday, October 5, 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
32337 POSTS0 COMMENTS
Milvus
86 POSTS0 COMMENTS
Nango Kala
6706 POSTS0 COMMENTS
Nicole Veronica
11871 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11934 POSTS0 COMMENTS
Shaida Kate Naidoo
6822 POSTS0 COMMENTS
Ted Musemwa
7089 POSTS0 COMMENTS
Thapelo Manthata
6779 POSTS0 COMMENTS
Umr Jansen
6779 POSTS0 COMMENTS