因数分解一問目
1 2 3 4 5 |
import sympy x,y,z,a,b = sympy.symbols('x,y,z,a,b') A4 = 2*b*x**2-4*b*x-16*b sympy.factor(A4) |
OUT:
1 |
2*b*(x - 4)*(x + 2) |
因数分解二問目
1 2 |
A5 = 5*a*x**2-45*a sympy.factor(A5) |
OUT:
1 |
5*a*(x - 3)*(x + 3) |