Solving the differential equation $dr=(r\cos\theta +r\sin\theta)d\theta$ $dr=(r\cos\theta +r\sin\theta)d\theta$ In my book this is under separation of variables then i tried to factor out r and divide both sides then integrate both sides but where can i find my $C_1$? I just got $\ln(r)=\sin\theta-\cos\theta$
 A: When taking an indefinite integral you add a constant of integration
$$\int\frac{1}{r}dr=\int(cos(\theta)+sin(\theta))d\theta$$
$$ln|r|=sin(\theta)-cos(\theta)+C$$
A: From $$\int \frac{\mathrm{d}r}{r} = \int \cos \theta + \sin \theta \, \mathrm{d}\theta$$ we get (since both are indefinite integrals) $$\ln |r| + C_{k_1} = \sin \theta - \cos \theta + C_{k_2}$$
Which is perfectly fine and correct, but given that we have two additive arbitrary constants lying around is kind of ugly and redundant, so we subtract one of the constants from either side, conventionally we tend to leave the additive constant on the RHS. So we get $$\ln |r| = \sin \theta - \cos \theta + (C_{k_2}  - C_{k_1})$$
Because those are just arbitrary constants, we introduce a neater constant $C_1 = C_{k_2} - C_{k_1}$, hence getting $$\bbox[border: solid blue 1px, 10px]{\ln |r| = \sin \theta - \cos \theta + C_1.}$$
A: Your $C_1$ enters the picture because when you integrate your equation, both sides will contain indefinite integrals.
That is, in general if you have a differential equation in the form
$$f(x) dx = g(y)dy,$$
then after integration (assuming that antiderivatives exist, that is, $dF(x)/dx=f(x)$ and $dG(y)/dy=g(y)$), you get
$$F(x)+C_x = G(y)+C_y.$$
Of course having too additive constants is kind of redundant, so just subtract $C_x$ from both sides:
$$F(x)=G(y)+(C_y-C_x),$$
or
$$F(x)=G(y)+C_1,$$
where I just defined $C_1=C_y-C_x$.
