# 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’))]

My Personal Notes arrow_drop_up Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.