# Find the minimum positive value that $(f(x)-g(x)+3)$ may attain.

Let $$f:\mathbb R\to \mathbb R$$ be two non-constant differentiable functions. If $$f'(x)-g'(x)=g'(x)(f(x))^2-f'(x)(g(x))^2$$ for all $$x\in\mathbb R$$ and $$f(1)=1, g(1)=\frac13$$ and if there is no $$x$$ for which $$f(x)=-2$$ or $$g(x)=2$$ then find the minimum positive value that $$(f(x)-g(x)+3)$$ may attain.

My Attempt:

$$f'(x)(1+(g(x)^2)=g'(x)(1+(f(x))^2)$$

$$\frac{f'(x)}{1+(f(x))^2}=\frac{g'(x)}{1+(g(x))^2}$$

$$\big[\arctan(f(x))\big]_1^x=\big[\arctan(g(x))\big]_1^x$$

$$\arctan(f(x))-\arctan1=\arctan(g(x))-\arctan\frac13$$

$$\arctan(f(x))-\arctan(g(x))=\arctan1-\arctan\frac13=\arctan\frac12$$

Not sure what to do next.

Perhaps the answer is $$2√5-1$$.

• Following your last step, it seems the question can be re-phrased as > Find the minimum positive value that $(\tan \alpha - \tan \beta +3)$ may attain given $\alpha - \beta = \arctan\frac12$. Also, $\tan \alpha - \tan \beta = \tan(\alpha - \beta) (1 + \tan \alpha \tan \beta) = \frac12(1 + \tan \alpha \tan \beta)$. Maybe this helps? I'm also curious about why >there is no $x$ for which $f(x)=-2$ or $g(x)=2$ is needed. I don't immediately see what the problem is if they could attain those values. Sep 20 at 7:30
• @TonyMathew my guess was maybe with $-2$ and $2$, the denominator of tan was becoming zero. But couldn't see that in the steps. Sep 20 at 7:39

You've made great progress. Using the Arctangent addition formula, along with your result of $$\arctan(f(x)) - \arctan(g(x)) = \arctan\left(\frac{1}{2}\right)$$, we get that

$$\arctan\left(\frac{f(x) - g(x)}{1 + f(x)g(x)}\right) = \arctan\left(\frac{1}{2}\right)$$

The arguments are congruent modulo $$\pi$$ so, for some fixed integer $$n$$, we have

$$\frac{f(x) - g(x)}{1 + f(x)g(x)} = n\pi + \frac{1}{2}$$

From $$f(1) = 1$$ and $$g(1) = \frac{1}{3}$$, we get $$\frac{f(x) - g(x)}{1 + f(x)g(x)} = \frac{1}{2}$$, so $$n = 0$$. Thus,

\begin{equation}\begin{aligned} \frac{f(x)-g(x)}{1+f(x)g(x)} &= \frac{1}{2} \\ 2f(x) - 2g(x) & = 1 + f(x)g(x) \\ -f(x)g(x) + 2f(x) - 2g(x) - 1 &= 0 \\ -f(x)g(x) + 2f(x) - 2g(x) + 4 - 4 - 1 & = 0 \\ (f(x) + 2)(-g(x) + 2) & = 5 \end{aligned}\end{equation}

Note that, with $$f(1) = 1$$ and $$g(1) = \frac{1}{3}$$, both of the LHS factors are positive. Also, they remain positive since $$f(x) \neq -2$$ and $$g(x) \neq 2$$ (this is likely why that restriction is given since, otherwise, the LHS becomes $$0$$). Thus, by the AM-GM inequality, we get

$$\frac{(f(x) + 2) + (-g(x) + 2)}{2} \ge \sqrt{5} \;\;\to\;\; f(x) - g(x) + 3 \ge 2\sqrt{5} - 1$$

This shows the minimum positive value that may be obtained is $$2\sqrt{5} - 1$$, as you suggested, with this occurring when $$f(x) + 2 = -g(x) + 2 = \sqrt{5}$$.

• Thankyou. One doubt: why are we saying $(2+f(x))$ and $(2-g(x))$ are positive? Sep 20 at 8:34
• @aarbee You're welcome. I stated both $f(x) + 2$ and $-g(x) + 2$ start, and remain, positive since the AM-GM inequality only applies to non-negative values. Sep 20 at 8:37
• Got it now, thanks. Sep 20 at 9:19

In what follows, $$f(x)$$ and $$g(x)$$ will be written as $$f$$ and $$g$$ respectively.

Note that

$$\tan^{-1} f = \tan^{-1} g + \tan^{-1} \left( \frac{1}{2} \right)$$ $$\implies f = \frac{g+ \frac{1}{2}}{1-\frac{g}{2}}$$ $$\implies f-g+3 = \frac{2g+1}{2-g}-g+3$$ $$\implies f-g+3 = \frac{g^2-3g+7}{2-g}$$

Let $$k=f-g+3$$, then $$k = \frac{g^2-3g+7}{2-g}$$.

Therefore $$k$$ is a rational function of $$g$$.

The graph of $$k = \frac{g^2-3g+7}{2-g}$$ is plotted as below and the minumum can be found by standard differentiation method. Alternatively, we may work as follows:

$$k = \frac{g^2-3g+7}{2-g}$$ $$\implies g^2-3g+7=2k-kg$$ $$\implies g^2+(k-3)g+(7-2k)=0$$

Since $$g$$ is always real, the discriminant of the above quadratic equation is non-negative.

$$(k-3)^2-4(7-2k) \geq 0$$ $$k^2+2k-19 \geq 0$$ $$(k+1)^2 \geq 20$$ $$k+1 \leq -2 \sqrt 5 \; \; \mathrm{or} \; \; k+1 \geq 2 \sqrt 5$$ $$k \leq -2\sqrt 5 -1 \; \; \mathrm{or} \; \; k \geq 2 \sqrt 5 - 1$$

Hence the minimum value of $$k=f-g+3$$ is $$2 \sqrt 5 - 1$$.

• Wonderful approach. Thanks. Sep 21 at 9:54
• In the second last step, at one place, it should be $-2√5$ Sep 21 at 10:07
• @aarbee Thank you. Answer amended. Sep 21 at 10:19