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

Given the ODE $$y'= \left( \frac{x+2y+1}{2x-6} \right)$$

I have tried two methods to solve this equation. One method is seperate variables: $$(2x-6 )dy = (x+2y+1)dx $$ integrating gives $$2(xy-3y)=x^2+2xy+x+c$$, simplifying we get $$y= -(x^2+x+c)/6 $$\

But on the other hand, if I try to solve by using an integrating factor u(x), I get a different solution. The method I used was rewrite in standard linear form, find integrating factor by calculating $u(x) = e^(\int p(x)dx)=1/(3-x)$. In the end I found that the solution was $y=(3-x)(2/(x-3)+1/ log(x-3) + C$

Whats going on?

share|cite|improve this question
Did you do a sanity check and take the derivative of both answers to see if either is correct? – tpg2114 Nov 23 '12 at 12:20
@Hempo: You can't use the first method! what is $\int ydx$? – Dennis Gulko Nov 23 '12 at 12:23
Separation of variables applicable here: $Y(y)\mathrm d\,y=X(x)\mathrm d\,x$. – Frenzy Li Nov 23 '12 at 13:05
Ok. The correct reasoning is that y(x) is a function of x, and hence it cannot be seen as a constant if you integrate it – Applied mathematician Nov 25 '12 at 13:10
up vote 4 down vote accepted

Remember that $y$ is a function of $x$, so $\int ydx\neq xy$ and $\int xdy\neq xy$.
On the other hand, finding the integration factor is the way to go, so the last solution you wrote is the correct one.

share|cite|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.