Differential equation / Separable

320 Views Asked by At

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?

6

There are 6 best solutions below

2
On

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.$$

0
On

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|$$

0
On

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.

2
On

$\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.

6
On

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.

0
On

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$.