Chaitanya's Random Pages

August 28, 2015

The discriminant trick

Filed under: mathematics — ckrao @ 12:22 pm

Suppose you wish to find the maximum value of y =\frac{8}{2x+1} - \frac{1}{x} for x > 0. One way to do this without calculus is to massage the expression until one can apply an elementary inequality such as u + \frac{1}{u} \geq 2. To apply this particular result we aim to minimise 1/y and apply polynomial division.

\begin{aligned}  \frac{1}{y} &= \frac{1}{\frac{8}{2x+1} - \frac{1}{x}}\\  &= \frac{x(2x+1)}{8x - (2x+1)}\\  &=\frac{2x^2+x}{6x-1}\\  &= \frac{(6x-1)(x/3 + 2/9) + 2/9}{6x-1}\\  &= \frac{1}{9}\left( 3x+2 + \frac{2}{6x-1} \right)\\  &= \frac{1}{9}\left( \frac{5}{2} + \frac{6x-1}{2} + \frac{2}{6x-1} \right)\\  &\geq \frac{1}{9}\left(\frac{5}{2} + 2 \right)\\  &= \frac{1}{9}\left(\frac{9}{2}\right)\\  &= \frac{1}{2}\quad\quad \quad \quad \quad (1)  \end{aligned}

In the above steps we assume 6x-1 > 0, otherwise y is non-positive for x > 0. Hence y \leq 2 with equality when \frac{6x-1}{2} = 1 or x = 1/2.

Another elementary way that applies to quotients of quadratic polynomials is to re-write the expression as a quadratic in x:

\begin{aligned}  y &= \frac{8}{2x+1} - \frac{1}{x}\\  x(2x+1)y &= 8x - (2x+1)\\  2x^2y + (y-6)x + 1 &= 0.\quad \quad \quad \quad \quad \quad (2)  \end{aligned}

For fixed y this quadratic equation will have 0, 1 or 2 solutions in x depending on whether its discriminant is negative, zero, or positive respectively. At any maximum or minimum value y_0 of the function, the discriminant will be zero since on one side of y_0 the quadratic equation will have a solution (discriminant non-negative) while on the other it will not (discriminant negative). In the image below a maximum is reached at y_0 = 2 while it is of opposite signs either side of this.


Hence setting the discriminant of the left side of (2) to 0, (y-6)^2 - 4(2y) = 0 from which y^2 - 20y + 36 = (y-18)(y-2) = 0. Hence extrema are at y=2 and y = 18. We can solve (y-18)(y-2) \geq 0 to find that y \leq 2 or y \geq 18 is the range of the function y = \frac{8}{2x+1} - \frac{1}{x}. This tells us that y = 2 is a local maximum (illustrated above) and y = 18 is a local minimum (occurring when x < 0).


One advantage of this method is that unlike elementary calculus, one bypasses the step of finding the corresponding x value (i.e. by solving dy/dx = 0) before substituting this into the function to find the extremum value for y.

Another advantage is that the equation need not be polynomial in y. For example below is a plot of x^2 + 4x\sin y + 1 = 0. Using the above-mentioned discriminant trick we solve 16 \sin^2 y - 4 \geq 0 and find the range of the function is when \displaystyle \sin^2 y \geq 1/4, or y \in \bigcup_{k \in \mathbb{Z}} [k\pi + \pi/6, k\pi + 5\pi/6] . Below is a plot confirming this using WolframAlpha.


The reader is encouraged to try out other examples, for example this method should work for any equation of the form \displaystyle h(y) = \frac{ax^2 + bx + c}{dx^2 + ex + f} where h is a continuous function of y. Of course one should also take care in noting when the function is defined before cross-multiplying.

Further Reading

[1] Finding the range of rational functions – Mathematics Stack Exchange

[2] Find Range of Rational Functions –

[3] Critical point (mathematics): Use of the discriminant – Wikipedia, the free encyclopedia

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: