Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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|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
2  
@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 DT. 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 –  MSKfdaswplwq Nov 25 '12 at 13:10

1 Answer 1

up vote 3 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|improve this answer

Your Answer

 
discard

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.