[René Descartes](https://en.wikipedia.org/wiki/Ren%C3%A9_Descartes) came up with a method of solving inequalities including rational inequalities by studying the signs of their factors, known as the *Table of Signs* method. ## Method To start with we will assume that the input variable is a real number. I'm not sure this method applies to complex functions in quite the same way. The steps are as follows: 1. Rearrange your inequality so it has a zero on the right-hand side and a set of (ideally linear) factors on the left-hand side. You want something of the form $ab \geq 0$ or $\frac{ab}{c} < 0$ ...or similar. You can have as many factors as you like as long as the expression is fully factorised so you have just a set of factors on the one side and a zero on the right 2. Solve each factor by itself for the points where it is zero. Make a particular note if you have an algebraic fraction for where there would be zeros in the denominator of the final expression. 3. The point where each of these factors is zero is a boundary of a range. We will now construct a table comprising all of these ranges with a goal to span all of the real numbers. 4. The first row of your table will be one empty cell (or $x$ or the word "Factor" or something) followed by a set of ranges and points. Start by putting your zero points across the top of the table, leaving lots of space in between them and at both sides which you will use to fill in ranges 5. Fill in the spaces in between the zero points and on the outside with the intervals to comprise all of the real numbers. Say the expression on the LHS is $\frac{x+1}{x-3}$then zero points are -1 and 3, and the top of your table should look something like | Factor | $(-\infty, -1)$ | $-1$ | $(-1,3)$ | $3$ | $(3,\infty)$ |. The left-most range must start with "$(-\inftyquot; and the right-most range must finish with "$,\infty)quot; and there must be no gaps. 6. Now write the factors ($a$, $b$, and $c$ in the above) down the left-hand side, and fill in "0" where they are zero. If factors are repeated (eg say the denominator was $(x-3)^2$ or something I think if you're doing this for work you're submitting for a course or whatever they will want you to repeat the row, not just remember mentally that the factor is repeated. 7. Fill in the table with the sign of the factor in each region. Say the expression on the LHS is $\frac{x+1}{x-3}$ our table should now look something like the following: | | $(-\infty, -1)$ | $-1$ | $(-1,3)$ | $3$ | $(3,\infty)$ | |: ------ :|: --------------- :|: ---- :|: -------- :|: --- :|: ------------ :| | $x+1$ | - | 0 | + | + | + | | $x-3$ | - | - | - | 0 | + | 8. We can now deduce the sign of our resulting combined expression from the sign of its factors. For example in our case it is a simple algebraic fraction with one expression above and below. Thus it will be positive where both factors are positive or both are negative, and will be negative where the signs of the factors above and below are different. Make a special note of where the denominator is zero because our expression is undefined at that point. Write the signs on another row of the table, adding "0" where it is zero and $\star$ where it is undefined. | | $(-\infty, -1)$ | $-1$ | $(-1,3)$ | $3$ | $(3,\infty)$ | | :-----------: | :-------------: | :--: | :------: | :-----: | :----------: | | $x+1$ | - | 0 | + | + | + | | $x-3$ | - | - | - | 0 | + | | $(x+1)/(x-3)$ | + | 0 | - | $\star$ | + | Now we use this to answer the question. So say our inequality was $\frac{x+1}{x-3} \ge 0$ Then we can see in the last row where the expression is positive or zero. The first and second cells in the last row have together make $(-\infty,-1]$, and the last cell gives us $(3,\infty)$ so we union those ranges together giving the solution set (in interval notation) of $(-\infty,-1] \cup (3,\infty)$. If you are asked to write it as an inequality it would be $x\leq-1~\text{or}~x >3$. Do write the “or”, don’t just put a comma like [Sal Khan](https://khanacademy.org) because although he's great and everything and has a lovely silky voice that’s actually wrong. Make sure if you're answering a question that you check what format they want the solution set in. __Note__: - If a factor is linear (and you kind of want all the factors to be linear), you can look at the leading coefficient to tell you its basic slope. Then all the regions on one side of its zero will be negative and all the ones on the other side of its zero will be positive. This is much quicker than trying to think through each region for each factor. - we have used an open interval to exclude the point at 3 where the expression is undefined. You also can't have closed intervals at $-\infty$ and $\infty$ as infinity isn't a number so can't be included in a closed interval. - We have paid attention to the boundary condition ($\geq$) and so included $x=-1$ where the function is defined (and zero). - It's probably a good idea to sketch a number line and check a case from each region to be sure your solution is good but I'm not your mum do whatever you like. - We can also check the result against a cas system or something like [Wolfram Alpha](https://www.wolframalpha.com/input?i=solve+%28x%2B1%29%2F%28x-3%29+%3E%3D+0+) as long as you're not doing homework or something where it tells you not to or it would violate academic integrity. Make sure you do a full solution before you check or you won't learn anything at all. If you check and your answer is wrong really try to digest how you made an error and consider redoing the problem from scratch. Doing the work is how you get good. - Double check the boundary cases and make sure you're reading the inequality sign correctly. - When you're doing your original work on factorising the inequality or bringing things from one side to the other remember that the normal rules of algebra on inequalities apply. This method is well-suited to solving problems where the left-hand side can be cleanly factorised (or you have factors already). It works by relying on your ability to reason that if any of the factors is zero, the resulting expression is zero and therefore this allows you to find the boundary points where the sign of the function changes from negative to positive or vice versa. For simple quadratic inequalities, obviously sketching the function is probably going to be easier than going through the rigmarole of building the full table. ## Sample problems 1. $x^2 -5x +6 >0$ 2. $2x^2-8x-10\leq 0$ 3. $x^2 + x -6 < 0$ 4. $3x^2 -12x + 9 \geq 0$ 5. $-x^2 +4x -5> x-6$ 6. $-2x^2+6x-8<-x+3$ 7. $\frac{x^2-5x+6}{x-3}>0$ 8. $\frac{x^2-x-6}{x^2 -4}\leq 0$ ## How to prompt GPT-4 to give you more practise problems of this type If you want practise problems, one way is to ask an LLM to come up with some for you that meet your particular spec. I have done this with some success with gpt-4. You can tweak the prompt to make the problems easier or harder as you build your skills. For the most basic type of problem, a prompt like this works well `Please give me 5 problems where I have to solve a quadratic inequality. Make them relatively straightforward with integer coefficients. Don't show solutions.` ..then when you want something more interesting: `Now can you give me 5 with integer coefficients but the leading coefficient is negative and I have to rearrange the inequality to get 0 on the righthand side.` ...and finally: `Can you give me 5 inequalities with rational expressions on the lhs. The numerator and denominator should either be a linear expression or a quadratic with integer coefficients that can be easily factorised. The leading coefficient of either the numerator or denominator can be negative.` When you do this, you can check your solutions with something like wolfram alpha as you go. If you try to check with chatgpt it *will* sometimes make mistakes so you need to check carefully. For example, in [the session](https://chat.openai.com/share/9c1aeea4-e661-46da-b678-4e17f22987ca) where I got the problems above, it flipped the sign on the discriminant in one problem. This also shows me the numberline plot and helps to build intuition. Whatever you do don't just ask chatgpt the answers to homework problems. It will get things wrong. This will also be a violation of academic integrity, but much more seriously it will also *guarantee* that you don't learn the skills you should be learning, meaning you will fall behind in later lessons because you don't have foundational skills you need to progress. [[self directed learning#On Hard Work|Check out my thoughts on this here]]. ## Solutions to practise problems I've done the problems above but they are annoying to write up because of how markdown and latex interact. I may write them up fully at some point, but for now here are just the solutions so you can check, assuming the question asks for them to be written in interval notation 1. $(-\infty,2] \cup (3,\infty)$ 2. $[-1,5]$ 3. $(-3,2)$ 4. $(-\infty,1] \cup [3,\infty)$ 5. $(\frac{3-\sqrt{53}}{2},\frac{3+\sqrt{53}}{2})$ 6. This expression is everywhere < 0, so the solution set is just $\mathbb{R}$ or $(-\infty, \infty)$ 7. $(2,3)\cup(3,\infty)$ (as you can [see](https://www.wolframalpha.com/input?i=solve+%28x%5E2-5x%2B6%29%2F%28x-3%29+%3E+0), this is just $x>2, x\neq 3$) 8. $(2,3]$