# Why is this constant of integration taken as $\log A$ instead of just $C$?

Suppose we solve $$\frac{dy}{dx} = \frac{1 + y}{2 + x} .$$ Which can be written as the following and integrating both sides w.r.t. $y$ and $x$: $$\int\frac{1}{1 + y}dy = \int\frac{1}{2 +x}dx ,$$ we get $$\ln(1+y) = \ln(2+x) + C$$ One of the book says:

It's convenient to write the constant $C$ as the logarithm of some other constant $A$: $$\ln(1+y) = \ln(2+x) + \ln(A) \implies \ln A(2 + x)$$ $$\therefore (1 + y) = A(2 + x)$$

Question: Why is it "convenient to write the constant $C$ as the logarithm of some other constant $A$"? What liberty do we have to write $\ln(A)$ instead of just $C$? I think I am unaware of what a logarithm of a constant is. I mean the significance of it.

-
${\int} \dfrac{1}{y}dy = \log|x| + c$ – Ramana Venkata Dec 27 '11 at 8:07

It is convenient because it allows you to write both sides of an equation as a logarithm, and then use the fact that $\ln(a)=\ln(b)$ implies $a=b$.

You have liberty to do so because $\ln$ is a surjective function, meaning that every real number has the form $\ln(A)$ for some $A>0$.

However, it is also unnecessary to do so, so do not worry if this style of argument seems unnatural at present. From $\ln(1+y)=\ln(2+x)+C$, you can exponentiate to get $1+y=e^C(2+x)$, and then recognize that $e^C$ is also an arbitrary (but positive) constant, and you might as well call it $A$.

A side note: $\ln(1+y)=\ln(2+x)+C$ is not quite a valid deduction, unless you are assuming that $y>-1$ and $x>-2$.

-
@alok, A side note to the side note: If we are really careful, the integral $\int \frac{1}{x} dx$ should be written $\ln |x|$ rather than just $\ln x$. Notice that $\ln |x|$ is defined everywhere except at $0$. – Srivatsan Dec 27 '11 at 6:28
IIRC, to deal with "bad" values of $x,y$ you use $\ln |1+y|,\ln |2+x|$ instead, as $\frac{d}{dx}\ln |x| = \frac{1}{|x|} \operatorname{sgn}(x) = \frac{1}{x}$, correct? – Alex Becker Dec 27 '11 at 6:30
...and I guess that's a confirmation. – Alex Becker Dec 27 '11 at 6:30
It is somewhat more complicated than @Srivatsan indicates. The most general antiderivative of $\frac{1}{x}$ is $\ln|x|+C$, where $C$ is a "constant" that may change as you cross $x=0$. – Jonas Meyer Dec 27 '11 at 6:31
Usually you will be solving the DE given some initial condition $y(a)=b$. Depending on whether or not $a>-2$, and on whether or not $b >-1$, you may need to make some sign changes in your solution, since for $w$ negative, there is no real number $r$ such that $r=\ln w$, but $\int \frac{dw}{w}$ makes sense for $w<0$. – André Nicolas Dec 27 '11 at 6:52

As I said in my answer to your last question, what we need when solving a differential equation (a simple example of which is taking a definite integral) is a constant of integration that can take on any real value. For this reason, we cannot write $A^2$ as our constant of integration, because we can never get a negative value for $A^2$ by plugging in a real value for $A$. However, we can write $\ln(A)$ for our constant because for any real number $r$ we get our constant of integration equal to $r$ when we plug in $e^r$ for $A$.

As for why using $\ln(A)$ as the constant of integration is more convenient than using $C$, its just so that you can write $(1+y)=A(2+x)$ rather than $(1+y)=e^C(2+x)$, and whoever wrote your textbook decided the first was a nicer expression.

-