42. Two vectors are given such that $|\vec{a}|=5,|\vec{b}|=3$, and the angle between them is $45^{\circ}$. Find $(\vec{a}+\vec{b})^{2}$.
Solution. We have $(\vec{a}+\vec{b})^{2}=\vec{a}^{2}+2 \vec{a} \vec{b}+\vec{b}^{2}$. Since $|\vec{a}|=5$ and $|\vec{b}|=3$, then $\vec{a}^{2}=|\vec{a}|^{2}=25, \vec{b}^{2}=|\vec{b}|^{2}=9$, from which $2 \vec{a} \vec{b}=2|\vec{a}| \cdot|\vec{b}| \cos 45^{\circ}=$ $=2 \cdot 5 \cdot 3 \cdot 0.5 \sqrt{2}=15 \sqrt{2}$. Therefore,

$$
(\vec{a}+\vec{b})^{2}=25+15 \sqrt{2}+9=34+15 \sqrt{2}
$$