Intuition for the "Wavy Curve" method for Rational Inequalities I am studying inequalities and I saw this method by the name of Wavy Curve method. Since it was listed as an algorithm, I wanted to know its mathematical formulation. I could only see two part of this algorithm intuitively. I don't know how to go about proving and intuitively understanding the third part.

  
*
  
*Find the critical points of the inequality( in the form $f(x) \{\gt,\ge,\lt,\le\}0$ ) namely points where $f(x)$ is either undefined or where it equals $0$.
  
*Plot these points on the number line and start with a positive sign on the rightmost sub-interval.
  
*Change signs in case of while crossing roots of odd multiplicity but not in case of roots with even multiplicity.
  

Now clearly the first (and second) points make sense. I intuitively understand as follows: 

Consider $$f(x)=\prod_{i=1}^{n}\dfrac{(x-\alpha_i)^{a_i}}{(x-\beta_i)^{b_i}}\implies \text{critical points}=\{\alpha_i\}_{i=1}^{n}\cup\{\beta_i\}_{i=1}^{n}$$
WLOG let $\alpha_i \gt \beta_i \ \forall \ i\in \mathbb{Z^+}\setminus \{0\}$. This means when we plot the critical points on the number line in increasing order and put in any value of $x\gt\alpha_n$ (where $\alpha_n$ is the largest of the critical points) automatically all terms in the rational function become positive and thus the positive $+$ sign. 

I get the first and second points but I would be grateful if I could get intuition about the reason of the third. Also a mathematical proof using calculus techniques would suffice in making me understand. Thanks
 A: The multiplicity of a root or pole at $\alpha$ is the exponent of $(x-\alpha)$ in the factorization of the numerator or denominator of $f$, when expressed in lowest terms. This means that $$f(x) = g(x)(x - \alpha)^k$$ where $|k|$ is the multiplicity, $k < 0$ for a pole and $k > 0$ for a root, and $g(x)$ is a rational function with $g(\alpha)$ finite and non-zero.
Near $\alpha, g(x)$ doesn't change sign - by continuity, it stays near the non-zero value $g(\alpha)$, so how $f(x)$ changes sign depends entirely on $(x - \alpha)^k$. But


*

*When $k$ is even, $(x - \alpha)^k$ is positive on both sides of $\alpha$.

*When $k$ is odd, $(x - \alpha)^k$ is negative for $x < \alpha$ and positive when $x > \alpha$.


Thus $f(x)$ will not change signs at $\alpha$ when $k$ is even, but will change signs when $k$ is odd.
Essentially, $f(x)$ changes sign at each root or pole, but when multiple roots or poles occur at the same place, it changes sign once for each of them, so whether it leaves in the same or opposite direction from which it came depends on how many roots or poles are at that point.
