Ordinary differential equation

TsAmE

Junior Member
Joined
Aug 28, 2010
Messages
55
Solve the ode \(\displaystyle (xy + 4)(1 + \frac{dy}{dx}) = 2(x + y)(1 - \frac{dy}{dx})\)

Attempt:

\(\displaystyle (xy + 4)(1 + \frac{dy}{dx}) = 2(x + y)(1 - \frac{dx}{dy})\)

\(\displaystyle xy + xy\frac{dy}{dx} + 4 + 4\frac{dy}{dx} = 2(x - x\frac{dy}{dx} + y - y\frac{dy}{dx})\)

\(\displaystyle xy + xy\frac{dy}{dx} + 4 + 4\frac{dy}{dx} = 2x - 2x\frac{dy}{dx} + 2y - 2y\frac{dy}{dx}\)

\(\displaystyle \frac{dy}{dx}(xy + 4 + 2x + 2y) = 2x + 2y - xy - 4\)

\(\displaystyle \frac{dy}{dx} = \frac{2x + 2y - xy - 4}{xy + 4 + 2x + 2y}\)

\(\displaystyle 2ydx - xydx - 4dx + 2xdx = xydy + 2xdy + 4dy + 2ydy\)

\(\displaystyle y(2dx - xdx) - 4dx + 2xdx = x(ydy + 2dy) + 4dy + 2ydy\)

I tried getting the dy's and y's together and the dx's and x's together, but it not working
 
You almost have it. Just factor:

\(\displaystyle \frac{dy}{dx}=\frac{2x+2y-xy-4}{2x+2y+xy+4}\)

Factor the top and bottom of the RHS:

\(\displaystyle \frac{dy}{dx}=\frac{-(x-2)(y-2)}{(x+2)(y+2)}\)

Now, separate variables:

\(\displaystyle \frac{y+2}{y-2}dy=\frac{2-x}{x+2}dx\)

\(\displaystyle \int\left(1+\frac{4}{y-2}\right)dy=\int\left(\frac{4}{x+2}-1\right)dx\)

Continue wih the integration.
 
Thanks. I ran into some problems:

\(\displaystyle \int \frac{y + 2}{y - 2}dy = \int \frac{2 - x}{x + 2}dx\)

using substitution:

\(\displaystyle u = y - 2\)

\(\displaystyle y = u + 2\)

\(\displaystyle du = dy\)

\(\displaystyle v = x +2\)

\(\displaystyle x = v - 2\)

\(\displaystyle dv = dx\)

\(\displaystyle \int \frac{u + 4}{u}du = \int \frac{4 - v}{v}dv\)

\(\displaystyle (y - 2) + 4ln|y - 2| = 4ln|x + 2| - (x + 2)\)

\(\displaystyle 4ln|(y -2)e^{y -2}| = 4ln|\frac{x + 2}{e^{x +2}}|\)

\(\displaystyle (y - 2)e^{y - 2} = \frac{x + 2}{e^{x + 2}}\)

\(\displaystyle e^y(y - 2) = e^{-x}(x + 2)\)

but I am not getting the right answer of \(\displaystyle e^y(y - 2)^4 = Ce^{-x}(x + 2)^4\)
 
You're making it tougher than need be.

\(\displaystyle \int dy + 4\int\frac{1}{y-2}dy\)

\(\displaystyle y+4ln(y-2)\)

The right side:

\(\displaystyle 4\int \frac{1}{x+2}-\int dx\)

\(\displaystyle 4ln(x+2)-x+C\)

\(\displaystyle \boxed{y+4ln(y-2)=4ln(x+2)-x+C}\)
 
TsAmE said:
Thanks. I ran into some problems:

\(\displaystyle \int \frac{y + 2}{y - 2}dy = \int \frac{2 - x}{x + 2}dx\)

using substitution:

\(\displaystyle u = y - 2\)

\(\displaystyle y = u + 2\)

\(\displaystyle du = dy\)

\(\displaystyle v = x +2\)

\(\displaystyle x = v - 2\)

\(\displaystyle dv = dx\)

\(\displaystyle \int \frac{u + 4}{u}du = \int \frac{4 - v}{v}dv\)

\(\displaystyle (y - 2) + 4ln|y - 2| = 4ln|x + 2| - (x + 2)\)


You need to sharpen your algebra skills

\(\displaystyle (y - 2) + 4ln|y - 2| + C_1= 4ln|x + 2| - (x + 2)\)

\(\displaystyle (y - 2) +(x + 2) + C_1 = 4ln|x + 2| - 4ln|y - 2|\)

\(\displaystyle y + x + C_1 = ln\left [ \frac{|x + 2|}{|y - 2|}\right ]^4\)

\(\displaystyle e^{y + x + C_1} = \left [ \frac{|x + 2|}{|y - 2|}\right ]^4\)



Now continue.....


\(\displaystyle 4ln|(y -2)e^{y -2}| = 4ln|\frac{x + 2}{e^{x +2}}|\)

\(\displaystyle (y - 2)e^{y - 2} = \frac{x + 2}{e^{x + 2}}\)

\(\displaystyle e^y(y - 2) = e^{-x}(x + 2)\)

but I am not getting the right answer of \(\displaystyle e^y(y - 2)^4 = Ce^{-x}(x + 2)^4\)
 
Top