To solve the integral \(\int_{0}^{\sqrt{\ln\left(\frac{\pi}{2}\right)}} \cos\left(e^{x^2}\right)\, 2x e^{x^2}\, dx\), we will use a substitution method. Let's solve it step by step:
- We start by introducing a substitution. Let \( u = e^{x^2} \). This leads to \( du = 2x e^{x^2} dx \), which makes \( du = 2x u dx \). Thus, \( dx = \frac{du}{2x u} = \frac{du}{u \cdot 2x} \).
- Now, we adjust the limits of integration for \( u \). When \( x = 0 \), \( u = e^{0^2} = 1 \). When \( x = \sqrt{\ln\left(\frac{\pi}{2}\right)} \), \( u = e^{(\sqrt{\ln\left(\frac{\pi}{2}\right)})^2} = e^{\ln\left(\frac{\pi}{2}\right)} = \frac{\pi}{2} \).
- Using these substitutions, the integral becomes:
\(\int_{1}^{\frac{\pi}{2}} \cos(u) \, du\)
- Now, integrate \(\cos(u)\) with respect to \( u \):
- The integral of \(\cos(u)\) is \(\sin(u) + C\), where \( C \) is the constant of integration.
- Evaluate this from \( u = 1 \) to \( u = \frac{\pi}{2} \):
- \(\sin\left(\frac{\pi}{2}\right) - \sin(1)\)
- \(\sin\left(\frac{\pi}{2}\right) = 1\), so the expression becomes \(1 - \sin(1)\).
Thus, the value of the integral is \(1 - \sin(1)\).
The correct answer is \(1-\sin 1\).