I want to solve the following problem in $\boldsymbol{x} \in \mathbb R^{n}$

$$\begin{array}{ll} \text{maximize} & \boldsymbol{x}^T \boldsymbol{A} \boldsymbol{x}\\ \text{subject to} & \boldsymbol{q}^T \boldsymbol{x} = 1\\ & x_i \geq 0\end{array}$$

where matrix $\boldsymbol{A}$ is positive definite matrix and $x_i$ denotes the $i$-th entry of $\boldsymbol{x}$.

Actually, I have tried to use Lagrangian multiplier. I directly transformed the objective function to $-\boldsymbol{x}^T \boldsymbol{A} \boldsymbol{x} + \lambda ( \boldsymbol{q}^T \boldsymbol{x} - 1 )$ and take its first derivative and set that to zero.

However, the solution obtained did not maximize the objective function, it just makes $\boldsymbol{x}^T\boldsymbol{A} \boldsymbol{x}$ smaller and smaller. Then I found that the solution of $\min_{\boldsymbol{x}} \boldsymbol{x}^T \boldsymbol{A} \boldsymbol{x}$ with the same constraints is the same with that of $\max_{\boldsymbol{x}} \boldsymbol{x}^T \boldsymbol{A} \boldsymbol{x}$.

Any comments would be appreciated!

Update As comments suggested, I changed the situation to $x_i \geq 0, \forall i$. Thus for example, when $\boldsymbol{A}= \left[\begin{matrix} {2 \; 0\\ 0 \;1 }\end{matrix} \right]$ and $\boldsymbol{q} = [1,1]^T$. The problem has a solution $\boldsymbol{x} = [1 ,0]^T$ that maximize the objective function. Can this extend to more general case?