Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find the general solution for

$(x+2)y' = 3-\frac{2y}{x}$

This is what I've done so far:



$\frac{x}{x+2}y=3\int \frac{x}{(x+2)^2}dx$

$\frac{x}{x+2}y= 3\int \frac{1}{x+2}dx - 6\int\frac{1}{(x+2)^2}dx$

$\frac{x}{x+2}y= 3 ln|x+2| + \frac{6}{x+2}+c$

I tested this solution for when c=0, but it failed. Can anyone spot my mistake?

share|cite|improve this question
I believe mistake is that you did not find the integrating factor correctly. In your solution, I don't think your 2nd line is equivalent to the first one – gt6989b Sep 19 '12 at 16:19
How did it fail? I see no mistake, and your answer agrees with Wolfram Alpha. [You remembered to divide out by $x/(x+2)$ from the LHS of the final line to check that $y$ is a solution right?] Also, your general solution needs to include $+D\,v(x)$, where $v$ is a solution to $(x+2)v'+2v/x=0$ (remember homogeneous and inhomogeneous parts!) and $D$ an arbitrary constant. – anon Sep 19 '12 at 16:20
Okay I quadruple-checked my answer and it looks like it's correct. The textbook I'm working with had the answer in a crazy form, and I thought WolframAlpha had something different. Btw, I've no idea what you mean by (in)homogenous parts yet, I've just started working with D.E. :) I'll figure it out! – Korgan Rivera Sep 19 '12 at 16:28
Looks fine. Did you finish solving for y? – Mike Sep 19 '12 at 18:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.