Question: i want to just modify my code so that it performs multivariate polynomial division, the main problem is in ig in while loop, its infinite:
i want to just modify my code so that it performs multivariate polynomial division, the main problem is in ig in while loop, its infinite: from sympy import symbols, degree, LC expand
def funf g var symbolsx y Order'lex':
x y var
r f
q
while degreer genx degreeg genx and degreer geny degreeg geny:
LTrxy LCr x y
LTgxy LCg x y
TempQ LTrxy LTgxy xdegreer genx degreeg genx ydegreer geny degreeg geny
q TempQ
r r TempQ gexpand
return q r
x y symbolsx y
f x yxy
g x y
quotient, remainder funf gx y
printfQuotient: quotient
printfRemainder: remainder
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
