How can I handle$~\exp(\ln|x|)~$to solve 1st order linear DE?

81 Views Asked by At

RHS and LHS are same.

$$\exp\left(\ln\left(x\right)\right)=\exp\left(\ln\left(x\right)\right)\tag{1}$$

Taking log.
$$\ln\left(\exp\left(\ln\left(x\right)\right)\right)=\ln\left(\exp\left(\ln\left(x\right)\right)\right)\tag{2}$$

$$\ln\left(x\right)=\ln\left(\exp\left(\ln\left(x\right)\right)\right)\tag{3}$$

$$\therefore~~x=\exp\left(\ln\left(x\right)\right)\tag{4}$$

Then what about$~\ln\left|x\right|~$?

This problem is a sub-problem of below ODE.

$$\frac{\mathrm dy}{\mathrm dx}-\frac{2}{x}y=x^6\tag{5}$$

My thoughts are as below.

$$P\left(x\right):=-\frac{2}{x}\tag{6}$$

$$Q\left(x\right):=x^6\tag{7}$$

$$\underbrace{\frac{\mathrm dy}{\mathrm dx}+P\left(x\right)y=Q\left(x\right)}_{\text{1st order linear DE}}\tag{8}$$

$$\text{Integrating factor}=\exp\left(\int P\left(x\right)\mathrm{dx}\right)\tag{9}$$

$$\exp\left(\int-\frac{2}{x}\mathrm{dx}\right)\tag{10}$$

$$=\exp\left(-2\int\frac{1}{x}\mathrm{dx}\right)\tag{11}$$

$$=\exp\left(-2\ln\left|x\right|+\text{const}\right)\tag{12}$$

$$=\exp\left(-2\ln\left|x\right|\right)\exp\left(\text{const}\right)\tag{13}$$

$$=\exp\left(\color{red}{\ln\left|x\right|}\right)^{-2}\exp\left(\text{const}\right)\tag{14}$$

$$\exp\left(\ln\left|x\right|\right)=\exp\left(\ln\left|x\right|\right)\tag{15}$$

ADD

I got the following general solution as I forcefully assumed$~x=\exp\left(\ln\left|x\right|\right)~$

$$y=\frac{1}{5}x^7+\text{const}_{1}x^2\tag{16}$$

2

There are 2 best solutions below

0
On BEST ANSWER

Firstly, on your equations for $\exp$ and $\ln,$ $$x=\exp[\ln(x)]$$ only holds for $x\gt0.$ Secondly, the integrating factor for the equation $$y'(x)-\frac2{x}y(x)=x^6$$ is given by the function $$\mu(x)=\begin{cases}C_0\exp[-2\ln(-x)]&x\lt0\\C_1\exp[-2\ln(x)]&x\gt0\end{cases}=\begin{cases}-\frac{C_0}{x^2}&x\lt0\\\frac{C_1}{x^2}&x\gt0\end{cases}$$ with $C_0,C_1\gt0.$ What this means is that if $$f(x)=\frac1{x^2},$$ then $$(fy)'(x)=f(x)x^6=x^4.$$ Since $0$ is a singularity, we have that $$f(x)y(x)=\frac{x^5}5+C_0=\frac{y(x)}{x^2},\;\;\;\;x\lt0$$ $$f(x)y(x)=\frac{x^5}5+C_1=\frac{y(x)}{x^2},\;\;\;\;x\gt0.$$ What this implies is that $$y(x)=\begin{cases}\frac{x^7}5+C_0&x\lt0\\\frac{x^7}5+C_1&x\gt0\end{cases}.$$

0
On

I think I solved the problem by advice from @John Wayland Bales

$$\exp\left(\ln\left|x\right|\right)^{-2}\tag{1}$$

$$=\frac{1}{\exp\left(\ln\left|x\right|\right)^{2}}\tag{2}$$

$$=\frac{1}{\exp\left(2\ln\left|x\right|\right)}\tag{3}$$

$$=\frac{1}{\exp\left(\ln\left(\left|x\right|^2\right)\right)}\tag{4}$$

$$=\frac{1}{\exp\left(\ln\left(x^2\right)\right)}\tag{5}$$

$$=\frac{1}{\exp\left(2\ln\left(x\right)\right)}\tag{6}$$

$$=\frac{1}{\exp\left(\ln\left(x\right)\right)^{2}}\tag{7}$$

$$=\frac{1}{\left(x\right)^{2}}\tag{8}$$