f(x)=x^2;
g(x)=x-2
h(x)=g(f(x))
i(x)=f(g(x))
print('gof(x)=', h(x))
print('fog(x)=',i(x))
s(x)= x^2-5*x
t(x)= 7*x-2
l(x)=t(s(x))
m(x)=s(t(x))
print('sot(x)=', l(x))
print('tos(x)=',m(x))
print('the sum of s(x) and t(x)=',s(x)+t(x))
print('the difference of s(x) and t(x)=',s(x)-t(x))
print('the product of f(x) and g(x)=',f(x)*g(x))
print('the product of f(x) and g(x) simplified=',expand(f(x)*g(x)))
print('the quotient of f(x) and g(x)=',f(x)/g(x))
n(x)= x^2+7*x-3
print(factor(n(x)))
w(x)=x^2-8*x+15
print(factor(w(x)))
print('greatest common denominator is',gcd(s(x),t(x)))
theta=var('theta')
solve(x^2-5*x+6==0,x)
solve(x^2+x+1==0,x)
solve(2*sin(theta)==-1,theta)
solve(9+x^2+6*x+1==0,x)
solve(arccos(theta)==0,theta)
solve(4*x^3+8*x^2-3*x==0,x)
gof(x)= x^2 - 2
fog(x)= (x - 2)^2
sot(x)= 7*x^2 - 35*x - 2
tos(x)= (7*x - 2)^2 - 35*x + 10
the sum of s(x) and t(x)= x^2 + 2*x - 2
the difference of s(x) and t(x)= x^2 - 12*x + 2
the product of f(x) and g(x)= (x - 2)*x^2
the product of f(x) and g(x) simplified= x^3 - 2*x^2
the quotient of f(x) and g(x)= x^2/(x - 2)
x^2 + 7*x - 3
(x - 3)*(x - 5)
greatest common denominator is 1
[x == 3, x == 2]
[x == -1/2*I*sqrt(3) - 1/2, x == 1/2*I*sqrt(3) - 1/2]
[theta == -1/6*pi]
[x == (-I - 3), x == (I - 3)]
[theta == 1]
[x == -1/2*sqrt(7) - 1, x == 1/2*sqrt(7) - 1, x == 0]