# Differential Equation

1. Sep 14, 2010

### CINA

1. The problem statement, all variables and given/known data

$$\frac{dy}{dx}=\frac{x+3y}{3x+y}$$

2. Relevant equations

M(x,y)dx+N(x,y)dy=0

Exact equation (I think)

3. The attempt at a solution

Ok, so I try to put it in the form of the of an exact equation, like above, but I end up with

-(x+3y)dx+(3x+y)dy=0

This results in the partial of M with respect to y being -3 and the Partial of N with respect to x being 3, which is not equal!

I tried investigating to see if there is an integrating factor but $$\frac{M_{y}-N_{x}}{N}$$ and $$\frac{N_{x}-M_{y}}{M}$$ are not functions of just one variable. What am I doing wrong? Different method? Algebra mistake?

Thanks

2. Sep 14, 2010

### rock.freak667

Try using a substitution of y=vx.

3. Sep 15, 2010

### CINA

ok, so

$$y=vx$$

and

$$dy=vdx+xdv$$

$$(-x-3vx)dx+(3x+vx)(vdx+xdv)=0$$ So far so good...

$$-xdx+xv^{2}dx+3x^{2}dv+vx^{2}dv=0$$ Collect like terms...

$$x(v^{2}-1)dx+x^{2}(3+v)dv=0$$ Factor out like terms...

$$\frac{1}{x}dx=\frac{-(3+v)}{(v^{2}-1)}dv$$ Seperate variables...is this right? I tend to make a lot of simple errors, no matter how many times I check my work...

Thanks!

Last edited: Sep 15, 2010
4. Sep 15, 2010

### rock.freak667

That should be correct. Now just split the function in 'v' into partial fractions and integrate.

5. Sep 15, 2010

### CINA

Ok so...

$$\frac{1}{x}=\frac{1}{v+1}-\frac{2}{v-1}$$

$$\int\frac{1}{x}dx=\int(\frac{1}{v+1}-\frac{2}{v-1})dv$$

$$ln(x)=ln(v+1)-2ln(v-1)+ln(c)$$ Ok I don't really know what to do next, heres a try....

$$ln(x)=ln(c\frac{v+1}{(v-1)^{2}})$$

Is this right? I'm not very good with natural logs, hopefully I didn't make a mistake...

Next step would be exponentiate both sides? (Assuming what I just did was right)

6. Sep 15, 2010

### rock.freak667

Well you don't really have to exponentiate both sides since if lnx=lny then x=y.

So essentially, you can just remove the 'ln' and then replace 'v'.