A linear first-order differential equation is one that is in the form, or can be placed in the form, $$\frac{dy}{dx} +p(x)\,y=q(x).$$ The ease with which a linear equation can be solved is very dependent on the form in which it is presented. For example, consider the two equations
\begin{eqnarray} (\cos x) \, \frac{dy}{dx}+(\sin x)\, y &=& 1,\\ (\sec x) \, \frac{dy}{dx}+(\sec x\,\tan x)\, y &=& \sec^2 x,\\ \end{eqnarray}
These two equations are actually equivalent: both may be reduced, by dividing throughout by the coefficient of dy/dx, to $$\frac{dy}{dx}+(\tan x)\,y=\sec x.$$ Yet the first equation is very difficult to deal with as it stands, whereas the second is easy. That's because the left-hand-side of the second happens to be what we call exact: that is, it's equal to the derivative of something. The expression $$(\sec x) \, \frac{dy}{dx}+(\sec x\,\tan x)\, y$$ happens to be equal to $$\frac{d}{dx} [(\sec x)\,y].$$ The reason this is such an advantage is that since we know that $$\frac{d}{dx} [(\sec x)\,y]=\sec^2 x,$$ we can simply integrate both sides to obtain $$(\sec x)\,y=\tan x + c,$$ and our solution is $$y=\sin x + c\,\cos x.$$ So: what we need is a reliable way of taking linear differential equations and rearranging them so that their left-hand-sides are exact. The following technique will work every time, as long as you can do the integrals.
So, for example, consider the differential equation $$x\,\frac{dy}{dx}-y==x^2.$$
If we're also told, for example, that y(1)=0, then we can calculate the value of c. From our solution, $$0=1+c,$$ and therefore c=-1 and $$y=x^2-x.$$