So, I had to solve this problem: $\left\vert \dfrac{x^2-5x+4}{x^2-4}\right\vert \leq 1$
I factored it in the form: $\left\vert \dfrac{(x-4)(x-1)}{(x-2)(x+2)} \right\vert \leq 1$.
After that I found the intervals in which the expression is positive: $x \in(-\infty, -2) \cup [1,2)\cup[4, \infty) $. And when expression is negative: $x \in (-2,1) \cup(2,4) $.
So, then I went ahead and solved the equations, when the expression is positive and when it's negative. The answer I got for positive is: $ x \in (-2,8/5] \cup(2, \infty).$ I'm not sure how to proceed from here, I figured that I'd find the intersection of the answer I got (when solved for positive expression) and when x is positive. But that doesn't seem to be the correct way to proceed. Since my answer is way off.
I've tried searching how to solve these kinds of problems, but couldn't find anything close to this. So I'd really like to know how to solve this problem and how to approach problems like these in general. I really lack intuition and would like to understand it more. I'd also appreciate any textbook / information about how to solve more complex problems in general.
I can think of two methods to solve these kinds of equations, so I'll write them both down and you can see which you prefer. The first is a lot more algebraic, the second you can argue is more geometric. It may also not fly in your class, depending on the syllabus and professor.
First, we have $-1\leq\frac{x^2-5x+4}{x^2-4}\leq 1$, so we've gotten rid of the absolute value. If this was an equation rather than two inequalities we'd definitely want to multiply by the denominator, and here is no different. The problem is we don't know if the denominator is positive or negative. So we first assume $x^2-4=(x-2)(x+2)>0$. Then multiplying by the denominator gives us \begin{align*} &\left\{\begin{array}{ll}-x^2+4\leq x^2-5x+4,\\ x^2-5x+4\leq x^2-4\end{array}\right. \\ \Rightarrow &\left\{\begin{array}{ll}0\leq 2x^2-5x,\\ 0\leq 5x-8\end{array}\right. \\ \Rightarrow &\left\{\begin{array}{ll}0\leq x(2x-5),\\ 0\leq 5x-8.\end{array}\right. \\ \end{align*} So if $x^2-4=(x-2)(x+2)>0$, we need these equations to be true as well. Now looking at the intersection of the sets that cause each of the equations to be true, we have that the original absolute inequality is true in the following set, where I use curly braces rather than parentheses to show order: \begin{align*} &\{(-\infty,-2)\cup(2,\infty)\}\bigcap\left\{(-\infty,0]\cup\left[\frac{5}{2},\infty\right)\right\}\bigcap \left[\frac{8}{5},\infty\right) \\ =&\left\{(-\infty,-2)\bigcap\left\{(-\infty,0]\cup\left[\frac{5}{2},\infty\right)\right\}\bigcap \left[\frac{8}{5},\infty\right)\right\}\bigcup\left\{(2,\infty)\bigcap\left\{(-\infty,0]\cup\left[\frac{5}{2},\infty\right)\right\}\bigcap \left[\frac{8}{5},\infty\right)\right\} \\ =&\emptyset\bigcup \left[\frac{5}{2},\infty\right) \\ =&\left[\frac{5}{2},\infty\right). \end{align*} If you repeat the above steps yourself, assuming instead that $x^2-4<0$, you should get that $x$ needs to be in the set $\left[0,\frac{8}{5}\right]$. So our overall answer is $\left[0,\frac{8}{5}\right]\cup\left[\frac{5}{2},\infty\right)$.
I've made one assumption here which is that you know how to solve inequalities like $0<(x-2)(x+2)$, let me know if that's not the case and we can go through that as well.
Now, the second method. Your function inside the absolute value is continuous everywhere except the asymptotes, which is where the denominator is equal to 0. So lets first look at the boundaries of the set where the equation is satisfied. \begin{align*} &\left\vert\frac{x^2-5x+4}{x^2-4}\right\vert=1 \\ \Rightarrow&\frac{x^2-5x+4}{x^2-4}=\pm 1. \\ &\left\{\begin{array}{ll}\frac{x^2-5x+4}{x^2-4}=1\\ \frac{x^2-5x+4}{x^2-4}=-1\end{array}\right. \\ \Rightarrow&\left\{\begin{array}{ll}x^2-5x+4=x^2-4\\ x^2-5x+4=-x^2+4\end{array}\right. \\ \Rightarrow&\left\{\begin{array}{ll}-5x+8=0\\ 2x^2-5x=0\end{array}\right. \\ \Rightarrow&\left\{\begin{array}{ll}-5x+8=0\\ x(2x-5)=0\end{array}\right. \\ \Rightarrow &x=0,\frac{8}{5},\frac{5}{2}. \end{align*} At these points, the function $\left\vert\frac{x^2-5x+4}{x^2-4}\right\vert$ potentially switches from being less than 1 to being greater than 1, or from being greater than 1 to being less than 1. This can also happen when the denominator is equal to 0, which is when $x=-2,2$, as the function can switch from being close to $-\infty$ to being close to $+\infty$ for example. These values together are then the only times the inequality $\left\vert\frac{x^2-5x+4}{x^2-4}\right\vert\leq 1$ potentially changes from being true to not true. Therefore in between these points, if the inequality is true (or false) for one value it's true (or false) for all values. So we just need to pick values in the intervals \begin{align*} (-\infty,-2),(-2,0],\left(0,\frac{8}{5}\right],\left(\frac{8}{5},2\right),\left(2,\frac{5}{2}\right],\left(\frac{5}{2},\infty\right) \end{align*} to see if the inequality is true in the interval. Note when I use open and closed ends in the intervals, it doesn't matter in which interval you include $x=\frac{5}{2}$, but you don't include $x=2$ in either interval because the function is not defined there.
So for $(-\infty,-2)$ let $x=-3$. Then $\left\vert\frac{x^2-5x+4}{x^2-4}\right\vert=\left\vert\frac{9+15+4}{9-4}\right\vert=\left\vert\frac{28}{5}\right\vert=\frac{28}{5}> 1$. So the inequality is false when $x=-3$ and so is false in the entire interval $(-\infty,-2)$. Repeat for the other intervals to get the same answers as before.