# How to solve $\sin(x)\frac{d}{dx}\beta \left ( x \right )+\cos(x)\beta (x)=1$?

I'm trying to solve $$\sin(x)\frac{d}{dx}\beta \left ( x \right )+\cos(x)\beta (x)=1$$ What I get is : $$\beta (x)=\beta \left ( \alpha \right )e^{\sin(\alpha )-\sin(x)}+e^{-\sin(x)}\int_{\alpha }^{x}e^{\sin(t)}dt$$ But I think that this solution is incorrect .The textbook says that there's exactly one solution that has a finite limit as $x$ tends to $0$ . But all the solutions I get have a finite limit . So what's the correct solution?

-
Note that you can use \sin, \cos for the $\sin,\cos$ functions. see the difference between $sin(x)$ and $\sin(x)$ –  Jean-Sébastien Nov 3 '12 at 20:22
Unless $\beta(x)$ is a special function, I see that since $sin^2(x)+cos^2(x)=1$ which makes $\beta(x)=cos(x)$ is a solution. –  Emmad Kareem Nov 3 '12 at 20:29
@EmmadKareem That was my first thought, but it gives $-\sin^2(x)+\cos^2(x)$, notice the "negative sign" (pun!) –  Logan Stokols Nov 3 '12 at 20:44
@Logan, thanks, I need thicker glasses and a new brain :) –  Emmad Kareem Nov 3 '12 at 20:54

$\sin(x) \beta'(x) + \cos(x) \beta(x) = \sin(x) \beta'(x) + (\sin(x))' \beta(x) = 1$. Hence, $$(\sin(x) \beta(x))' = 1 \implies \sin(x) \beta(x) = x + c \implies \beta(x) = \dfrac{x+c}{\sin(x)}$$ Now as $x \to 0$, we want $\lim_{x \to 0} \beta(x)$ to exist i.e. $\lim_{x \to 0} \dfrac{x+c}{\sin(x)}$ exists i.e. $$\lim_{x \to 0} \dfrac{x+c}{\sin(x)} = 1 + \lim_{x \to 0} \dfrac{c}{\sin(x)} \,\,\,\,\,\,\, \text{exists}.$$ Hence, $c=0$ and therefore $\beta(x) = \dfrac{x}{\sin(x)}$.
To proceed through your way, we have that $$\beta'(x) + \cot(x) \beta(x) = \csc(x)$$ Hence, the integrating factor $I(x) = \exp \left(\displaystyle \int M(y) dy\right) = \exp(\log(\sin(x))) = \sin(x)$. Hence, the solution is $$\beta(x) \sin(x) = \int \csc(y) \sin(y) dy = x + c$$
You can also finish it by observing that if $\lim_{x \to 0} \dfrac{x+c}{\sin(x)}$ exists then, $\lim_{x \to 0} \dfrac{x+c}{\sin(x)}\cdot \sin (x)=0$. –  N. S. Nov 3 '12 at 20:26
But $cos(x)$ is a solution that's finite as $x$ tends to $0$ . So your solution is not the most general right? –  Nabil Nov 3 '12 at 20:41