y= var('y')
A(x,y)= (x*y+y**2+x**2+x*y)
print('A=',A)
B(x,y)=((x+y)**2)
print('B=',B)
x=3
y=2
print('With variables defined, A=',A(3,2))
print('With variables defined, B=',B(3,2))
F(x)= (x*x+x**2+x**2+x*x)
print('F=', F)
p1=plot(F,-100,100, ymin=-2,ymax=100,gridlines='major')
p1.show()
print('the area maximum is infinite')
Q=(8-x**2)
print('Q=',Q)
p2=plot(Q, -5,5, ymin=-5,ymax=5,gridlines='major')
p2.show()
print('the roots of the function are 2.8 and -2.8')
T(x)=(1/4*x+3/4)
print('T=',T)
p3=plot(T, -5,5, ymin=-5,ymax=5,gridlines='major')
S(x)=(3-2*x)
print('S=',S)
p4=plot(S, -5,5, ymin=-5,ymax=5,gridlines='major')
show(p3+p4)
print('The solution is (1,1)')
A= (x, y) |--> x^2 + 2*x*y + y^2
B= (x, y) |--> (x + y)^2
With variables defined, A= 25
With variables defined, B= 25
F= x |--> 4*x^2

the area maximum is infinite
Q= -x^2 + 8

the roots of the function are 2.8 and -2.8
T= x |--> 1/4*x + 3/4
S= x |--> -2*x + 3

The solution is (1,1)