I need to divide a polynomial by a polynomial in NumPy. For this I use numpy.polydiv but in the example of the documentation of polynomials with only one variable. And I need to divide polynomials with three variables. Please tell me how to do it.
For example: x^3 + y^3 + z^3 divided by x^ 2 + z
I suggest you use sympy, which allows for basic symbolic manipulation. In your example x^3 + y^3 + z^3 is not divisible by x^ 2 + z, so nothing will help you there! But, with a simple example like, x**2 - y**2 divided by x - y, we can see sympy in action:
>>> import sympy
>>> x, y = sympy.symbols('x y')
>>> sympy.simplify((x**2 - y**2) / (x - y))
x + y
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With