How do you factor and simplify #3cot^2x+6cotx+3#?