a, \(x^2+\sqrt{x+2021}=2021\) ĐK \(x\ge-2021\)
<=> \(x^2-2021=-\sqrt{x+2021}\)
Đặt \(\sqrt{x+2021}=a\left(a\ge0\right)\)
=> \(\left\{{}\begin{matrix}x^2-2021=-a\\a^2-2021=x\end{matrix}\right.\)
=> \(\left(x-a\right)\left(x+a\right)+a+x=0\)
<=> \(\left[{}\begin{matrix}x+a=0\\x-a+1=0\end{matrix}\right.\)
+ \(x+a=0\)
=> \(\sqrt{x+2021}=-x\)
=> \(\left\{{}\begin{matrix}x\le0\\x^2-x-2021=0\end{matrix}\right.\)=> \(x=\frac{1-7\sqrt{165}}{2}\)
+ \(x-a+1=0\)
=> \(x+1=\sqrt{x+2021}\)
=> \(\left\{{}\begin{matrix}x\ge-1\\x^2+x-2020\end{matrix}\right.\)=> \(x=\frac{-1+\sqrt{8081}}{2}\)
Vậy \(S=\left\{\frac{-1+\sqrt{8081}}{2};\frac{1-7\sqrt{165}}{2}\right\}\)