Find the largest value of $P=\frac{3x+2y+1}{x+y+6}$

algebra-precalculusinequalitymaxima-minimamultivariable-calculusoptimization

I know there has been a similar question here, but my question is a little bit different

The Problem:
Given that $3(x+y)=x^2+y^2+xy+2$,
then find the maximum value of
\begin{align}
P=\frac{3x+2y+1}{x+y+6}
\end{align}

What I was thinking about is that I'm trying to transform P into a first-degree equation on $x$, which is totally possible using the condition in the problem, and then apply the basic Cauchy inequalities.

However, I haven't been able to figure it out. The other possibility is to apply differentiation like in the problem I mentioned at the beginning of the question. The problem is that I took this problem from Olympiad training, which often does not use differentiation (so there should be a way that doesn't use the method)

So any help is appreciated

Best Answer

For $x=2$ and $y=1$ we obtain a value $1$.

We'll prove that it's a maximal value.

Indeed, we need to prove that $$\frac{3x+2y+1}{x+y+6}\leq1$$ and since by the condition $x+y+6>0,$ we need to prove that: $$2x+y\leq5.$$ Indeed, by the condition again and by C-S we obtain: $$14=(3-x)^2+(x+y)^2+(3-y)^2=$$ $$=\frac{1}{14}(1^2+3^2+2^2)\left((3-x)^2+(x+y)^2+(3-y)^2\right)\geq$$ $$\geq\frac{1}{14}(3-x+3x+3y+6-2y)^2=\frac{1}{14}(2x+y+9)^2,$$ which gives $$2x+y+9\leq14$$ or $$2x+y\leq5$$ and we are done.