In $\triangle A B C$, it is known that $A C=7, B C=4$, and a line $C G \perp A B$ intersects $A B$ at point $G$. Also, $\angle G E A=\frac{1}{2} \angle A C B, \frac{A G}{G B}=\frac{5}{2}$. Find the length of $C E$ when $\angle A B C$ is respectively an acute angle and an obtuse angle.
(1) As shown in Figure 2, draw $B F / / C N / / E G$, and let $B F$ intersect the extension of $A E$ at point $F$. Draw $B M \perp$ $N C$ intersecting $C N$ at point $O$.
Given $\angle G E A=\frac{1}{2} \angle A C B$, and $C N / / E G$, we have
$$
\begin{array}{l}
\angle G E A=\frac{1}{2} \angle A C B=\angle A C N, \\
\angle N C B=\angle A C N .
\end{array}
$$

Therefore, $\triangle M C O \cong \triangle B C O$
$$
\Rightarrow M C=C B=4, M O=O B \text {. }
$$

Then $\triangle M C O \backsim \triangle M F B \Rightarrow \frac{M C}{M F}=\frac{M O}{M B}$.
It is easy to see that $M F=8, A F=11$.
Since $\frac{A G}{G B}=\frac{5}{2}$ and $G E / / B F$, we have
$$
A E=\frac{55}{7}, C E=\frac{6}{7} \text {. }
$$
(2) As shown in Figure 3, draw $G F / / B C$ intersecting $A E$ at point $F$.
Given $\frac{A G}{G B}=\frac{5}{2}$, we have
$$
C F=\frac{14}{3}, G F=\frac{20}{3} \text {. }
$$

Also, $\angle G E A=\frac{1}{2} \angle A C B=\frac{1}{2} \angle A F G$
$$
\Rightarrow \angle F G E=\angle F E G \Rightarrow G F=F E \text {. }
$$

Therefore, $C E=C F+G F=\frac{34}{3}$.