To solve the problem, we need to find the constants \( A \) and \( B \) given the function \( f(x) = A \sin\left(\frac{\pi x}{2}\right) + B \), the derivative condition \( f'\left(\frac{1}{2}\right) = \sqrt{2} \), and the integral condition \( \int_0^1 f(x) \, dx = \frac{2A}{\pi} \).
### Step 1: Differentiate \( f(x) \)
The first step is to differentiate \( f(x) \):
\[
f'(x) = A \cdot \frac{d}{dx}\left(\sin\left(\frac{\pi x}{2}\right)\right) + 0 = A \cdot \cos\left(\frac{\pi x}{2}\right) \cdot \frac{\pi}{2}
\]
Thus,
\[
f'(x) = \frac{A\pi}{2} \cos\left(\frac{\pi x}{2}\right)
\]
### Step 2: Evaluate \( f'\left(\frac{1}{2}\right) \)
Now, we evaluate the derivative at \( x = \frac{1}{2} \):
\[
f'\left(\frac{1}{2}\right) = \frac{A\pi}{2} \cos\left(\frac{\pi \cdot \frac{1}{2}}{2}\right) = \frac{A\pi}{2} \cos\left(\frac{\pi}{4}\right) = \frac{A\pi}{2} \cdot \frac{1}{\sqrt{2}} = \frac{A\pi}{2\sqrt{2}}
\]
We know from the problem statement that \( f'\left(\frac{1}{2}\right) = \sqrt{2} \). Therefore, we set up the equation:
\[
\frac{A\pi}{2\sqrt{2}} = \sqrt{2}
\]
### Step 3: Solve for \( A \)
To find \( A \), we multiply both sides by \( 2\sqrt{2} \):
\[
A\pi = 2 \cdot 2 = 4
\]
Thus,
\[
A = \frac{4}{\pi}
\]
### Step 4: Evaluate the integral \( \int_0^1 f(x) \, dx \)
Next, we compute the integral:
\[
\int_0^1 f(x) \, dx = \int_0^1 \left(A \sin\left(\frac{\pi x}{2}\right) + B\right) dx
\]
This can be split into two parts:
\[
= A \int_0^1 \sin\left(\frac{\pi x}{2}\right) dx + \int_0^1 B \, dx
\]
The integral of \( B \) over the interval \( [0, 1] \) is simply \( B \):
\[
\int_0^1 B \, dx = B
\]
### Step 5: Solve the integral \( \int_0^1 \sin\left(\frac{\pi x}{2}\right) dx \)
To solve \( \int_0^1 \sin\left(\frac{\pi x}{2}\right) dx \), we use the substitution \( u = \frac{\pi x}{2} \), which gives \( dx = \frac{2}{\pi} du \). Changing the limits, when \( x = 0 \), \( u = 0 \) and when \( x = 1 \), \( u = \frac{\pi}{2} \):
\[
\int_0^1 \sin\left(\frac{\pi x}{2}\right) dx = \int_0^{\frac{\pi}{2}} \sin(u) \cdot \frac{2}{\pi} du = \frac{2}{\pi} \left[-\cos(u)\right]_0^{\frac{\pi}{2}} = \frac{2}{\pi} \left[-\cos\left(\frac{\pi}{2}\right) + \cos(0)\right] = \frac{2}{\pi} (0 + 1) = \frac{2}{\pi}
\]
### Step 6: Substitute back into the integral equation
Now substituting back into the integral equation:
\[
\int_0^1 f(x) \, dx = A \cdot \frac{2}{\pi} + B = \frac{2A}{\pi}
\]
Given that \( \int_0^1 f(x) \, dx = \frac{2A}{\pi} \), we have:
\[
\frac{2A}{\pi} + B = \frac{2A}{\pi}
\]
This implies:
\[
B = 0
\]
### Final Values
Thus, the constants are:
\[
A = \frac{4}{\pi}, \quad B = 0
\]