y'=y^2-y/x-1/x^2, solve ODE

604 Views Asked by At

Try to find a solution of the following differential equation: $y'=y^2-y/x - 1/x^2$

I see that it is of Riccati type: $ y'=f(x)*y+g(x)*y^2+h(x)$ with $g(x)=1, f(x)=-1/2, h(x)=-1/x^2 $

In my lecture we discuss: "Solving this equation is only possible if a particular solution $ y_p(t)$ is known and then the transformation $z= \frac{1}{y-y_p(t)}$ yields the linear equation $z' = - (f(x) + 2 y_p(x) g(x))*z- g(x).$"

So $ y_p (x) =1/x$ is a particular solution.

Then i do the transformation with $z= \frac{1}{y - \frac{1}{x}}$ like in the lecture and get: $ z' = \frac{z}{x} - \frac{2z}{x}-1 $ (I´m sure it´s right because it fit´s with the notation in the lecture for the general case. So i don´t write hear the calculation)

Which is $ z'=-\frac{z}{x} -1 $. I get a linear equation. The homogeneous equation of it $ z'= -\frac{z}{x} $ has the general solution $C*1/x$. So the solution of the differential equation is: $\phi(x)=C*1/x + 1/x = Const* 1/x$.

Is this correct?

2

There are 2 best solutions below

2
On BEST ANSWER

Considering $$y'=y^2-\frac y x -\frac 1 {x^2}$$ I started with $y=\frac z x$ , $y'=\frac{z'}{x}-\frac{z}{x^2}$. This makes $$x z'-z^2+1=0$$ which is separable writing $$\frac x {x'}-z^2+1=0$$ that is to say $$\frac {x'} x=\frac 1 {z^2-1}=\frac{1}{2 (z-1)}-\frac{1}{2 (z+1)}$$ Integrating both sides leads to $$c x=\frac{\sqrt{z-1}}{\sqrt{z+1}}$$ that is to say $$z=-\frac{1+c x^2}{cx^2-1}\implies y=-\frac{1+c x^2}{x(cx^2-1)}$$ Setting $c=0$ leads to $y=\frac 1x$ as a particular solution.

0
On

Let $y=\dfrac{1}{u}$ ,

Then $\dfrac{dy}{dx}=-\dfrac{1}{u^2}\dfrac{du}{dx}$

$\therefore-\dfrac{1}{u^2}\dfrac{du}{dx}=\dfrac{1}{u^2}-\dfrac{1}{xu}-\dfrac{1}{x^2}$

$\dfrac{du}{dx}=\dfrac{u^2}{x^2}+\dfrac{u}{x}-1$

Luckily this becomes a first-order homogeneous ODE.

Let $v=\dfrac{u}{x}$ ,

Then $u=xv$

$\dfrac{du}{dx}=x\dfrac{dv}{dx}+v$

$\therefore x\dfrac{dv}{dx}+v=v^2+v-1$

$x\dfrac{dv}{dx}=v^2-1$

$\dfrac{dv}{v^2-1}=\dfrac{dx}{x}$

$\int\dfrac{dv}{v^2-1}=\int\dfrac{dx}{x}$

$\int\left(\dfrac{1}{2(v-1)}-\dfrac{1}{2(v+1)}\right)dv=\int\dfrac{dx}{x}$

$\dfrac{1}{2}\ln\dfrac{v-1}{v+1}=\ln x+c$

$\dfrac{v-1}{v+1}=Cx^2$

$v=\dfrac{1+Cx^2}{1-Cx^2}$

$\dfrac{u}{x}=\dfrac{1+Cx^2}{1-Cx^2}$

$\dfrac{1}{xy}=\dfrac{1+Cx^2}{1-Cx^2}$

$y=\dfrac{1-Cx^2}{x(1+Cx^2)}$