# Thread: First Order Differential Equation

1. ## First Order Differential Equation

I have solved a differential equation ($\displaystyle dx/dy-2xy=x$ if y(1)=0) and obtained this:
$\displaystyle y=C e^(x^2)-0.5$

I think i've got it right.. but ain't sure...

2. Originally Posted by MissWonder
I have solved a differential equation ($\displaystyle dx/dy-2xy=x$ if y(1)=0) and obtained this:
$\displaystyle y=C e^(x^2)-0.5$

I think i've got it right.. but ain't sure...
$\displaystyle x'=x+2xy$ Separate and integrate:

$\displaystyle \int\frac{x'}{x}\,dy=\int(1+2y)\,dy \implies$ $\displaystyle \ln(x)=y+y^2+c_0 \implies \ln(x)=y^2+y+\frac{1}{4}+c_1$ $\displaystyle \implies \ln(x)=\left(y+\frac{1}{2}\right)^2+c_1\implies y=\sqrt{\ln(x)-c_1}-\frac{1}{2}$

At $\displaystyle (1,0)$, we have $\displaystyle \sqrt{0-c_1}-\frac{1}{2}=0\implies c_1=-\frac{1}{4}$

So $\displaystyle \boxed{y=\sqrt{\ln(x)+\frac{1}{4}}-\frac{1}{2}}$

3. Originally Posted by MissWonder
I have solved a differential equation ($\displaystyle dx/dy-2xy=x$ if y(1)=0) and obtained this:
$\displaystyle y=C e^(x^2)-0.5$

I think i've got it right.. but ain't sure...
DE will be reduced to
$\displaystyle \frac {dx}{x}=(1+2y)dy$
$\displaystyle integrating\ gives \quad ln x=y+y^2+c$
$\displaystyle y(1)=0 \ gives \quad ln 1=0+0+c \quad or \quad c=0$
$\displaystyle \therefore \boxed{ ln x=y+y^2} \quad or\quad \boxed {y^2+y-ln x=0}$

4. Hello, MissWonder!

Is that derivative inverted?

I have solved a differential equation: . $\displaystyle \frac{dx}{dy}-2xy\:=\:x$ .for $\displaystyle y(1)=0$
and obtained this: .$\displaystyle y\:=\:Ce^{x^2}-\tfrac{1}{2}$

I think i've got it right.. but ain't sure...
If it is really $\displaystyle \frac{dx}{dy}$

. . then we have: . $\displaystyle \frac{dx}{dy} \;=\;2xy + x \;=\;x(2y+1)$

Separate variables: .$\displaystyle (2y+1)dy \:=\:\frac{dx}{x}$

Integrate: . $\displaystyle y^2 + y \;=\;\ln x + C$

Since $\displaystyle y(1)=0$, we have: .$\displaystyle 0^2 + 0 \;=\;\ln(1) + C \quad\Rightarrow\quad C = 0$

. . Therefore: .$\displaystyle y^2 + y \:=\:\ln x$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

If the equation is: . $\displaystyle {\color{blue}\frac{dy}{dx}}- 2xy \:=\:x$
. . we have: . $\displaystyle \frac{dy}{dx}\:=\:2xy + x \quad\Rightarrow\quad \frac{dy}{dx} \:=\:x(2y+1)\quad\Rightarrow\quad \frac{dy}{2y+1} \:=\:x\,dx$

Integrate: . $\displaystyle \tfrac{1}{2}\ln(2y+1) \:=\:\tfrac{1}{2}x^2 + C \quad\Rightarrow\quad \ln(2y+1) \:=\:x^2 + C$

Then: . $\displaystyle 2y + 1 \:=\:e^{x^2+C} \;=\;e^{x^2}\!\cdot e^C \:=\:Ce^{x^2}$

. . . . . $\displaystyle 2y \:=\:Ce^{x^2} - 1 \quad\Rightarrow\quad y \:=\:Ce^{x^2} - \frac{1}{2}$

Since $\displaystyle y(1) = 0$, we have: .$\displaystyle 0 \:=\:C(e^1) -\frac{1}{2} \quad\Rightarrow\quad C \:=\:\frac{1}{2e}$

Hence: .$\displaystyle y \;=\;\frac{1}{2e}e^{x^2} - \frac{1}{2} \;=\;\frac{1}{2}e^{x^2-1} - \frac{1}{2}$

. . Therefore: .$\displaystyle y \;=\;\frac{1}{2}\left(e^{x^2-1} - 1\right)$