The objective is to evaluate the integral:
\[
I = \int_{0}^{\pi/4} \frac{\cos^2 x}{\cos^2 x + 4\sin^2 x} \, dx.
\]
Step 1: Substitution.
Let \( \tan x = t \). Differentiating with respect to \( x \), we get \( \sec^2 x \, dx = dt \).
The limits of integration are transformed as follows:
When \( x = 0 \), \( t = \tan(0) = 0 \).
When \( x = \frac{\pi}{4} \), \( t = \tan(\frac{\pi}{4}) = 1 \).
We can rewrite \( \cos^2 x \) and \( \sin^2 x \) in terms of \( t \). Since \( \sec^2 x = 1 + \tan^2 x = 1 + t^2 \), we have \( \cos^2 x = \frac{1}{1+t^2} \) and \( \sin^2 x = \frac{\tan^2 x}{\sec^2 x} = \frac{t^2}{1+t^2} \).
Substituting these into the integral:
\[
I = \int_{0}^{1} \frac{\frac{1}{1+t^2}}{\frac{1}{1+t^2} + 4 \cdot \frac{t^2}{1+t^2}} \, dt.
\]
Simplifying the expression inside the integral:
\[
I = \int_{0}^{1} \frac{\frac{1}{1+t^2}}{\frac{1 + 4t^2}{1+t^2}} \, dt = \int_{0}^{1} \frac{1}{1 + 4t^2} \, dt.
\]
Step 2: Further simplification.
The integral is now:
\[
I = \int_{0}^{1} \frac{1}{1 + 4t^2} \, dt.
\]
Step 3: Integration.
This integral can be evaluated using the arctangent formula. We can rewrite the denominator:
\[
I = \int_{0}^{1} \frac{1}{1 + (2t)^2} \, dt.
\]
Let \( u = 2t \). Then \( du = 2 \, dt \), so \( dt = \frac{1}{2} \, du \).
The limits of integration change:
When \( t = 0 \), \( u = 2(0) = 0 \).
When \( t = 1 \), \( u = 2(1) = 2 \).
Substituting these into the integral:
\[
I = \int_{0}^{2} \frac{1}{1 + u^2} \cdot \frac{1}{2} \, du = \frac{1}{2} \int_{0}^{2} \frac{1}{1 + u^2} \, du.
\]
The integral of \( \frac{1}{1+u^2} \) is \( \tan^{-1}(u) \).
\[
I = \frac{1}{2} \left[ \tan^{-1}(u) \right]_{0}^{2}.
\]
Step 4: Evaluate the definite integral.
Substituting the limits of integration:
\[
I = \frac{1}{2} \left( \tan^{-1}(2) - \tan^{-1}(0) \right).
\]
Since \( \tan^{-1}(0) = 0 \):
\[
I = \frac{1}{2} \tan^{-1}(2).
\]
Step 5: Final result.
The simplified value of the integral is:
\[
I = \frac{1}{2} \tan^{-1}(2).
\]
Final Answer:
\[
\boxed{\frac{1}{2} \tan^{-1} 2}.
\]