File size: 306 Bytes
e8c0a63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sympy as sp

# Define the variable
x = sp.symbols('x')

# Define the polynomials
poly1 = 2*x + 3
poly2 = 3*x

# Sum the polynomials
sum_poly = poly1 + poly2

# Simplify the resulting polynomial
simplified_sum_poly = sp.simplify(sum_poly)

# Print the simplified polynomial
print(simplified_sum_poly)