Is my process for solving $y' + y \tan(x) = \cos^2(x)$ correct?

303 Views Asked by At

So, in trying to solve the linear differential equation: $$y' + y \tan(x) = \cos^2(x),$$ I get that the integrating factor is $| \sec(x)|$. In order to solve for the function $y$, am I supposed to take into account that $\tan(x)$, along with $\cos(x)$, happens to be continuous on the interval, $(0, \pi/2)$? And so now we have that $|\sec(x)|$ = $\sec(x)$, because we are taking into account only the interval $(0, \pi/2)$?

2

There are 2 best solutions below

0
On BEST ANSWER

@K.M : If you got an integrating factor, say $\mu(x)$, then $c\mu(x)$ with any constant $c\neq 0$ are also convenient integrating factors. For example with $c=-1$, then $-\mu(x)$ is also an integrating factor.

So, instead of bother about the absolute value, just apply $\mu(x)$ to the equation and observe that it works and solve the problem.

$$\frac{1}{\cos(x)}\left(y'+y\tan(x) \right)=\frac{1}{\cos(x)}\cos^2(x)$$ $$\frac{y'}{\cos(x)}+\frac{y\sin(x)}{\cos^2(x)}=\cos(x)$$ $$\left(\frac{y}{\cos(x)}\right)'=\cos(x)$$ $$\frac{y}{\cos(x)}=\sin(x)+c_1$$ $$y(x)=\sin(x)\cos(x)+c_1\cos(x)$$

0
On

You only get $|u(x)|=|\sec(x)|$ for the integrating factor if the integration of the homogeneous equation is carried out correctly. As the poles of the secant are also singularities of the differential equation, they separate the possible domains of (proper) solutions. Thus what sign you chose on the intervals between the poles of the function is arbitrary, so you are fully allowed to chose $u(x)=\sec(x)$.