# Parameter values that make function values side lengths of a triangle

I have been trying to solve the following problem for more than a week without any success.

Given the function: $$f(x)=\frac{x^2+mx+4}{x^2+x+4}$$ Find all possible values of the parameter $m$ such that for any three numbers $a,b,c$ the corresponding values of the function $f(a),f(b)$ and $f(c)$ are sides of a triangle.

-
The use of subjective assessments like "easy", "hard", "tricky" is in my view not helpful in summarizing the problem to others in the title because perceptions about the difficulty of problems vary widely. Please consider replacing the title with a more specific and less subjective summary of the question, such as "Parameter values that make function values side lengths of a triangle". – joriki Nov 13 '12 at 8:59
Personally, I like it when mathematicians give their opinions about what's easy and what's hard, and I wish it were more common. Even if I disagree with them, it helps put things in perspective. – littleO Nov 13 '12 at 9:01
I am an artist not a mathematician. Sorry about that. – Adam Nov 13 '12 at 9:06
@littleO: I wasn't arguing against giving opinions about that, only against placing them in the title. I agree that information about what appears easy or hard to the person asking the question can be helpful in answering it. However, that information is unlikely to be informative to someone scanning the question titles on the main page for questions of interest. – joriki Nov 13 '12 at 10:00

If $f(a), f(b), f(c)$ are sides of a triangle if they satisfy the triangle inequalities $$f(a) + f(b) > f(c), \quad f(a) + f(c) > f(b), \quad f(b) + f(c) > f(a).$$ If we require that this holds for every $a,b,c$, then by symmetry we only need to prove that, for all $a,b,c$, $f(a) + f(b) > f(c)$. Writing out this inequality, we have $$\frac{a^2 + ma + 4}{a^2 + a + 4} + \frac{b^2 + mb + 4}{b^2 + b + 4} > \frac{c^2 + mc + 4}{c^2 + c + 4}$$ If we rewrite $$\frac{a^2 + ma + 4}{a^2 + a + 4} = \frac{a^2 + a + 4 + (m-1)a}{a^2 + a + 4} = 1 + \frac{(m-1)a}{a^2 + a + 4},$$ and similarly do the same rearrangement for the terms with $b$ and $c$, then our inequality becomes $$2 + \frac{(m-1)a}{a^2 + a + 4} + \frac{(m-1) b}{b^2 + b + 4} > 1 + \frac{(m-1)c}{c^2 + c + 4}.$$ Rearranging, we obtain $$1 > (m-1) \left[ G(c) - G(b) - G(a) \right]$$ where we have defined a new function $G(x) = x/(x^2 + x + 4)$. Notice that $G(x) \rightarrow 0$ as $|x| \rightarrow \infty$. Therefore we can find the maximum and minimum of $G(x)$ by calculating where its derivative vanishes. We have $$G'(x) = \frac{1}{x^2 + x + 4} - \frac{x(2x + 1)}{x^2 + x + 4} = \frac{4 - x^2}{x^2 + x + 4},$$ which vanishes at $x = \pm 2$. We calculate $G(2) = 1/5$ and $G(-2) = -1/3$; therefore these are the maximum and minimum values of $G$, respectively. Therefore we have $$- \frac{11}{15} = - \frac{1}{3} - \frac{1}{5} - \frac{1}{5} \le G(c) - G(b) - G(a) \le \frac{1}{5} + \frac{1}{3} + \frac{1}{3} = \frac{13}{15}.$$ Furthermore, these upper and lower bounds are achieved by particular choices of $a,b,c$; therefore, in order for the triangle inequality to be satisfied, therefore, if $m > 1$, we have $(m-1)^{-1} > 13/15$, and if $m < 1$, we have $(m-1)^{-1} > -11/15$. As $m = 1$ is also a solution, then we obtain the set of all possible values of $m$: $$-\frac{4}{11} < m < \frac{28}{13}$$

-
Don't you have those inequalities backwards? The sum of 2 sides must be greater than the third, otherwise the triangle can't close. And $m=1$ is clearly a solution. – Mike Nov 13 '12 at 14:06
It should be $f(a)+f(b)>f(c)$. – Adam Nov 13 '12 at 19:03
Oops...yes, I reversed everything. Let me fix this now! – Christopher A. Wong Nov 13 '12 at 20:48

Assume that $d$,$e$,$f$ are the lenghts of the sides of a triangle. Drawing sketches of a few different triangles shows that as the angle between $d$ and $e$ approaches 180 degree, $f$ approaches $d+e$ from below, and that as the angle between $d$ and $e$ approaches 0 degree, $f$ approaches $|d-e|$ from ablove. You thus get that $$|d-e| < f < d+e$$ exactly if $d,e,f$ are the lenghts of the sides of a triangle.

Now lets look for intervals $I = (l, u) \subset \mathbb{R}$ where every combination $a,b,c \in I$ fullfills that inequality. Quite obviously, zero cannot be in $I$, since for $f=0$, there are no $d,e$ which fulfill the inequality. More generally, to ensure that $|d-e| < f$ always holds, you must have $l \geq u-l$, since $u-l$ is an upper bound for $|d-e|$ if $d,e \in I$. Similarly, $2l$ is a lower bound for $d+e$ if $d,e \in I$, and thus $u \leq 2l$ must hold if $f < d+e$ is to hold for all $d,e,f \in I$. Since $l \geq u-l$ is in fact equivalent to $2l \geq u$, you get that all $d,e,f \in [l,u]$ are the lenghts of the sides of some triangle iff $$\begin{eqnarray} u &\leq& 2l \end{eqnarray}$$

Thus, you need to values of $m$ for which the range of $f$, i.e. the set $\{f(x):x\in\mathbb{R}\}$, is a subset of some inteval which satisfies the above. Can you do that?

-