CM: \(a=\frac{1}{2}\sqrt{\sqrt{2}+\frac{1}{8}}-\frac{\sqrt{2}}{8}\Rightarrow a+\frac{\sqrt{2}}{8}=\frac{1}{2}\sqrt{\sqrt{2}+\frac{1}{8}}\)
\(\Leftrightarrow\left(a+\frac{\sqrt{2}}{8}\right)^2=\left(\frac{1}{2}\sqrt{\sqrt{2}+\frac{1}{8}}\right)^2\)\(\Leftrightarrow a^2+\frac{a\sqrt{2}}{4}+\frac{1}{32}=\frac{1}{4}\left(\sqrt{2}+\frac{1}{8}\right)\Leftrightarrow a^2+\frac{2\sqrt{a}}{4}+\frac{1}{32}=\frac{\sqrt{2}}{4}+\frac{1}{32}\)
\(\Leftrightarrow4a^2+\sqrt{2}a-\sqrt{2}=0\)
Theo trên: \(4a^2+\sqrt{2}a-\sqrt{2}=0\Rightarrow a^2=\frac{\sqrt{2}\left(1-a\right)}{4}\Rightarrow a^4=\frac{a^2-2a+1}{8}\)
\(\Rightarrow a^4+a+1=\frac{a^2-2a+1}{8}+a+1=\left(\frac{a+3}{2\sqrt{2}}\right)^2\)
\(B=a^2+\sqrt{a^4+a+1}=a^2+\frac{a+3}{2\sqrt{2}}=\frac{2\sqrt{2}a^2+a+3}{2\sqrt{2}}\)\(=\frac{4a^2+\sqrt{2}a+3\sqrt{2}}{4}=\frac{4\sqrt{2}}{4}=\sqrt{2}\)