The von Neumann entropy of a pure state of a bipartite system $A \times B$ is given by the partial trace
(1)where $\lambda_i$ are the Schmidt coefficients in the Schmidt decomposition, satisfying $\sum\lambda_i^2 = 1$, and $K$ is the Schmidt rank.
We will show below that a function $f(x_1,\ldots,x_k) = \sum_{i=1}^kx_i\log_2x_i$, under the constraint $\sum_{i=1}^k x_i = 1$ for positive $x_i$, has its maximum when $x_i = 1/k$.
This means, that $S$ is max when $\lambda_i = 1/\sqrt K$ and $S$ then has the value:
(2)The maximum value of $S$ is attained when the Schmidt rank is max: $K = m$, that is, $S = \log_2 m$.
For example, for a two-qubit subsystem $B$, $m = 2^2$ and $S = 2$ (cf. Example 10.2.4).
Now, let's find the maximum of $f(x_1,\ldots,x_k) = \sum_{i=1}^kx_i\log_2x_i$ under the constraint $g(x_1,\ldots,x_k) = \sum_{i=1}^k x_i = 1$ by the use Lagrange multipliers. Since a maximum point of a contour curve of $f$ touches the contour of $g$ in a single point, the gradient vectors of $f$ and $g$ must be proportional (parallel) in that point:
(3)Since
(4)we have to solve the following for $x_1,\ldots,x_k, L$
(5)This has solution $x_i = 1/k$ (and $L = \frac1{\log(2)} - \log_2 k$).