Pick a smart function Our teacher wants us to find a function $f$ on $(0,\pi)$ such that
$$\sqrt{\sin(x)} f(x)^{\frac{1}{4}} =k_1 + \cos(x)$$ and $$\sqrt{\sin(x)}  f(x)^{-\frac{1}{4}} = k_2 + \cos(x).$$ The two constants $k_1$ and $k_2$ are fixed and explicitely known to us.
As our teacher is a lovely person, this function must exist, although the problem may be not that easy. 
By the way: Does anybody know whether there is a systematic way of solving this problem?
 A: Multiply the two equations to get rid of $f(x)$:
$$\sin x=(k_1+\cos x)(k_2+\cos x).$$
We have
$$\sin0=0=(k_1+1)(k_2+1)=k_1k_2+k_1+k_2+1,$$
$$\sin\frac\pi2=1=k_1k_2,$$
then
$$k_1+2+k_2=0,$$
$$k_1^2+2k_1+1=0.$$
The only solution of the system is $k_1=k_2=-1$, which does not work for other values of $x$, such as $\pi$.
The question has no solution.
A: EDIT: The Problem statement was significantly changed by editing, so all below the hirst horizontal line bleow is no longer applicable.
Multiply both equations to find
$$\tag1 \sin x = k_1k_2+(k_1+k_2)\cos x +\cos^2x$$
Substituting $\pi-x$ for $x$, we find $$\sin x = k_1k_2-(k_1+k_2)\cos x+\cos^2 x,$$
hence $(k1+k_2)\cos x$ is identically $0$, which implies $k_1+k_2=0$. 
At $x=\frac\pi2$, equation $(1)$  implies $1=k_1k_2$. We conclude that $k_1=-k_2=\pm i$.
Then from the first equation we find
$$ f(x)=\left(\frac{\pm1+\cos x}{\sqrt{\sin x}}\right)^4=\frac{(\pm i+\cos x)^4}{\sin^2x}$$
though speaking of $f^{\pm\frac14}$ is then troublesome.-

Multiply both equations to find
$$ \sin^2x = k_1k_2+(k_1+k_2)\cos x +\cos^2x$$
so that
$$ -\cos2x=\sin^2x-\cos^2x = k_1k_2+(k_1+k_2)\cos x$$
The left hand side is periodic with period $\pi$, the right hand side is either constant or has minimal period $2\pi$. Hence no such $f$ can exist.

If we replace the second equation with $\ldots = k_2-\cos x$, we obtain instead:
$$ \sin^2x = k_1k_2+(k_2-k_1)\cos x -\cos^2x$$
so that 
$$ 1 = k_1k_2+(k_2-k_1)\cos x.$$
For this to hold for all $x$, we need $k_1=k_2$ and then $k_1k_2=1$, i.-e.-$k_1=k_2=\pm1$.
Then we can solve the first equiation  $$f(x)=\left(\frac{\pm1+\cos x}{\sin x}\right)^4$$
By comparing signs, we see that only $k_{1,2}=+1$ makes sense and the equations hold only when $\sin x\ge 0$.
