A question about extending solutions of an ODE Suppose I have two functions $f_1(x)$ and $f_2(x)$, which are related by the differential equation:
$$\cos(x)f_1'(x)=−\sin(x)f_2'(x)$$
I would like to find a solution over $x\in[\frac\pi6,\pi]$ such that for $x\in[\frac\pi6,\frac\pi3], f_1(x)=b_1,f_2(x)=c$, and for $x\in[3\frac\pi4,\pi], f_1(x)=b_2,f_2(x)=c$. The values $c,b_i$ are constants.
I can't see any obstruction to doing this and expect there are many solutions, but I am rather embarrassingly not sure:
How one goes about proving that there are solutions to this problem?
 A: Define the vector valued function $\mathbf{f}(x)=(f_1(x),f_2(x))$. Your condition means that $$(\cos x,\sin x) \cdot \mathbf{f}'(x) \equiv 0 $$
so that the vectors are perpendicular. This means that $\mathbf{f}'(x)$ is proportional to the vector $(-\sin x , \cos x)$, so that there exists some function $\lambda(x)$ such that 
$$f_1'(x)=-\lambda(x) \sin(x) \\ f_2'(x)=+\lambda(x) \cos(x) $$
These two equations can be solved to give
$$f_1(x)=-\int_{\pi/6}^x \lambda(t) \sin(t) dt+A \\
f_2(x)=\int_{\pi/6}^x \lambda(t) \cos(t) dt+B $$
Where $A,B$ are arbitrary constants, and $\lambda$ is an arbitrary function. We would now like to satisfy the remaining conditions:
$$-\int_{\pi/6}^x \lambda(t) \sin(t) dt+A=b_1 \; \forall x \in \left[ \frac{\pi}{6}, \frac{\pi}{3} \right] \\
\int_{\pi/6}^x \lambda(t) \cos(t) dt+B=c \; \forall x \in \left[ \frac{\pi}{6}, \frac{\pi}{3} \right]   \\
-\int_{\pi/6}^x \lambda(t) \sin(t) dt+A=b_2 \; \forall x \in \left[ 3\frac{\pi}{4}, \pi \right] \\
\int_{\pi/6}^x \lambda(t) \cos(t) dt+B=c \; \forall x \in \left[ 3\frac{\pi}{4}, \pi \right] $$
Differentiating the first condition in the open interval $\left( \frac{\pi}{6},\frac{\pi}{3} \right)$ gives
$$-\lambda(x) \sin(x)=0 $$ there. Since $\sin$ has no zeros in that interval we must have $\lambda(x) \equiv 0$ in that open interval. This reduces the first condition to the simple 
$$0+A=b_1, $$ so that we should take $A=b_1$. The second condition reduces similarly to $B=c$.
The same reasoning gives $\lambda(x) \equiv 0$ in the open interval $\left( 3 \frac{\pi}{4}, \pi \right)$ , which simplifies the remaining two conditions to $$-\int_{\pi/3}^{3 \pi/4} \lambda(t) \sin(t) dt+A=b_2, $$ and $$\int_{\pi/3}^{3 \pi/4} \lambda(t) \cos(t) dt+B=c. $$
Plugging in the values we found for $A,B$ gives the remaining two conditions as
$$-\int_{\pi/3}^{3 \pi/4} \lambda(t) \sin(t) dt=b_2-b_1, $$ and $$\int_{\pi/3}^{3 \pi/4} \lambda(t) \cos(t) dt=0. $$
