5

I've been given the following ODE and have to solve for the general solution: $$ \displaystyle \frac{dy}{dx} = y\cot x $$

I've looked at the solution, and it does the following:

$$ \int \frac{1}{y} \ dy = \int \cot x \ dx $$ $$ \ln y = \ln|\sin x| + c $$ $$\ln y = \ln|\sin x| + \ln c $$ $$ \ln y = \ln |c\sin x| $$ $$ y = c\sin x$$

I don't quite understand how they were able to convert $c$ into $\ln c $. Since $c$ is just a constant, it can very well be negative and the $\ln -ve$ is undefined.

I also don't understand why they were able to remove the absolute value sign?

  • You are correct. But $c$ can be replaced by $\ln k$ where $k$ is some other constant. And then you can name $k$ to be $c$. And this new $c$ is not the same as old $c$. This is done often. – Dhruv Kohli Jan 24 '17 at 18:29

6 Answers6

3

Well, we have:

$$\ln\left|\text{y}\left(x\right)\right|=\ln\left|\sin\left(x\right)\right|+\text{C}$$

Now, raising each term to $e$:

$$\exp\left(\ln\left|\text{y}\left(x\right)\right|\right)=\exp\left(\ln\left|\sin\left(x\right)\right|+\text{C}\right)\space\Longleftrightarrow\space\left|\text{y}\left(x\right)\right|=\exp\left(\ln\left|\sin\left(x\right)\right|\right)\cdot\exp\left(\text{C}\right)\space\Longleftrightarrow\space$$ $$\left|\text{y}\left(x\right)\right|=\text{C}\cdot\left|\sin\left(x\right)\right|$$

Jan Eerland
  • 28,671
3

This is a very common thing that we do. The thing is, we take the constant term itself as $\ln c$ and not $c$. Yes, this can lead to problems. To be on the safe side, you can take the constant terms to be $\pm \ln c$ which would give you the result as $y = c \sin x$ or $y = \frac{\sin x}{c}$. You can now just say that the solution is $y = k \sin x$ where $k$ is another constant term. Hence this doesn't cause any contradiction with writing the result as $y = c \sin x$ as $c$ is basically just a constant.

The only value that $k$ can't take in $y = k\sin x$ is $0$, which is of course true.

Nilabro Saha
  • 1,703
2

When integration constants appear, their value remains undefined until you bring an extra condition. Until then, silently replacing the constant by a function of itself is harmless.

Like for instance

$$\log y=\log x+c$$ is often transformed into

$$y=cx$$

instead of

$$y=e^cx.$$

  • But it would be nice to write " $\ln d$ with $c=\ln d$ " instead so that everything would be clear, especially when knowing that the reader or student is just starting to study differential equations. – MasB Jan 24 '17 at 18:31
  • @BernardMassé: the point is precisely that the notation $c$ actually stands for "a constant" and it is accepted practice to reuse $c$ at will. Would be sad to lose this convenience, not nice. –  Jan 24 '17 at 19:30
2

We have: $$\ln |y|=\ln|\sin{x}|+c$$ We can do this differently by exponentiating both sides instead: $$e^{\ln |y|}=e^{\ln|\sin{x}|+c}$$ $$|y|=e^{\ln|\sin{x}|}\cdot e^c$$ $$|y|=|\sin{x}|\cdot e^c$$ Now, note that $e^c$ is an arbitrary constant. Therefore, we can substitute $k=e^c$: $$|y|=k\cdot |\sin{x}|$$ Which explains why they "converted" from $\ln{c}$ to $c$, so that the result looks nicer.

  • yes, yes, very sexy indeed] – sddjsdsajsjddjsd Jan 24 '17 at 18:45
  • @sddjsdsajsjddjsd Did you understand why we may omit the absolute values in the last step? – Pythagoricus Jan 24 '17 at 18:46
  • @Pythagoricus $e^c$ > 0 for all values of c, so $k|sin x|$ will just be positive. – sddjsdsajsjddjsd Jan 24 '17 at 18:51
  • but since $\sin x > 0$ shouldn't it just be $y = k|\sin x|$ instead of $ y = k\sin x $ @Pythagoricus – sddjsdsajsjddjsd Jan 24 '17 at 18:55
  • @sddjsdsajsjddjsd You got it, it's tricky! But there is a reason we omit the absolute value. (Hint: $y = y(x)$ is necessarily differentible). – Pythagoricus Jan 24 '17 at 18:57
  • 1
    @sddjsdsajsjddjsd I'll give it away: The solution of a differential equation is taken over some open interval. We write $y=y(x),$ $x \in (a,b)$. In this case all we know is that $y(x)=k |\sin x|$, but where is $x$ from? Is it from $\mathbb{R}$? No, because $| \sin x |$ (the absolute value) is not differentible at $\sin x=0$. We must therefore exclude all the solutions of $\sin x = 0$, to do this we restrain $x$ in an interval between solutions of $\sin x = 0$. This way, $\sin x$ is either everywhere positive, or everywhere negative; thus we omit the absolute value! – Pythagoricus Jan 24 '17 at 19:18
1

$\ln:\mathbb{R}_+^*\longrightarrow\mathbb{R}$ is a bijective function which means $$\forall y\in\mathbb{R}, \exists!\ x\in\mathbb{R}_+^*, y=\ln(x) $$ So, by changing the $c$ to $\ln(c)$, the solution skips some simple steps which are: $$\exists k\in\mathbb{R}_+^*,\ c=\ln(k) $$ since $k$ is a constant we can rename it and can call it $c$.

Then, we have 'the new' $c\in\mathbb{R}_+^*$, so it can be included under the absolute value sign.

Varazda
  • 1,299
  • 9
  • 21
1

I'll address only the arbitrary constant here.

I don't quite understand how they were able to convert $c$ into $\ln c $

Yes, it's true that $c$ could be negative. But the $c$ in $\ln|\sin x| + c$ and the $c$ in $\ln c$ are not actually the same $c$. This is a fairly standard borderline abuse of notation in math. Generally we use $c$ (or capital $C$) to represent arbitrary constants of integration, even when those arbitrary constants change form, so to speak.

A more pedantic approach would be to explain as follows:


$$\ln y = \ln |\sin x| + c$$ At this point we would like to remove the natural logs. So, since $c$ is some arbitrary real number and since the natural log function is surjective onto the real numbers, then there must be some other (and positive) constant $c_2$ such that $\ln (c_2) = c$. Then we have $$ \ln y = \ln|\sin x| + \ln(c_2).$$ Well, $c_2$ itself is just an arbitrary constant ("arbitrary" subject to the restriction that it must be positive), so let's just keep calling it $c$ so we don't get everything muddled with different constant names. Therefore $$ \ln y = \ln|\sin x| + \ln c.$$


In short, you may see solutions that always use $c$ to represent arbitrary constants, even if they are different arbitrary constants along the way. But the only constant we really care about is the one in the solution we obtain at the end. That's pretty much how we justify calling all arbitrary constants $c$ or $C$. So in this problem, the only arbitrary constant we care about is the $c$ in $y = c \sin x$.