1st order differential equation

85 Views Asked by At

I am given the following: $$ \begin{cases} x \ln x \frac{dy}{dx}+y + x = 0, &\mbox{if}\quad x>1, \\ y = 0, &\mbox{if} \quad x=e \end{cases} $$ I tried to separate it and got this: $$ -y \ dy = \frac{-x}{x \ln x}dx $$ Then i integrated it: $$ \frac{-y}{2} = \frac{-1}{\ln x} \ + \ c, \\ {y} = 2 \left(\frac{1}{\ln x}+c \right) $$

I tried solving after that, however, I am not getting the right answer, which is: $$ y=\frac{e-x}{\ln x} $$

Could you help me identify the mistake?

Thank you very much for your help!!! :)

3

There are 3 best solutions below

2
On BEST ANSWER

Rewrite: $$ \begin{align} x \ln x\ y'+y+x&=0\\ x \ln x\left(y'+\frac{y}{x \ln x}+\frac{1}{\ln x}\right)&=0\\ y'+\frac{y}{x \ln x}+\frac{1}{\ln x}&=0\\ y'+\frac{y}{x \ln x}&=-\frac{1}{\ln x}\tag1 \end{align} $$ Equation $(1)$ is first-order linear ordinary differential equation. You have $$ f(x)=\frac{1}{x \ln x} $$ then $$ \int f(x)\ dx=\int \frac{1}{x \ln x}\ dx=\int \frac{1}{\ln x}\ d(\ln x)=\ln(\ln x)+C. $$ Hence, the integrating factor will be $$ e^{\int f(x)\ dx}=e^{\ln(\ln x)+C}=e^C\ln x. $$ Now, multiply $(1)$ by the integrating factor. It turns out to be $$ \begin{align} e^C\ln x\ y'+e^C\ln x\cdot\frac{y}{x \ln x}&=-e^C\ln x\cdot\frac{1}{\ln x}\\ \ln x\ y'+\frac{y}{x}&=-1\\ \frac{d}{dx}(\ln x\ y)&=-1\\ d(\ln x\ y)&=-dx\\ \int d(\ln x\ y)&=-\int\ dx\\ \ln x\ y&=-x+K\\ y&=\frac{K-x}{\ln x}. \end{align} $$ The last step, use the initial condition $y=0$ if $\ x=e$. You will obtain $K=e$. Thus $$ \Large y=\Large\color{blue}{\frac{e-x}{\ln x}}. $$

$$\\$$


$$\Large\color{blue}{\text{# }\mathbb{Q.E.D.}\text{ #}}$$

0
On

Your mistake is in the separation. This isn't a separable differential equation - it is a first order linear equation. You can use an integrating factor to solve, or divide the entire differential equation by $x$ and you get:

$$(\ln x)y' + \frac{1}{x} y = -1$$

But then notice that this is equivalent to:

$$(y\ln x)' = -1$$

Integrate both sides and solve for $y$.

0
On

your given D.E is linear in y:

$$ \frac{dy}{dx}+\frac{y}{x \ln x} = -\frac{1}{x \ln x}$$,
so I.F: $e^{\int \frac{1}{x \ln x}dx} =lnx$
you get,on solving : y $ln$x=-x+c
from boundry conditions you get c=e
so the final answer becomes $y =\frac{e-x}{\ln x}$