Solving a 1st order homogeneous differential equation Let $(1):y'-a(x)y=0$.
This is the way I am used to solving those :
$\frac{y'}y=a(x)$
$\ln\left({\frac{y}{|\lambda|}}\right)=\int a(x)=A(x)$
$y=\lambda e^{A(x)}$
Several people have told me that this method was not rigorous enough. (especially when I use $\ln$, as $y$ can be $0$ at times.) It has however always worked with me.
What exactly is wrong with this method, and why does it still give good results ?
What is a way to 'fix' this method, while keeping it short ?
 A: The big issue is that you have to justify that you can divide by $y(x)$. It can be tricky.
A rigorous and very easy
approach is simply to guess (using this method, for instance) 
that the solution has the form $Ce^{A(x)}$, 
and to write on your exam paper, only that
$$
x\to y(x) e^{-A(x)}
$$is constant (because its derivative is $0$).
A: Consider the given equation
$y' - a(x)y = 0; \tag{1}$
it is a linear, first order system for $y(x)$.  If we can assume $a(x)$ is continuous, then the key to the success of using the integral
$\int \dfrac{dy}{y} = \int \dfrac{y'}{y} dx \tag{2}$
in deriving the solution
$y(x) = y(x_0) e^{\int_{x_0}^x a(s) ds} \tag{3}$
to (1) lies in the fact that solutions to (1) are unique; this in turn follows from the fact that the "driving term" $f(y, x) = a(x) y$ occurring in (1) is continuous in both $x$ and $y$ and Lipschitz continuous in $y$ as well.  That meeting these criteria ensures uniqueness of solutions to (1) is a well-known and standard result in the theory of ODEs; the reader seeking greater detail may consult Jack K. Hale's Ordinary Differential Equations, chapters I-III or the appendices of the text by Hirsch, Smale, and Devaney.  In any event, uniqueness works for us in the present context as follows:  it informs us that the only solution to (1) which takes on the value zero anywhere is identically zero, everywhere, since $y(x) = 0$ is the only solution with $y(x_1) = 0$ for some $x_1$.  Taking things a step further, we can conclude that $y(x) > 0$ for all $x$ precisely when $y(x_0) > 0$, since $y(x)$ can then never cross or even touch the $x$-axis.  Similarly, $y(x) < 0$ for all $x$ precisely when $y(x_0) < 0$, and for the same reason. It follows that exploiting the integral (2) is legitimate in deriving (3) except when $y(x_0) = 0$; but in that case, we know that $y(x) = 0$ a priori, from the uniqueness argument just presented; there is nothing to calculate or derive.
When $y(x_0) > 0$, hence $y(x) > 0$, the integral (2) may be used directly as is; if $y(x_0) < 0$, so that $y(x) < 0$, then we may by linearity replace (1) with the equivalent equation
$(-y)' - a(x)(-y) = 0, \tag{4}$
together with the initial value $-y(x_0) > 0$; the solution to (4) is clearly
$-y(x) = -y(x_0)e^{\int_{x_0}^x a(s) ds}; \tag{5}$
negating (5) yields the usual expression for $y(x)$.
It follows from the preceding remarks that exploiting the integral (2) to derive the solution to (1) is a completely rigorous and legitimate technique,  with the sole caveat that the case $y(x_0)$ be handled seperately; but as we have seen, that case is the simplest of all.  Of course, the approach suggested by mookid in his/her answer covers all cases at once.  Indeed, evaluating $y(x)e^{-\int_{x_0}^x a(s) ds}$ at $x_0$ yields $y(x_0)$ as the constant value this expression takes, so once again we obtain 
$y(x) = y(x_0)e^{\int_{x_0}^x a(s) ds} \tag{6}$
as the solution to (1).
Hope this helps.  Cheers,
and as ever,
Fiat Lux!!!
