# What is the general solution of the differential equation ? x dy/dx=2/x+2−y given that x=−1,y=0

Lina Neal 2022-09-11 Answered
What is the general solution of the differential equation ? $x\frac{dy}{dx}=\frac{2}{x}+2-y$ given that x=−1,y=0
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

We have:

$x\frac{dy}{dx}=\frac{2}{x}+2-y$..... [A]

We can rearrange [A] as follows:

$\frac{dy}{dx}=\frac{2}{{x}^{2}}+\frac{2}{x}-\frac{y}{x}$

$\frac{dy}{dx}+\frac{y}{x}=\frac{2}{{x}^{2}}+\frac{2}{x}$ ..... [B]

We can use an integrating factor when we have a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

$\frac{dy}{dx}+P\left(x\right)y=Q\left(x\right)$

So we form an Integrating Factor;

$I={e}^{\int P\left(x\right)dx}$

And if we multiply the DE [B] by this Integrating Factor, I, we will have a perfect product differential;

$\therefore \frac{d}{dx}\left(xy\right)=\frac{2}{x}+2$

Which we can directly integrate to get:

Using the initial Condition, x=−1,y=0 we have:

$0=2\mathrm{ln}|1|-2+C⇒C=2$

Leading to the General Solution:

$xy=2\mathrm{ln}|x|+2x+2$
$⇒y=\frac{\mathrm{ln}|x|+x+1}{x}$

We have step-by-step solutions for your answer!