2. Let $f:[0,1] \rightarrow \mathbb{R}$ be a function such that for $x \in\left[0, \frac{\pi}{2}\right]$ we have

$$
2 f(\sin x)+3 f(\cos x)=\sin x
$$

a) determine $f(0)$,

b) determine the function $f$.
Solution. a) If we substitute $x=0$ and $x=\frac{\pi}{2}$ into (1), we obtain the system of linear equations

$$
\left\{\begin{array}{l}
2 f(0)+3 f(1)=0 \\
2 f(1)+3 f(0)=1
\end{array}\right.
$$

solving which gives $f(0)=\frac{3}{5}$.

b) If we introduce the substitution $t=\frac{\pi}{2}-x$, from (1), we get that for $t \in\left[0, \frac{\pi}{2}\right]$ it holds

$$
2 f(\cos t)+3 f(\sin t)=\cos t
$$

or for $x \in\left[0, \frac{\pi}{2}\right]$ it holds

$$
2 f(\cos x)+3 f(\sin x)=\cos x
$$

Solving the system of equations (1) and (2) for the unknowns $f(\sin x)$ and $f(\cos x)$, we get

$$
f(\sin x)=\frac{1}{5}(3 \cos x-2 \sin x)
$$

Finally, setting $\sin x=y$, we get that for $y \in[0,1]$ it holds

$$
f(y)=\frac{3}{5} \sqrt{1-y^{2}}-\frac{2}{5} y
$$

It is easily verified that the obtained function satisfies equation (1).