  We prove uniform bounds for the Petersson norm of the cuspidal part of the
theta series. This gives an improved asymptotic formula for the number of
representations by a quadratic form. As an application, we show that every
integer $n \neq 0,4,7 \,(\operatorname{mod}8)$ is represented as $n= x_1^2 +
x_2^2 + x_3^3$ for integers $x_1,x_2,x_3$ such that the product $x_1x_2x_3$ has
at most 72 prime divisors.
