4. 24 Given that the difference of the squares of the two roots of $x^{2} \cos A-2 x+\cos A=0$ is $\frac{3}{8}$, find the value of $A$ $(0<A<\pi)$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
[Solution] Let $\cos A \neq 0$ (if $\cos A=0$, it does not meet the problem's requirements).
Rewrite the original equation as: $x^{2}-\frac{2}{\cos A} x+1=0$. Let the two roots be $\alpha$ and $\beta$. By Vieta's formulas and the problem's conditions, we have
$$\left\{\begin{array}{l}
\alpha+\beta=\frac{2}{\cos A} \\
\alpha \beta=1 \\
\alpha^{2}-\beta^{2}=\frac{3}{8}
\end{array}\right.$$

From (2), $\beta=\frac{1}{\alpha}$. Substituting into (3),
we get $\alpha^{2}-\frac{1}{\alpha^{2}}=\frac{3}{8}$, which simplifies to $8 \alpha^{4}-3 \alpha^{2}-8=0$,
$$\alpha^{2}=\frac{1}{16}(3 \pm \sqrt{9+256}) \text {, since } \alpha^{2}>0 \text {, }$$

we have
$$\alpha^{2}=\frac{1}{16}(\sqrt{265}+3)$$

Substituting into (3), $\beta^{2}=\alpha^{2}-\frac{3}{8}=\frac{1}{16}(\sqrt{265}-3)$,
Squaring both sides of (1) gives $\alpha^{2}+2 \alpha \beta+\beta^{2}=\frac{4}{\cos ^{2} A}$,

Substituting (2), (4), and (5) into (6) yields $\frac{\sqrt{265}+16}{8}=\frac{4}{\cos ^{2} A}$.
Thus, $\cos ^{2} A=\frac{32}{9}(\sqrt{265}-16)$,
$$\sin ^{2} A=1-\cos ^{2} A=\frac{1}{9}(521-32 \sqrt{265})$$

Since $0 < \sin A < 1$ and $\sin ^{2} A > 0$,
we have
$$\begin{aligned}
\sin A & =\frac{1}{3}(\sqrt{265}-16) \approx \frac{1}{3}(16.27882-16) \\
& =0.09294 \\
A & \approx 5^{\circ} 20^{\prime} \text { or } A \approx 174^{\circ} 40^{\prime} .
\end{aligned}$$