HomeLanguagessympy.integrals.rationaltools.ratint_ratpart() in python

sympy.integrals.rationaltools.ratint_ratpart() in python

With the help of ratint_ratpart() method, we can implement the Horowitz Ostrogradsky algorithm and it will return the fractions A and B by using this method.

Syntax : ratint_ratpart(f, g, x)

Return : Return the fraction A and B.

Example #1 :

In this example we can see that by using ratint_ratpart() method, we are able to compute the rational integration using Horowitz Ostrogradsky algorithm and return the fractions A and B.

Python3




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


Output :

(0, 5/(x**4 + 1))

Example #2 :

Python3




# import ratint_ratpart
from sympy.integrals.rationaltools import ratint_ratpart
from sympy.abc import x, y
from sympy import Poly
  
# Using ratint_ratpart() method
gfg = ratint_ratpart(Poly(13, x, domain='ZZ'), Poly(4*x**2 + x - 2, x, domain='ZZ'), x)
  
print(gfg)


Output :

(0, 13/(4*x**2 + x – 2))

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

Most Popular

Dominic
32688 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
7057 POSTS0 COMMENTS
Nicole Veronica
12198 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12293 POSTS0 COMMENTS
Shaida Kate Naidoo
7182 POSTS0 COMMENTS
Ted Musemwa
7447 POSTS0 COMMENTS
Thapelo Manthata
7160 POSTS0 COMMENTS
Umr Jansen
7150 POSTS0 COMMENTS