# For every positive integer n, determine the greatest possible value of the quotient $\frac{1-x^n-(1-x)^n}{x(1-x)^n+(1-x)x^n}$ where $0\lt x\lt1$

For every positive integer n, determine the greatest possible value of the quotient

$$\frac{1-x^n-(1-x)^n}{x(1-x)^n+(1-x)x^n}$$ where $$0\lt x\lt1$$

Ive never dealt with a question like this so im not sure how to approach it, hints aswell as answers would be appreciated

taken from SAMO 2016 senior round 3 http://www.samf.ac.za/content/files/QuestionPapers/s3q2016.pdf

• i feel it would take the greatest value at $x=1/2$ the expression will be $2^n-2$ which can go to inifnity Aug 10, 2019 at 18:13
• I have a filling this has to do something with a conditional probability if we flip a coin $n+1$ times. Aug 10, 2019 at 19:28
• @Aqua so the numerator would be the possibility neither to have $n$ heads nor tails, i.e., there’s at least one head and one tail. Aug 10, 2019 at 20:16
• Yes, but in say first n trails. @MichaelHoppe Aug 10, 2019 at 20:20
• @Ameryr: Your feeling is right. And your formulation of the answer is actually equal to mine but yours is more comfortable and perhaps more useful for a proof. Aug 10, 2019 at 20:45

HINT.-Make a coordinate change by putting $$\dfrac12 + x$$ instead of $$x$$ you get $$f(x)=\frac{2^n-(1+2x)^n-(1-2x)^n}{(0.25-x^2)[(1+2x)^{n-1}+(1-2x)^{n-1}]}$$ It follows that the resulting function is such that $$f(x)=f(-x)$$ in other words the vertical $$x=\dfrac12$$ is an axis of symmetry for each of the original functions.
Taking now the derivative of $$g(x)=\dfrac{1-x^n-(1-x)^n}{x(1-x)^n+(1-x)x^n}$$ we can forget the positive denominator and get a numerator $$A-B$$ where $$A=(nx(1-x)^{n-1}+nx^n+x^n+nx^{n-1}(1-x)^{n+1}+(1-x)^{2n}\\B=nx^{n+1}(1-x)^{n-1}+nx^{n-1}+x^{2n}+(1-x)^n$$ Calculation gives for $$A-B$$ positive value for $$\dfrac12-\epsilon$$ and negative value for $$\dfrac12+\epsilon$$. This shows that the functions take a maximum at $$x=\dfrac12$$.
Consequently the required maximum is $$g\left(\dfrac12\right)=2^n-2$$
• My guess, due to symmetry, is that maximum is achieved at $x = 1/2$ for all $n$, which indeed will simplify to what you wrote (also, equal to $2^n-2$). My idea was to substitute $y = 1-x$, consider the appropriate function of two variables, and maximize with Lagrange over the contour $x + y = 1$. It follows for sure that partial derivatives wrt to $x$ and $y$ should be equal. It might imply $x = y = 1/2$, but the expression is complicated and I don't really have time right now to check it. Aug 10, 2019 at 21:10