# In solving this linear differential equation, do have to consider cases for the integrating factor $\mu(\theta) = |\sec(\theta)|$?

Consider the following first order, linear differential equation

$$\frac{dr}{d\theta} + r\tan(\theta) = \sec(\theta)$$

My question is with regards to the integrating factor $\mu(\theta)$. By definition of the integrating factor and evaluating the integral, we have

\begin{align*} \mu(\theta) &= \mathrm{exp}\bigg[\int \tan(\theta) \, d\theta \bigg] \\\\ &= \mathrm{exp}\big[\ln|\sec(\theta)|\big]\\\\ &= |\sec(\theta)| \end{align*}

From this point forward do we have to consider the two cases for $|\sec(\theta)|$, one where it's positive and the other when it is negative when solving differential equation? Thanks!

• It doesn't matter, since the minus sign will cancel out, leaving the same equation and the same solution – Dylan Jan 17 '18 at 4:16

No, that is not necessary, you can always use $\mu(x)=\sec(x)$ between the poles $k\pi$ of the secant function which are singularities of the ODE. The maximal interval of any solution has the form $((k-\frac12)\pi,(k+\frac12)\pi)$.
Indeed $$\frac{d}{dθ}\frac{r(θ)}{\cosθ}=\frac{r'\cosθ+r\sinθ}{\cos^2θ}=\frac1{\cos^2θ}.$$
Note that you are multiplying both sides of your equation, $$\frac{dr}{d\theta} + r\tan(\theta) = \sec(\theta)$$ by the integrating factor.
It really does not matter if you multiply both sides by $sec(\theta)$ or by - $sec(\theta)$
In both cases you will get the solution $$r = sin(\theta )+ C cos(\theta )$$