If f:R -- R given by f(x) = x2 +3x+1 and g:R-- R given by g(x) = 2x-3.Find gof and fog.
f(x)=x2+3x+1
g(x)=2x-3
gof=g(f(x))=g(x2+3x+1)=2(x2+3x+1)-3=2x2+6x+2-3=2x2+6x-1
fog=f(g(x))=f(2x-3)=(2x-3)2+3(2x-3)+1
=4x2+9-12x+6x-9+1
=4x2-6x+1
g(x)=2x-3
gof=g(f(x))=g(x2+3x+1)=2(x2+3x+1)-3=2x2+6x+2-3=2x2+6x-1
fog=f(g(x))=f(2x-3)=(2x-3)2+3(2x-3)+1
=4x2+9-12x+6x-9+1
=4x2-6x+1