# Constants in general solution of a differential equation.

Wherever a general solution to a first degree, first order differential equation has been given in my book, I've found that they use either ln|C| or C or $e^C$ as the constant of integration obtained. What's the catch? When to use which?

• It's a matter of convenience. Pick the one that make the solution easier to work with. (Of course, you can only use $e^C$ if the constant must be positive.) Mar 18, 2017 at 8:23

So said, they haven't the same value. Because the examples you give,they seem to come from a equation of this type:

$y'-y/x=0$.

It's very easy, a separable one: $\mathrm dy/\mathrm dx-y/x=0$; $\mathrm dy/y=\mathrm dx/x$

We can integrate both sides, leading to $\ln\vert y\vert+c_1=\ln\vert x\vert +c_2$ as solution. Because the constants are unknown (before the initial conditions are set), we can manipulate them and/or redefine them:

Stipulating $k=c_2-c_1$ we can write: $\ln\vert y\vert=\ln\vert x\vert+k$ Taking the exponential in both sides:

$y=\pm xe^k$ Now, defining $k_1=\pm e^k$, $y=k_1x$ (but, be careful: $k_1\ne 0$). So said, the constant of integration have diferent values in each of the cases. If you set the initial conditions, e.g. $y(1)=2$ it can be seen: $k_1=2$, $k=\ln2$ and plus sign for the first one.

• You mean $y=\pm xe^k$, $k_1=\pm e^k$ when resolving the logarithms. Also need to add in the case $k_1=0$ from the initially excluded constant solution. Mar 18, 2017 at 9:55
• You are right and I was aware of this. I thought of an example using the form for the constants, the OP chose and allowing some inaccuracies to make clear the point of the question. I see now it's not a big problem solve it well. Mar 18, 2017 at 10:11