<s>[INST] Let $a, b, c$ be positive real numbers such that $a + 2b + 3c = 26$ and $a^2 + b^2 + c^2 = 52$. Find the largest possible value of $a$.
I used the Cauchy Schwarz inequality $(ax+by+cz)^2 \leq (a^2+b^2+c^2)(x^2+y^2+z^2)$ as follows:
$a + 2b + 3c = 26$ is given; adding $a$ to both sides gives $2a + 2b + 3c = 26+a$. Then, we have $x = 2$, $y=2$, $z=3$. Putting this all into the inequality, we get:
$(ax+by+cz)^2 \leq (a^2+b^2+c^2)(x^2+y^2+z^2)$
$(2a+2b+3c)^2 \leq (a^2+b^2+c^2)(2^2+2^2+3^2)$
$(26+a)^2 \leq (52)(17)$
$(26+a)^2 \leq 884$
$26 + a \leq \sqrt{884}$
$a \leq 2\sqrt{221} - 26 \approx 3.73$
However, the listed answer gives $a \leq \frac{26}{7} \approx 3.71$. What am I doing wrong?
 [/INST] Knowing the answer, it is not hard to construct the right CS inequality to solve your problem:
$$52\cdot (13^2+12^2+18^2) \ge (13a+12b+18c)^2 = (7a+6\cdot 26)^2 \implies a \le \frac{26}7$$
It is easy to check equality is attained when $a = \frac{26}7, b = \frac{24}7, c = \frac{36}7$. 

If you don't know the answer to start with, your method can be modified a bit to give the result.  We start with
$$52 \cdot \left(x^2+y^2+z^2 \right) \ge (x a + y b + z c)^2 \tag{1}$$
As the RHS needs to be of form $\left(\alpha a+\beta(a+2b+3c)\right)^2$ to isolate $a$, so we let $y = 2, z = 3$.  Thus we have  
$$52 \cdot \left(x^2+4+9 \right) \ge \left(x a + 2 b + 3 c \right)^2 =\left((x-1) a + 26 \right)^2$$
Equality conditions give
$$\frac{a}x=\frac{b}2=\frac{c}3 \implies b = \frac{2a}x, c = \frac{3a}x$$
and the initial conditions give
$$a=26\frac{x}{x+13}, \quad a^2 = 52\frac{x^2}{x^2+13} \implies x = \frac{13}6, a=\frac{26}7$$
</s>