I am unsure about raising e to the natural log of an absolute value (simple differential equation example)

1.9k Views Asked by At

I am unsure what happens to the absolute value when solving this equation.

The original question was asking: Find a particular solution to $\frac{dy}{dx} = 2y; y(1) = 3$

I have simplified it to the stage of $ln|y| = 2x+C$

What I am unsure about is what happens when I raise both sides to $e$. What happens to the absolute value?

Thanks.

4

There are 4 best solutions below

0
On

You get $\pm y=e^C\cdot e^{2x}$. The constant sign of $y(x)$ gets absorbed into the constant to form a new constant $C_1=\pm e^C$, to get the general solution $y(x)=C_1e^{2x}$.


Added note: If you still feel uncomfortable with the absolute value and sign, then take the homogenous solution as a hint and use the separation ansatz to get a strict derivation.

For example, with $y'=2y+f(x)$, insert $y(x)=e^{2x}u(x)$, which is perfectly permissible since $x\mapsto e^{2x}$ is a positive smooth function. This results after a short computation in $u'(x)=e^{-2x}f(x)$ or

$$u(x)=C+\int_{x_0}^x e^{-2s}f(s)\,ds$$

where now $C=u(x_0)$ is an arbitrary integration constant, positive, negative or zero, and then

$$y(x)=Ce^{2x}+\int_{x_0}^x e^{2(x-s)}f(s)\,ds=y(x_0)e^{2(x-x_0)}+\int_{x_0}^x e^{2(x-s)}f(s)\,ds$$

completely avoiding all discussion of $\ln|y|$.

0
On

HINT:

Substitute $| y| = a > 0$ and then we have:

$$\ln | y | = \ln a = 2x + C$$ $$e^{\ln a} = e^{2x + C}$$ $$a = |y| = e^{2x + C}$$

5
On

The condition $y(1)=3$ will decide the sign of $y$: only one sign is possible. You can take exponents to get $|y|=\exp(2x+C)$. Because $\exp$ is always positive, the condition $y(1)=3$ will determine the sign of $y$.

Another way of doing it is to write the constant as $\ln D$ rather than $C$ and say you'll let the condition $y(1)=3$ determine the sign of D. Then you have $$\begin{align} \ln y &= 2x + \ln D\\ y &= De^{2x} \end{align}$$

Now plug in $y(1)=3$ to get your solution.

0
On

$|y|$ is just a real number, which means that to begin with, if $\ln |y| = 2x + C$, it certainly follows that $|y| = e^{2x + C}$. There is no problem so far.

The confusing part comes after taking $\exp$ to both sides, if you want to eliminate the absolute value signs from $y$. To do so, you need a bit of a more sophisticated argument. Essentially you say $y = \pm e^{2x + C}$ for each $x$, and then by continuity it will need to be the same $+$ or $-$ for all $x$.

As LutzL says, we often set $A = \pm e^C$ so that the solution becomes $y = A e^{2x}$ for some $A \in \mathbb{R}$.