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
\]
So, we can express $\tan \theta$ as:
\[
\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
\]
This is the key equation we will work with.
Step 3: Isolate the square root term:
Move $\sec \theta$ to the other side:
\[
\sqrt{\sec^2 \theta - 1} = m - \sec \theta
\]
Now, square both sides of the equation 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
\]
Simplify by canceling the $\sec^2 \theta$ terms on both sides:
\[
-1 = m^2 - 2m \sec \theta
\]
Rearrange the terms to isolate $\sec \theta$:
\[
2m \sec \theta = m^2 + 1
\]
Finally, divide both sides by $2m$ to solve for $\sec \theta$:
\[
\sec \theta = \frac{m^2 + 1}{2m}
\]
Conclusion:
We have proven that:
\[
\sec \theta = \frac{m^2 + 1}{2m}
\]