Example 5 Find the real solution of the equation $\sqrt{1+\sqrt{1+x}}=\sqrt[3]{x}$.
$(2015$, Finnish High School Mathematics Competition)
【Analysis】Substitution can make the structure of the equation more elegant, facilitating subsequent observation and processing. Sometimes substitution can also reduce the degree of the equation.
Let $\sqrt{1+x}=t$. Then
$$
\sqrt{1+t}=\sqrt[3]{t^{2}-1} \Rightarrow(1+t)^{3}=\left(t^{2}-1\right)^{2} \text {. }
$$

Since $1+t>0$, we have
$$
1+t=(t-1)^{2}
$$
$\Rightarrow t=0$ or $3 \Rightarrow x=-1$ or 8.
Upon verification, $x=-1$ does not satisfy the equation and should be discarded.
Therefore, the root of the original equation is $x=8$.