Step 1: Start with the given equation:
We are given that \( \tan \theta + \sec \theta = m \). We need to prove that \( \sec \theta = \frac{m^2 + 1}{2m} \).
Step 2: Express \( \tan \theta \) in terms of \( \sec \theta \):
We know that \( \tan^2 \theta + 1 = \sec^2 \theta \). Thus, we can express \( \tan \theta \) in terms of \( \sec \theta \):
\[
\tan \theta = \sqrt{\sec^2 \theta - 1}
\]
Substitute this into the given equation \( \tan \theta + \sec \theta = m \):
\[
\sqrt{\sec^2 \theta - 1} + \sec \theta = m
\]
Now, isolate the square root term on one side of the equation:
\[
\sqrt{\sec^2 \theta - 1} = m - \sec \theta
\]
Square both sides to eliminate the square root:
\[
\sec^2 \theta - 1 = (m - \sec \theta)^2
\]
Expand the right-hand side:
\[
\sec^2 \theta - 1 = m^2 - 2m \sec \theta + \sec^2 \theta
\]
Now, cancel out \( \sec^2 \theta \) from both sides:
\[
-1 = m^2 - 2m \sec \theta
\]
Rearrange the equation to isolate \( \sec \theta \):
\[
2m \sec \theta = m^2 + 1
\]
Finally, divide both sides by \( 2m \):
\[
\sec \theta = \frac{m^2 + 1}{2m}
\]
Conclusion:
We have shown that \( \sec \theta = \frac{m^2 + 1}{2m} \), as required.