1
$\begingroup$

I tried to separate the variables, and then with an integrating factor, but to no avail

$\endgroup$
2
  • 5
    $\begingroup$ This is a homogeneous equation, try $y=ux$, $\endgroup$ Apr 28, 2017 at 18:19
  • $\begingroup$ @LordShark Thanks! $\endgroup$
    – Richard
    Apr 28, 2017 at 18:36

2 Answers 2

5
$\begingroup$

Here is an approach using the integrating factor:


You have: $$\frac{dy}{dx}-\frac{2}{x}\cdot y=-1$$ This is a first-order linear ODE because it is in the form: $$\frac{dy}{dx}+P(x)y=Q(x)$$ The integrating factor must be: $$\mu(x)=e^{\int P(x)~dx}=e^{\int -\frac{2}{x}~dx}=\frac{1}{x^2}$$ Thus, we have: $$\frac{1}{x^2}\cdot \frac{dy}{dx}-\frac{2y}{x^3}=-\frac{1}{x^2}$$ You may now substitute $-\frac{2}{x^3}=\frac{d}{dx}\left(\frac{1}{x^2}\right)$ then apply the reverse product rule. From here, it should be easy to solve.

$\endgroup$
1
$\begingroup$

An alternative method to my previous answer is to notice that this is a homogeneous differential equation since it can be written in the form: $$\frac{dy}{dx}=F\left(\frac{y}{x}\right)$$ Thus, one may substitute the following to obtain a separable ODE: $$y=vx \iff \frac{dy}{dx}=\frac{dv}{dx}\cdot x+v$$ This change of variable gives: $$x\frac{dv}{dx}+v=2v-1$$ $$x\frac{dv}{dx}=v-1 \tag{1}$$ Now, we see that $(1)$ is separable. Therefore, we can divide both sides by $v-1$ and integrate both sides with respect to $x$: $$\int \frac{1}{v-1}~dv=\int \frac{1}{x}~dx$$ Can you continue?

$\endgroup$
1
  • 1
    $\begingroup$ Yes, thank you for giving two methods! $\endgroup$
    – Richard
    Apr 28, 2017 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .