I'm interested in the following rational function $f:[0,1]\rightarrow \mathbb{R}$: \begin{align} f(x)= \frac{(1+Ax^2)(1+Bx^2)}{1+(A+B)x^2}\cdot \frac{(1+A(1-x)^2)(1+B(1-x)^2)}{1+(A+B)(1-x)^2} \end{align} where $A,B>0$. From numerical verification, I have confidence in the claim that the maximum of this function is attained either at $x=0$, $1/2$, or $1$ regardless of $A$ and $B$. To prove this, I have differentiated the function and have tried to find the number of zeros on $[0,1]$, with Budan's theorem and some theorems borrowed from complex analysis (considering the disk rather than interval). But I found that the derivative is too complex to analyze.
Is there any suggestion to tackle this problem?
Unfortunately, the behavior of the function depends on $A$ and $B$, which makes it difficult to analyze. Here are three graphs, for $B=10$ and $A=3,30,300$; note that whether or not $x=1/2$ is an extreme value or what kind it is varies.