Given,
f:R−2,6→R be real valued function defined as f(x)=x2−8x+12x+2x+1
Now let, y=x2−8x+12x2+2x+1=(x−2)(x−6)(x+1)2…(1)
Now differentiating the above function we get,
⇒dxdy=(x−2)2(x−6)2−2(x+1)(5x−16)
Now by wavy curve method we get,

So Graph of y=(x−2)(x−6)(x+1)2 for given domain will be,

So, from graph range is y∈(−∞,421]∪[0,∞)