# Problems and Solutions of INMO-2007 1. In a triangle $A B C$ right-angled at $C$, the median through $B$ bisects the angle between $B A$ and the bisector of $\angle B$. Prove that $$ \frac{5}{2}<\frac{A B}{B C}<3 $$ ## Solution 1: Since $E$ is the mid-point of $A C$, we have $A E=$ $E C=b / 2$. Since $B D$ bisects $\angle A B C$, we also know that $C D=a b /(a+c)$. Since $B E$ bisects $\angle A B D$, we also have $$ \frac{B D^{2}}{B A^{2}}=\frac{D E^{2}}{E A^{2}} $$ However, $$ \begin{aligned} B D^{2} & =B C^{2}+C D^{2}=a^{2}+\frac{a^{2} b^{2}}{(a+c)^{2}} \\ D E^{2} & =\left(\frac{b}{2}-\frac{a b}{a+c}\right)^{2} \end{aligned} $$ ![](https://cdn.mathpix.com/cropped/2024_06_05_d28c94fd14b266aab03cg-1.jpg?height=615&width=488&top_left_y=571&top_left_x=1233) Using these in the above expression and simplifying, we get $$ a^{2}\left\{(a+c)^{2}+b^{2}\right\}=c^{2}(c-a)^{2} $$ Using $c^{2}=a^{2}+b^{2}$ and eliminating $b$, we obtain $$ c^{3}-2 a c^{2}-a^{2} c-2 a^{3}=0 $$ Introducing $t=c / a$, this reduces to a cubic equation; $$ t^{3}-2 t^{2}-t-2=0 $$ Consider the function $f(t)=t^{3}-2 t^{2}-t-2$ for $t>0$ (as $c / a$ is positive). For $00 $$ Hence there is a unique value of $t$ in the interval $(5 / 2,3)$ such that $f(t)=0$. We conclude that $$ \frac{5}{2}<\frac{c}{a}<3 $$ Solution 2: Let us take $\angle B / 4=\theta$. Then $\angle E B C=\angle D B E=\theta$ and $\angle C B D=$ $2 \theta$.Using sine rule in triangles $B E A$ and $B E C$, we get $$ \begin{aligned} \frac{B E}{\sin A} & =\frac{A E}{\sin \theta} \\ \frac{B E}{\sin 90^{\circ}} & =\frac{C E}{\sin 3 \theta} \end{aligned} $$ Since $A E=C E$, we obtain $\sin 3 \theta \sin A=\sin \theta$. However $A=90^{\circ}-4 \theta$. Thus we get $\sin 3 \theta \cos 4 \theta=\sin \theta$. Note that $$ \frac{c}{a}=\frac{1}{\cos 4 \theta}=\frac{\sin 3 \theta}{\sin \theta}=3-4 \sin ^{2} \theta $$ This shows that $c / a<3$. Using $c / a=3-4 \sin ^{2} \theta$, it is easy to compute $\cos 2 \theta=((c / a)-1) / 2$. Hence $$ \frac{a}{c}=\cos 4 \theta=\frac{1}{2}\left(\frac{c}{a}-1\right)^{2}-1 $$ Suppose $c / a \leq 5 / 2$. Then $((c / a)-1)^{2} \leq 9 / 4$ and $a / c \geq 2 / 5$. Thus $$ \frac{2}{5} \leq \frac{a}{c}=\frac{1}{2}\left(\frac{c}{a}-1\right)^{2}-1 \leq \frac{9}{8}-1=\frac{1}{8} $$ which is absurd. We conclude that $c / a>5 / 2$. 2. Let $n$ be a natural number such that $n=a^{2}+b^{2}+c^{2}$, for some natural numbers $a, b, c$. Prove that $$ 9 n=\left(p_{1} a+q_{1} b+r_{1} c\right)^{2}+\left(p_{2} a+q_{2} b+r_{2} c\right)^{2}+\left(p_{3} a+q_{3} b+r_{3} c\right)^{2} $$ where $p_{j}$ 's, $q_{j}$ 's, $r_{j}$ 's are all nonzero integers. Further, if 3 does not divide at least one of $a, b, c$, prove that $9 n$ can be expressed in the form $x^{2}+y^{2}+z^{2}$, where $x, y, z$ are natural numbers none of which is divisible by 3 . Solution: It can be easily seen that $$ 9 n=(2 b+2 c-a)^{2}+(2 c+2 a-b)^{2}+(2 a+2 b-c)^{2} $$ Thus we can take $p_{1}=p_{2}=p_{3}=2, q_{1}=q_{2}=q_{3}=2$ and $r_{1}=r_{2}=r_{3}=-1$. Suppose 3 does not divide $\operatorname{gcd}(a, b, c)$. Then 3 does divide at least one of $a, b, c$; say 3 does not divide $a$. Note that each of $2 b+2 c-a, 2 c+2 a-b$ and $2 a+2 b-c$ is either divisible by 3 or none of them is divisible by 3 , as the difference of any two sums is always divisible by 3 . If 3 does not divide $2 b+2 c-a$, then we have the required representation. If 3 divides $2 b+2 c-a$, then 3 does not divide $2 b+2 c+a$. On the other hand, we also note that $$ 9 n=(2 b+2 c+a)^{2}+(2 c-2 a-b)^{2}+(-2 a+2 b-c)^{2}=x^{2}+y^{2}+z^{2} $$ where $x=2 b+2 c+a, y=2 c-2 a-b$ and $z=-2 a+2 b-c$. Since $x-y=3(b+a)$ and 3 does not divide $x$, it follows that 3 does not divide $y$ as well. Similarly, we conclude that 3 does not divide $z$. 3. Let $m$ and $n$ be positive integers such that the equation $x^{2}-m x+n=0$ has real roots $\alpha$ and $\beta$. Prove that $\alpha$ and $\beta$ are integers if and only if $[m \alpha]+[m \beta]$ is the square of an integer. (Here $[x]$ denotes the largest integer not exceeding $x$.) Solution: If $\alpha$ and $\beta$ are both integers, then $$ [m \alpha]+[m \beta]=m \alpha+m \beta=m(\alpha+\beta)=m^{2} $$ This proves one implication. Observe that $\alpha+\beta=m$ and $\alpha \beta=n$. We use the property of integer function: $x-1<[x] \leq x$ for any real number $x$. Thus $m^{2}-2=m(\alpha+\beta)-2=m \alpha-1+m \beta-1<[m \alpha]+[m \beta] \leq m(\alpha+\beta)=m^{2}$. Since $m$ and $n$ are positive integers, both $\alpha$ and $\beta$ must be positive. If $m \geq 2$, we observe that there is no square between $m^{2}-2$ and $m^{2}$. Hence, either $m=1$ or $[m \alpha]+[m \beta]=m^{2}$. If $m=1$, then $\alpha+\beta=1$ implies that both $\alpha$ and $\beta$ are positive reals smaller than 1 . Hence $n=\alpha \beta$ cannot be a positive integer. We conclude that $[m \alpha]+[m \beta]=m^{2}$. Putting $m=\alpha+\beta$ in this relation, we get $$ \left[\alpha^{2}+n\right]+\left[\beta^{2}+n\right]=(\alpha+\beta)^{2} $$ Using $[x+k]=[x]+k$ for any real number $x$ and integer $k$, this reduces to $$ \left[\alpha^{2}\right]+\left[\beta^{2}\right]=\alpha^{2}+\beta^{2} $$ This shows that $\alpha^{2}$ and $\beta^{2}$ are both integers. On the other hand, $$ \alpha^{2}-\beta^{2}=(\alpha+\beta)(\alpha-\beta)=m(\alpha-\beta) $$ Thus $$ (\alpha-\beta)=\frac{\alpha^{2}-\beta^{2}}{m} $$ is a rational number. Since $\alpha+\beta=m$ is a rational number, it follows that both $\alpha$ and $\beta$ are rational numbers. However, both $\alpha^{2}$ and $\beta^{2}$ are integers. Hence each of $\alpha$ and $\beta$ is an integer. 4. Let $\sigma=\left(a_{1}, a_{2}, a_{3}, \ldots, a_{n}\right)$ be a permutation of $(1,2,3, \ldots, n)$. A pair $\left(a_{i}, a_{j}\right)$ is said to correspond to an inversion of $\sigma$, if $ia_{j}$. (Example: In the permutation $(2,4,5,3,1)$, there are 6 inversions corresponding to the pairs $(2,1)$, $(4,3),(4,1),(5,3),(5,1),(3,1)$.) How many permutations of $(1,2,3, \ldots n)$, $(n \geq 3)$, have exactly two inversions? Solution: In a permutation of $(1,2,3, \ldots, n)$, two inversions can occur in only one of the following two ways: (A) Two disjoint consecutive pairs are interchanged: $$ \begin{aligned} & (1,2,3, j-1, j, j+1, j+2 \ldots k-1, k, k+1, k+2, \ldots, n) \\ & \quad \longrightarrow(1,2, \ldots j-1, j+1, j, j+2, \ldots, k-1, k+1, k, k+2, \ldots, n) \end{aligned} $$ (B) Each block of three consecutive integers can be permuted in any of the following 2 ways; $$ \begin{aligned} & (1,2,3, \ldots k, k+1, k+2, \ldots, n) \longrightarrow(1,2, \ldots, k+2, k, k+1, \ldots, n) \\ & (1,2,3, \ldots k, k+1, k+2, \ldots, n) \longrightarrow(1,2, \ldots, k+1, k+2, k, \ldots, n) \end{aligned} $$ Consider case (A). For $j=1$, there are $n-3$ possible values of $k$; for $j=2$, there are $n-4$ possibilities for $k$ and so on. Thus the number of permutations with two inversions of this type is $$ 1+2+\cdots+(n-3)=\frac{(n-3)(n-2)}{2} $$ In case (B), we see that there are $n-2$ permutations of each type, since $k$ can take values from 1 to $n-2$. Hence we get $2(n-2)$ permutations of this type. Finally, the number of permutations with two inversions is $$ \frac{(n-3)(n-2)}{2}+2(n-2)=\frac{(n+1)(n-2)}{2} $$ 5. Let $A B C$ be a triangle in which $A B=A C$. Let $D$ be the mid-point of $B C$ and $P$ be a point on $A D$. Suppose $E$ is the foot of perpendicular from $P$ on $A C$. If $\frac{A P}{P D}=\frac{B P}{P E}=\lambda, \frac{B D}{A D}=m$ and $z=m^{2}(1+\lambda)$, prove that $$ z^{2}-\left(\lambda^{3}-\lambda^{2}-2\right) z+1=0 $$ Hence show that $\lambda \geq 2$ and $\lambda=2$ if and only if $A B C$ is equilateral. ## Solution: Let $A D=h, P D=y$ and $B D=D C=a$. We ![](https://cdn.mathpix.com/cropped/2024_06_05_d28c94fd14b266aab03cg-4.jpg?height=532&width=420&top_left_y=924&top_left_x=403) observe that $B P^{2}=a^{2}+y^{2}$. Moreover, $P E=P A \sin \angle D A C=(h-y) \frac{D C}{A C}=\frac{a(h-y)}{b}$, where $b=A C=A B$. Using $A P / P D=(h-$ $y) / y$, we obtain $y=h /(1+\lambda)$. Thus $$ \lambda^{2}=\frac{B P^{2}}{P E^{2}}=\frac{\left(a^{2}+y^{2}\right) b^{2}}{(h-y)^{2} a^{2}} $$ But $(h-y)=\lambda y=\lambda h /(1+\lambda)$ and $b^{2}=a^{2}+h^{2}$. Thus we obtain $$ \lambda^{4}=\frac{\left(a^{2}(1+\lambda)^{2}+h^{2}\right)\left(a^{2}+h^{2}\right)}{a^{2} h^{2}} $$ Using $m=a / h$ and $z=m^{2}(1+\lambda)$, this simplifies to $$ z^{2}-z\left(\lambda^{3}-\lambda^{2}-2\right)+1=0 $$ Dividing by $z$, this gives $$ z+\frac{1}{z}=\lambda^{3}-\lambda^{2}-2 $$ However $z+(1 / z) \geq 2$ for any positive real number $z$. Thus $\lambda^{3}-\lambda^{2}-4 \geq 0$. This may be written in the form $(\lambda-2)\left(\lambda^{2}+\lambda+2\right) \geq 0$. But $\lambda^{2}+\lambda+2>0$. (For example, one may check that its discriminant is negative.) Hence $\lambda \geq 2$. If $\lambda=2$, then $z+(1 / z)=2$ and hence $z=1$. This gives $m^{2}=1 / 3$ or $\tan (A / 2)=m=1 / \sqrt{3}$. Thus $A=60^{\circ}$ and hence $A B C$ is equilateral. Conversely, if triangle $A B C$ is equilateral, then $m=\tan (A / 2)=1 / \sqrt{3}$ and hence $z=(1+\lambda) / 3$. Substituting this in the equation satisfied by $z$, we obtain $$ (1+\lambda)^{2}-3(1+\lambda)\left(\lambda^{3}-\lambda^{2}-2\right)+9=0 $$ This may be written in the form $(\lambda-2)\left(3 \lambda^{3}+6 \lambda^{2}+8 \lambda+8\right)=0$. Here the second factor is positive because $\lambda>0$. We conclude that $\lambda=2$. 6. If $x, y, z$ are positive real numbers, prove that $$ (x+y+z)^{2}(y z+z x+x y)^{2} \leq 3\left(y^{2}+y z+z^{2}\right)\left(z^{2}+z x+x^{2}\right)\left(x^{2}+x y+y^{2}\right) $$ Solution 1: We begin with the observation that $$ x^{2}+x y+y^{2}=\frac{3}{4}(x+y)^{2}+\frac{1}{4}(x-y)^{2} \geq \frac{3}{4}(x+y)^{2} $$ and similar bounds for $y^{2}+y z+z^{2}, z^{2}+z x+x^{2}$. Thus $$ 3\left(x^{2}+x y+y^{2}\right)\left(y^{2}+y z+z^{2}\right)\left(z^{2}+z x+x^{2}\right) \geq \frac{81}{64}(x+y)^{2}(y+z)^{2}(z+x)^{2} $$ Thus it is sufficient to prove that $$ (x+y+z)(x y+y z+z x) \leq \frac{9}{8}(x+y)(y+z)(z+x) $$ Equivalently, we need to prove that $$ 8(x+y+z)(x y+y z+z x) \leq 9(x+y)(y+z)(z+x) $$ However, we note that $$ (x+y)(y+z)(z+x)=(x+y+z)(y z+z x+x y)-x y z $$ Thus the required inequality takes the form $$ (x+y)(y+z)(z+x) \geq 8 x y z $$ This follows from AM-GM inequalities; $$ x+y \geq 2 \sqrt{x y}, \quad y+z \geq 2 \sqrt{y z}, \quad z+x \geq 2 \sqrt{z x} $$ Solution 2: Let us introduce $x+y=c, y+z=a$ and $z+x=b$. Then $a, b, c$ are the sides of a triangle. If $s=(a+b+c) / 2$, then it is easy to calculate $x=s-a, y=s-b, z=s-c$ and $x+y+z=s$. We also observe that $x^{2}+x y+y^{2}=(x+y)^{2}-x y=c^{2}-\frac{1}{4}(c+a-b)(c+b-a)=\frac{3}{4} c^{2}+\frac{1}{4}(a-b)^{2} \geq \frac{3}{4} c^{2}$. Moreover, $x y+y z+z x=(s-a)(s-b)+(s-b)(s-c)+(s-c)(s-a)$. Thus it si sufficient to prove that $$ s \sum(s-a)(s-b) \leq \frac{9}{8} a b c $$ But, $\sum(s-a)(s-b)=r(4 R+r)$, where $r, R$ are respectively the in-radius, the circum-radius of the triangle whose sides are $a, b, c$, and $a b c=4 R r s$. Thus the inequality reduces to $$ r(4 R+r) \leq \frac{9}{2} R r $$ This is simply $2 r \leq R$. This follows from $I O^{2}=R(R-2 r)$, where $I$ is the incentre and $O$ the circumcentre. Solution 3: If we set $x=\lambda a, y=\lambda b, z=\lambda c$, then the inequality changes to $$ (a+b+c)^{2}(a b+b c+c a)^{2} \leq 3\left(a^{2}+a b+b^{2}\right)\left(b^{2}+b c+c^{2}\right)\left(c^{2}+c a+a^{2}\right) $$ This shows that we may assume $x+y+z=1$. Let $\alpha=x y+y z+z x$. We see that $$ \begin{aligned} x^{2}+x y+y^{2} & =(x+y)^{2}-x y \\ & =(x+y)(1-z)-x y \\ & =x+y-\alpha=1-z-\alpha \end{aligned} $$ Thus $$ \begin{aligned} \prod\left(x^{2}+x y+y^{2}\right) & =(1-\alpha-z)(1-\alpha-x)(1-\alpha-y) \\ & =(1-\alpha)^{3}-(1-\alpha)^{2}+(1-\alpha) \alpha-x y z \\ & =\alpha^{2}-\alpha^{3}-x y z \end{aligned} $$ Thus we need to prove that $\alpha^{2} \leq 3\left(\alpha^{2}-\alpha^{3}-x y z\right)$. This reduces to $$ 3 x y z \leq \alpha^{2}(2-3 \alpha) $$ However $$ 3 \alpha=3(x y+y z+z x) \leq(x+y+z)^{2}=1 $$ so that $2-3 \alpha \geq 1$. Thus it suffices to prove that $3 x y z \leq \alpha^{2}$. But $$ \begin{aligned} \alpha^{2}-3 x y z & =(x y+y z+z x)^{2}-3 x y z(x+y+z) \\ & =\sum_{\text {cyclic }} x^{2} y^{2}-x y z(x+y+z) \\ & =\frac{1}{2} \sum_{\text {cyclic }}(x y-y z)^{2} \geq 0 \end{aligned} $$