5. Let $\frac{1+\sin x}{\cos x}=\frac{22}{7}$, and $\frac{1+\cos x}{\sin x}=\frac{m}{n}\left(\frac{m}{n}\right.$ be the simplest fraction). Then $m+n=$ $\qquad$
5. 44 .

Notice that, $\sin x=2 \sin \frac{x}{2} \cdot \cos \frac{x}{2}$
$$
\begin{array}{l}
\cos x=\cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}, \\
1=\cos ^{2} \frac{x}{2}+\sin ^{2} \frac{x}{2} \text {. } \\
\text { Given } \frac{1+\sin x}{\cos x}=\frac{22}{7} \\
\Rightarrow \frac{1+\sin x}{\cos x} \\
=\frac{\cos ^{2} \frac{x}{2}+\sin ^{2} \frac{x}{2}+2 \sin \frac{x}{2} \cdot \cos \frac{x}{2}}{\cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}} \\
=\frac{\cos \frac{x}{2}+\sin \frac{x}{2}}{\cos \frac{x}{2}-\sin \frac{x}{2}}=\frac{22}{7} \\
\Rightarrow 15 \cos \frac{x}{2}=29 \sin \frac{x}{2} \\
\Rightarrow \frac{m}{n}=\frac{1+\cos x}{\sin x} \\
=\frac{1+2 \cos ^{2} \frac{x}{2}-1}{2 \sin \frac{x}{2} \cdot \cos \frac{x}{2}}=\frac{\cos \frac{x}{2}}{\sin \frac{x}{2}}=\frac{29}{15} \\
\Rightarrow m+n=44 \text {. } \\
\end{array}
$$