You can use a substitution, then solve the problem like a regular polynomial.
#tan^2x-tanx=0#
#(tanx)^2-tanx=0#
Now, let #u=tanx#:
#u^2-u=0#
#u(u-1)=0#
#u=0,1#
Plug #tanx# back in for #u#:
#tanx=0,tanx=1#
We know that #tanx# is #sinx/cosx#, so we can use that and solve each equation independently:
#color(white){color(black)(
(sinx/cosx=0,qquadsinx/cosx=1),
(sinx=0,qquadsinx=cosx),
(x=0", "pi", "2pi", "3pi..., qquad???):}#
To figure out when #sinx# equals #cosx#, we can look at a unit circle:
We can see that #sinx=cosx# when the angle is #pi/4,(5pi)/4,(9pi)/4...#
To write the general expression for #0,pi,2pi,3pi...# we can use the letter #k# (or #n#, depending on the person) to represent "any integer".
This pattern would be #x=pik#, because #sinx=0# when #x# is any multiple of #pi#.
The other pattern (#pi/4#, #(5pi)/4#, #(9pi)/4#...) can be rewritten as #pi/4+0pi,pi/4+1pi,pi/4+2pi...#. Now we can write a general expression for this using #k#: #x=pi/4+pik#
This means that the final solutions are:
#x=pik, qquadpi/4+pik#
Hope this helped!