What is the domain and range of #f(x)=(x^2-x+1)/(x^2+x+1)#?

2 Answers
Nov 23, 2017

Domain is #RR# and range is#[1/3,3]#

Explanation:

As #x^2+x+1=(x^2+2xx x xx1/2+1/4)+3/4#

= #(x+1/2)^2+3/4#

the denominator #x^2+x+1>0,AAx inRR#

Hence, domain is #RR#

Further #f(x)=(x^2-x+1)/(x^2+x+1)#

= #(x^2+x+1-2x)/(x^2+x+1)#

= #1-(2x)/(x^2+x+1)=1-(2/x)/(1+1/x+1/x^2)#

Hence at #x=0#, #f(x)=1# and also as #x->+-oo#, #f(x)->1#

Further #(df)/(dx)=0#, when

#(x^2+x+1)d/(dx)(x^2-x+1)-(x^2-x+1)d/(dx)(x^2+x+1)=0#

or #(x^2+x+1)(2x-1)-(x^2-x+1)(2x+1)=0#

or #2x^2-2=0# i.e. #x=+-1#

annd at #x=1#, #f(x)=1/3# and at #x=-1#, #f(x)=3#

Hence range is #[1/3,3]#

graph{(x^2+x+1-2x)/(x^2+x+1) [-5, 5, -0.5, 4.5]}

Nov 23, 2017

The domain is #x in RR#
The range is #y in [1/3,3]#

Explanation:

The function is #f(x)=(x^2-x+1)/(x^2+x+1)#

The discriminant of the denominator is

#Delta=1^2-4*1*1=-3#

As the discriminant is #>0#, #x^2+x+1>0#

Therefore,

The domain is #x in RR#

Proceed as follows to determine the range

Let #y=(x^2-x+1)/(x^2+x+1)#

#y(x^2+x+1)=x^2-x+1#

#x^2(y-1)-x(y+1)+(y-1)=0#

This is a quadratic equation in #x^2#, and in order for this equation to have solutions, the discriminant must be #>=0#

#Delta=(-(y+1))^2-4(y-1)(y-1)>=0#

#y^2+2y+1-4y^2+8y-4>=0#

#-3y^2+10y-3>=0#

#y_1=(-10+sqrt(100-4*(-3)(-3)))/(-6)=(-10+8)/(-6)=1/3#

#y_2=(-10-sqrt(100-4*(-3)(-3)))/(-6)=(-10-8)/(-6)=3#

As the coefficient of #y^2# is #>0#, the range is

#y in [1/3,3]#

graph{(x^2-x+1)/(x^2+x+1) [-6.474, 6.013, -2.12, 4.12]}