6. In $\triangle A B C$, $\angle B=\frac{\pi}{3}, A C=\sqrt{3}$, point $D$ is on side $A B$, $B D=1$, and $D A=D C$. Then $\angle D C A=$ $\qquad$ .
6. $\frac{\pi}{6}$ or $\frac{\pi}{18}$.

From the given, we can set $\angle A=\angle D C A=\theta$.
Then $\angle A D C=\pi-2 \theta$.
Also, $A C=\sqrt{3}$, by the Law of Sines we get
$$
\frac{A C}{\sin 2 \theta}=\frac{C D}{\sin \theta} \Rightarrow C D=\frac{\sqrt{3}}{2 \cos \theta} \text {. }
$$

In $\triangle B D C$,
$$
\angle B D C=2 \theta, \angle B C D=\frac{2 \pi}{3}-2 \theta \text {. }
$$

By the Law of Sines we get
$$
\begin{array}{l}
\frac{C D}{\sin B}=\frac{B D}{\sin \angle B C D} \\
\Rightarrow \frac{\frac{\sqrt{3}}{2 \cos \theta}}{\sin \frac{\pi}{3}}=\frac{1}{\sin \left(\frac{2 \pi}{3}-2 \theta\right)} \\
\Rightarrow \cos \theta=\sin \left(\frac{2 \pi}{3}-2 \theta\right)=\cos \left(2 \theta-\frac{\pi}{6}\right) .
\end{array}
$$

From $0<\theta<\frac{\pi}{2} \Rightarrow-\frac{\pi}{6}<2 \theta-\frac{\pi}{6}<\frac{5 \pi}{6}$
$$
\Rightarrow 2 \theta-\frac{\pi}{6}= \pm \theta \Rightarrow \theta=\frac{\pi}{6} \text { or } \frac{\pi}{18} \text {. }
$$