# Separation of variables, constant in front of term

#### find_the_fun

##### Active member
Solve the differential equation by separation of variables

$$\displaystyle x \frac{dy}{dx} = 4y$$

becomes $$\displaystyle \frac{1}{4y} dy = \frac{1}{x} dx$$ Integrate to get
$$\displaystyle \frac{1}{4} \ln{|y|} = \ln{|x|}+C$$

I'm stuck here because I want to raise e to the power of both sides of the expression like
$$\displaystyle e^{ \frac{1}{4} \ln{|y|}} = e^{\ln{|x|}+C}$$ but I'm not sure what affect that would have on $$\displaystyle \frac{1}{4}$$?

#### topsquark

##### Well-known member
MHB Math Helper
re: separation of variables, constant in front of term

Solve the differential equation by separation of variables

$$\displaystyle x \frac{dy}{dx} = 4y$$

becomes $$\displaystyle \frac{1}{4y} dy = \frac{1}{x} dx$$ Integrate to get
$$\displaystyle \frac{1}{4} \ln{|y|} = \ln{|x|}+C$$

I'm stuck here because I want to raise e to the power of both sides of the expression like
$$\displaystyle e^{ \frac{1}{4} \ln{|y|}} = e^{\ln{|x|}+C}$$ but I'm not sure what affect that would have on $$\displaystyle \frac{1}{4}$$?
Recall that $$\displaystyle a \cdot ln(z) = ln( z^a )$$

To make things simpler, I'd set C = ln(A), then you can lump it in with the other ln on the RHS.

-Dan

#### soroban

##### Well-known member
re: separation of variables, constant in front of term

Hello, find_the_fun!

$$x \frac{dy}{dx}\:=\:4y$$

Make it easy on yourself.
Why introduce frations?

Separate: .. . .$$\frac{dy}{y} \:=\:\frac{4\,dx}{x}$$

Integrate: .$$\displaystyle \int \frac{dy}{y} \:=\:4\int\frac{dx}{x}$$

. . . . . . . . . $$\ln|y| \:=\:4\ln|x| + c$$

. . . . . . . . . $$\ln|y| \:=\:\ln(x^4) + \ln C$$

. . . . . . . . . $$\ln|y| \:=\:\ln(Cx^4)$$

n . . . . . . . . . . .$$y \:=\:Cx^4$$

#### find_the_fun

##### Active member
re: separation of variables, constant in front of term

Getting there but still confused.

$$\displaystyle x\frac{dy}{dx}=4y \\ xdy=4ydx \\ \frac{1}{y}dy=\frac{4}{x}dx \\ \int \frac{1}{y}dy = 4 \int \frac{1}{x} dx \\ \ln{|y|}=4\ln{|x|}+C \\ \ln{|y|}=\ln{|x^4|}+C \\ e^{\ln{|y|}}=e^{\ln{|x|}+C} \\ y=x^4+e^C$$

but the answer should be $$\displaystyle y=cx^4$$

#### MarkFL

Staff member
re: separation of variables, constant in front of term

Go back to the point where you have:

$$\displaystyle \ln|y|=\ln\left|x^4 \right|+C$$

Now, write the arbitrary constant $C$ as $\ln(C)$, and then apply the additive property of logarithms...

#### find_the_fun

##### Active member
re: separation of variables, constant in front of term

Go back to the point where you have:

$$\displaystyle \ln|y|=\ln\left|x^4 \right|+C$$

Now, write the arbitrary constant $C$ as $\ln(C)$, and then apply the additive property of logarithms...
How can you randomly change $C$ to $\ln(C)$? Isn't that like saying a+b=c is the same as a+ln(b)=c?

#### Prove It

##### Well-known member
MHB Math Helper
re: separation of variables, constant in front of term

How can you randomly change $C$ to $\ln(C)$? Isn't that like saying a+b=c is the same as a+ln(b)=c?
Mark shouldn't use the same symbol. The idea is that any constant can be written as the logarithm of another nonnegative constant. Or if you like, the logarithm of any nonnegative constant is in fact, a constant.

So we could define a new constant D so that $$\displaystyle C = \ln{(D)}$$. Because the constants are arbitrary anyway, it's fine to do this.

I personally would do this though...

\displaystyle \begin{align*} \ln{|y|} + C_1 &= 4\ln{|x|} + C_2 \textrm{ where } C_1 \textrm{ and } C_2 \textrm{ are constants we get from integrating both sides} \\ \ln{|y|} - 4\ln{|x|} &= C_2 - C_1 \\ \ln{|y|} - \ln{ \left| x^4 \right| } &= C_2 - C_1 \\ \ln{ \left| \frac{y}{x^4} \right| } &= C_2 - C_1 \\ \left| \frac{y}{x^4} \right| &= e^{C_2 - C_1} \\ \frac{y}{x^4} &= A \textrm{ where } A = \pm e^{C_2 - C_1} \\ y &= A\,x^4 \end{align*}

#### MarkFL

Staff member
re: separation of variables, constant in front of term

How can you randomly change $C$ to $\ln(C)$? Isn't that like saying a+b=c is the same as a+ln(b)=c?
Yes, it is probably better to use different symbols until you get used to manipulating constants of integration in such a manner.

#### find_the_fun

##### Active member
Re: separation of variables, constant in front of term

Is it somehow more correct to have the answer $$\displaystyle Ax^4$$ than $$\displaystyle y=x^4+e^C$$?

Checking $$\displaystyle y=x^4+e^C$$ as a solution the the DE we get $$\displaystyle \frac{dy}{dx}=4x^3$$ so from the original equation $$\displaystyle LHS=x4x^3=4x^4$$ and $$\displaystyle RHS=4y=4(x^4+e^C)=4x^4+4e^C$$ and no value of $$\displaystyle C$$ can make $$\displaystyle 4e^C=0$$. Since the $$\displaystyle RHS \neq LHS$$ does this fail as a solution to the DE?

#### topsquark

##### Well-known member
MHB Math Helper
Re: separation of variables, constant in front of term

Getting there but still confused.

$$\displaystyle x\frac{dy}{dx}=4y \\ xdy=4ydx \\ \frac{1}{y}dy=\frac{4}{x}dx \\ \int \frac{1}{y}dy = 4 \int \frac{1}{x} dx \\ \ln{|y|}=4\ln{|x|}+C \\ \ln{|y|}=\ln{|x^4|}+C \\ e^{\ln{|y|}}=e^{\ln{|x|}+C} \\ y=x^4+e^C$$

but the answer should be $$\displaystyle y=cx^4$$
Take your second to the last step. You applied the exponent laws wrong:
$$\displaystyle e^{ ln|y| } = e^{ ln(|x|/4) + C } = e^{ ln(|x|/4 )} \cdot e^C$$

-Dan