I have tried induction on $n$. The result is true for $n=1,2.$ Suppose that the result is true for less than $n$. Let $x,y$ be two adjacent vertices of $G$ and let $H= G-\{x,y\}$.
So $e(H) = e(G) - d(x)-d(y)$, where $e(G)$ is the number of edges of $G$ and $d(v)$ denotes the degree of the vertices. Since $G$ is a triangle-free, $H$ is also triangle free. So by the induction hypothesis $e(H) \leq \frac{(n-2)^2}{4}$. This implies that $$e(G) = e(H) + d(x) + d(y) \leq + \frac{(n-2)^2}{4} + n-1 = \frac{n^2}{4}.$$
But I am studying this result in the book "The Inroduction to Graph Theory" by Douglas B West. He says that induction cannot apply here. I am confused. Please tell me what is wrong with my proof.
