Showing $\int _{0} ^{\pi/4} \frac{\cos^{2022}(x)}{\sin^{2022}(x) + \cos^{2022}(x) } dx \approx \frac{\pi}{4}$ 
Show that $$\int_{0} ^{\pi/4} \frac{\cos^{2022}(x)}{\sin^{2022}(x) + \cos^{2022}(x) } dx \approx \frac{\pi}{4}$$

My method was this: I tried using $x \to \pi/4-x$ conversion but that doesn't lead to common denominator. Next thing I tried was to take help of approximation as the answer too is an approximation, so I thought as $\cos x >\sin x$ in $(0,\pi/4)$, but didn't got a good reason to neglect the $\sin^{2022}(x)$ in comparison to $\cos^{2022}x$. Can anyone explain how we can do so?
Note: also I think at $x= \pi/4$ we cannot neglect at all since both would be equal, so what in that point, will the integral be not a bit more then?
 A: We can start with
$$
\int_0^{\pi/4} \frac{\cos^{2022}x}{\sin^{2022}x+\cos^{2022}x} \,dx = \int_0^{\pi/4} \frac1{\tan^{2022}x+1} \,dx = \int_0^1 \frac1{u^{2022}+1} \frac1{u^2+1} \,du
$$
after setting $u=\tan x$. Since $\dfrac1{u^{2022}+1}<1$ for $x\in(0,1)$, this is clearly less than $\displaystyle\int_0^1 \frac1{u^2+1}\,du = \frac\pi4$. On the other hand, for any $c\in(0,1)$,
\begin{align*}
\int_0^1 \frac1{u^{2022}+1} \frac1{u^2+1} \,du &= \int_0^c \frac1{u^{2022}+1} \frac1{u^2+1} \,du + \int_c^1 \frac1{u^{2022}+1} \frac1{u^2+1} \,du \\
&> \int_0^c \frac1{c^{2022}+1} \frac1{u^2+1} \,du + \int_c^1 \frac1{1^{2022}+1} \frac1{u^2+1} \,du \\
&= \frac1{c^{2022}+1} \arctan c + \frac12 \biggl( \frac\pi4 - \arctan c \biggr),
\end{align*}
which can be analyzed either analytically or numerically. For example, taking $c=0.99568$ in this lower bound yields an approximation no worse than $0.784192$, as compared with $\dfrac\pi4\approx 0.785398$ (and hence this approximation can be no worse than $0.16$% off).
This is an underappreciated technique in my opinion: after trying the most trivial bound possible (here, the integral is bounded above/below by the length of the interval of integration times the maximum/minimum of the integrand), split the object into two pieces and use the trivial bound on each piece separately.
A: Let
$$I_n := \int_{0} ^{\pi/4} \frac{\cos^n(x)}{\sin^n(x) + \cos^n(x) } \,\mathrm{d}x.$$
We have
$$I_n = \frac{\pi}{4} - \int_{0} ^{\pi/4} \frac{\sin^n(x)}{\sin^n(x) + \cos^n(x) } \,\mathrm{d} x .$$
Clearly, $I_n < \frac{\pi}{4}$.
Also, we have
\begin{align*}
 I_n &> \frac{\pi}{4} - \int_{0} ^{\pi/4} \frac{\sin^n(x)}{ \cos^n(x) } \,\mathrm{d} x \\
 &= \frac{\pi}{4} - \int_{0} ^{\pi/4} \tan^n x \,\mathrm{d} x \\
 &= \frac{\pi}{4} - \int_{0} ^{1} \frac{y^n}{1+y^2} \,\mathrm{d} y \\
 &\ge \frac{\pi}{4} - \int_{0} ^{1} y^n(1 - y^2/2) \,\mathrm{d} y\\
 &=  \frac{\pi}{4} - \frac{n+5}{2(n+1)(n+3)}
\end{align*}
where we have used $\frac{1}{1+y^2} \le 1 - y^2/2$
for all $y\in [0, 1]$.
Thus, we have
$$\frac{\pi}{4} - \frac{n+5}{2(n+1)(n+3)} < I_n < \frac{\pi}{4}.$$
Question: Can we obtain asymptotic expansion of $I_n$?
