Quadratic equation where constant term is an integral function

The discriminant $b^2 - 4ac$ is actually

$$d = 4 + 4(k + \int_{0}^{1}\left| t + k \right| dt) \tag{1}\label{eq1A}$$

Regarding calculating $k + \int_{0}^{1}\left| t + k \right| dt$, there are $3$ cases to consider:

Case $1$: $\; k \lt -1$

Since $t + k \lt 0$ for $t$ from $0$ to $1$, this gives

$$\begin{equation}\begin{aligned} k + \int_{0}^{1}\left| t + k \right| dt & = k + \int_{0}^{1}(-t - k) dt \\ & = k + \left. \left(-\frac{t^2}{2} - kt\right)\right|_{0}^{1} \\ & = k + \left(-\frac{1}{2} - k\right) \\ & = -\frac{1}{2} \end{aligned}\end{equation}\tag{2}\label{eq2A}$$

In \eqref{eq1A}, this gives $d = 2$.

Case $2$: $\; -1 \le k \lt 0$

This requires splitting the integration into $2$ parts, the initial one for $t$ from $0$ to $-k$ where $t + k \le 0 \implies \left|t + k\right| = -t -k$ and a second part for $t$ from $-k$ to $1$ where $t + k \ge 0 \implies \left|t + k\right| = t + k$, giving

$$\begin{equation}\begin{aligned} k + \int_{0}^{1}\left| t + k \right| dt & = k + \int_{0}^{-k}(-t - k) dt + \int_{-k}^{1}(t + k) dt \\ & = k + \left. \left(-\frac{t^2}{2} - kt\right)\right|_{0}^{-k} + \left. \left(\frac{t^2}{2} + kt\right)\right|_{-k}^{1} \\ & = k - \frac{k^2}{2} + k^2 + \frac{1}{2} + k - \frac{k^2}{2} + k^2 \\ & = 2k + k^2 + \frac{1}{2} \\ & = k^2 + 2k + 1 - 1 + \frac{1}{2} \\ & = (k + 1)^2 - \frac{1}{2} \end{aligned}\end{equation}\tag{3}\label{eq3A}$$

For $k \ge -1$, the value above is an increasing function, going from $-\frac{1}{2}$ to $\frac{1}{2}$. Thus, $d$ in \eqref{eq1A} goes from $2$ to $6$.

Case $3$: $\; k \ge 0$

This obviously gives $d \gt 0$, but doing the calculations results in

$$\begin{equation}\begin{aligned} k + \int_{0}^{1}\left| t + k \right| dt & = k + \int_{0}^{1}(t + k) dt \\ & = k + \left. \left(\frac{t^2}{2} + kt\right)\right|_{0}^{1} \\ & = k + \left(\frac{1}{2} + k\right) \\ & = 2k + \frac{1}{2} \end{aligned}\end{equation}\tag{4}\label{eq4A}$$

Thus, $d$ in \eqref{eq1A} is $6$ at $k = 0$, and increases without bound as $k$ goes up.


This shows all $3$ cases gives $d \gt 0$, so the roots are real and distinct. Since the roots are also always complex numbers, this means options (A), (C) and (D) are true, with only (B) being false since there are no imaginary roots.


As pointed out in comments and in John Omielan's answer, to show that there are always two roots, it suffices to show that $\newcommand{\abs}[1]{|#1|}\newcommand{\dd}{\; \mathrm{d}} $ $$1+k+\int_0^1 \abs{t+k} \dd t \ge 0$$ for every $k\in\mathbb R$. From triangle inequality (or reverse triangle inequality) we get that $\abs{t+k}\ge \abs{k}-\abs{t}$. Since we are looking only at $t$ between $0$ and $1$, we can actually use $\abs{t+k}\ge \abs k - t$ to get \begin{align*} 1+k+\int_0^1 \abs{t+k} \dd t \\ &\ge 1+k+\int_0^1 (\abs{k}-t) \dd t \\ &= 1+k+\int_0^1 \abs{k} \dd t - \int_0^1 t \dd t \\ &= 1+k+\abs{k} - \frac12\\ &= \frac12+k+\abs{k} \\ &\ge \frac12 \end{align*} (We have used $x+\abs x\ge 0$.)


I wouldn't be trying to find some kind of proof which does not need to be split in the cases if I hadn't seen in the other answer that this always has two distinct real roots. So the credit should go there.

As a side note, I will also mention that there is this older questions: Comment upon the nature of roots of the quadratic equation $x^2+2x=k+ \int_0^1 |t+k| \, dt$ depending on the value of $k \in \mathbb{R}$. However, it is now deleted, so it's visible only to 10k+ users. One interesting thing I see there is that $\int |x| \dd x = \frac{x\cdot|x|}2$ is used there to evaluate the integral.

Tags:

Quadratics