I can understand why it happens in simple cases like x^2 and x^3
In x^2 whether the x values are +ve or -ve the the function will always give a +ve value because g gets squared
Root 0 with multiplicity 2 only touches thr graph
In x^3, when x values are +ve the function will give +ve values and when the x values are -ve the function will give -ve values Cause cubes of +ve are +ve and cubes of -ve are negative Therefore the root 0 with multiplicity 3 cut through the graph
But I don’t understand why that happens in more completed cases where there are at least 2 distinct roots
Like
(X - 1)(X-1)(X-3)
(X + 2)(X-3)(X -3)(X-3)
Could someone please explain why even and odd multiplicities act the way they do in the 2 examples given above
Suppose $r$ is a root of polynomial $p(x)$. Then you can factor $$ p(x) = (x-r)^mq(x) $$ where $m$ is the multiplicity of the root and $q(r) \ne 0$. The polynomial $q(x)$ has all the other roots of $p(x)$ but we don't care what they are.
Then when $x$ is near $r$ you know $q(x) \ne 0$ and has the same sign.
If $m$ is even then $(x-r)^m$ is positive on both sides of $r$ so the graph does not cross the $x$-axis there. If $m$ is odd then $(x-r)^m$ changes sign and the graph crosses the axis. (In either case the $x$ axis is a tangent - even when it crosses the graph.)