LoginSignup
0
0

More than 1 year has passed since last update.

整式のわり算「22年 琉球大 教育・農・国 1(3)」をsympy でやってみた。

Last updated at Posted at 2022-07-11

オリジナル

sympyで

# from sympy import *
var('x a b')
ans=prem(x**4+a*x**2-2*x+3,x**2+x+b)
print("#",solve([ans.coeff(x, 0),ans.coeff(x, 1)],[a,b]))
# [(-5, -1), (3, 3)]

参考

sympy.polys.polytools.prem(f, g, *gens, **args)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0