3. Find (1) the smallest positive period of $f(x)=\sin \frac{1}{2} x+\cos \frac{1}{3} x$;
(2) the smallest positive period of $g(x)=\sin 3 x \cdot \cos 4 x$.
(1) Let $l$ be the period of $f(x)$, then
$$
\begin{aligned}
& \sin \frac{1}{2}(x+l)+\cos \frac{1}{3}(x+l) \\
& =\sin \frac{1}{2} x+\cos \frac{1}{3} x, \\
\therefore \quad & \sin \frac{1}{2}(x+l)-\sin \frac{1}{2} x=\cos \frac{1}{3} x \\
& -\cos \frac{1}{3}(x+l) .
\end{aligned}
$$

Using the sum-to-product identities, we get
$$
\begin{array}{l}
2 \cos \left(\frac{1}{2} x+\frac{l}{4}\right) \sin \frac{l}{4} \\
\equiv-2 \sin \left(\frac{1}{3} x+\frac{l}{6}\right) \sin \left(-\frac{l}{6}\right) \\
\therefore \sin \frac{l}{4} \cdot \cos \left(\frac{1}{2} x+\frac{l}{4}\right) \\
-\sin \frac{l}{6} \sin \left(\frac{1}{3} x+\frac{l}{6}\right)=0
\end{array}
$$

This holds for any real number $x$,
$\therefore \sin \frac{l}{4}=0$, and $\sin \frac{l}{6}=0$. (This means that $\cos \left(\frac{1}{2} x+\frac{l}{4}\right)$ and $\sin \left(\frac{1}{3} x+\frac{l}{6}\right)$ are linearly independent)
$\therefore l=4 k \pi$ and $l=6 k \pi$ (where $k$ is a natural number),
$\therefore$ the smallest value of $l$ is $12 \pi$. Therefore, the smallest positive period of $f(x)=\sin \frac{1}{2} x+\cos \frac{1}{3} x$ is $12 \pi$.
(2) $\because g(x)=\sin 3 x \cdot \cos 4 x=\frac{1}{2}(\sin 7 x - \sin x)$, following the solution in (1), we know that the smallest positive periods of $\sin 7 x$ and $\sin x$ are $\frac{2 \pi}{7}$ and $2 \pi$ respectively. The least common multiple of these periods is $2 \pi$, which is the smallest positive period of $g(x)$.

In general, for a function of the form $\sum_{i=1}^{k} a_{i} \sin n_{i} x + b_{i} \cos n_{i} x$ (where $n_{1}, n_{2}, \cdots, n_{k}$ are distinct positive rational numbers and $a_{i}, b_{i}$ are not both zero), the smallest positive period is the least common multiple of the periods of the individual terms.