Gene Naden said:
What I meant to say was that my method, doing all the definite integrals, was very complicated and I would welcome knowing about a simpler method.
Is your question asking how to choose the integrating factor? In general, the solution of $$dy/dx + f(x) y = g(x)$$ on ##x \geq 0## has the form
$$y(x) = c e^{-F(x)} + e^{-F(x)} \int_0^x e^{F(y)} g(y) \, dy,$$
where
$$F(x) = \int_a^x f(t) \, dt$$
If we change the lower limit '##a##' we change ##F## as well; however, that
does not affect the solution ##y(x)!## To see this, just change ##F## to ##F+k## for some constant ##k##. The new ##y## is
$$y_{\text{new}}(x) = c \,e^{-k} e^{-F(x)} + e^{-k} e^{-F(x)} \int_0^x e^{k} e^{F(y)} g(y) \, dy$$
The factors ##e^{-k}## and ##e^k## cancel in the integral term, and the non-integral term just has a different constant ##c_1 = c \,e^{-k}##. Since you determine the constant to match the initial condition (or whatever type of condition you are given), you get the same solution in the end.
So: choose any antiderivatve ##\int fx) \, dx## and forget about the constant of integration. The only thing that changes is the coefficient of the constant term (the ##c## in our formulas above).