4.036. The sum of the first three terms of a geometric progression is 21, and the sum of their squares is 189. Find the first term and the common ratio of this progression.
## Solution.

From the condition we have

$$
\begin{aligned}
& \left\{\begin{array} { l } 
{ b _ { 1 } + b _ { 2 } + b _ { 3 } = 21, } \\
{ b _ { 1 } ^ { 2 } + b _ { 2 } ^ { 2 } + b _ { 3 } ^ { 2 } = 189, }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
b_{1}+b_{1} q+b_{1} q^{2}=21, \\
b_{1}^{2}+b_{1}^{2} q^{2}+b_{1}^{2} q^{4}=189,
\end{array}\right.\right. \\
& \Leftrightarrow\left\{\begin{array}{l}
b_{1}\left(1+q+q^{2}\right)=21, \\
b_{1}^{2}\left(1+q^{2}+q^{4}\right)=189
\end{array}\right.
\end{aligned}
$$

Dividing the second equation of the system by the first, we get $\frac{b_{1}\left(q^{4}+q^{2}+1\right)}{q^{2}+q+1}=9$, and then dividing the numerator of this fraction by the denominator, we obtain $b_{1}\left(q^{2}-q+1\right)=9$.

The system has the form

$$
\left\{\begin{array}{l}
b_{1}\left(q^{2}+q+1\right)=21, \\
b_{1}\left(q^{2}-q+1\right)=9,
\end{array} \Rightarrow \frac{21}{q^{2}+q+1} \cdot\left(q^{2}-q+1\right)=9 \Leftrightarrow 2 q^{2}-5 q+2=0\right.
$$

from which $q_{1}=\frac{1}{2}, q_{2}=2$. Then $b_{1}=12$ or $b_{1}=3$.

Answer: 1) 12, $\left.\frac{1}{2} ; 2\right) 3,2$.