# Help for solving the differential equation!!

• Sep 24th 2009, 05:56 AM
wsun
Help for solving the differential equation!!
The Qs is to solve the differential equation:
$\displaystyle \frac{dy}{dx} = \frac{(x+y)}{(x-y)}$ with y(1) = 1
I have tried to use Homogeneous differential equation rules:
$\displaystyle \frac{dy}{dx} = H(\frac{y}{x})$
Then $\displaystyle y(x) = xu(x); x\frac{du}{dx} + y = H(u)$

Relative to the real Qs, my step is shown below
$\displaystyle \frac{dy}{dx} = \frac{x+y}{x-y} = .... = \frac{1}{1-\frac{y}{x}} + \frac{1}{[\frac{1}{(\frac{y}{x})}-1]} = H(\frac{y}{x})$
By Homogeneous differential equation rules
I got $\displaystyle \frac{du}{dx} = \frac{1+u^2}{(1-u)x}$
and after I antidifferentiate this equation
$\displaystyle arctan(u) - 0.5log(1+u^2) = log|x|+C$
• Sep 24th 2009, 06:50 AM
Krizalid
you're making it too complicated.

note the RHS, divide top and bottom by $\displaystyle x$ and then put $\displaystyle y=ux.$
• Sep 24th 2009, 07:24 AM
wsun
even I use your method the answer for du/dx won't change, and so I'll get the same solution as before, the most important thing is the step after I found du/dx.
Please provide more detail for the next step!!
• Sep 24th 2009, 08:47 AM
janvdl
$\displaystyle \frac{dy}{dx} = \frac{x+y}{x-y} = \frac{1 + \frac{y}{x}}{1 - \frac{y}{x}}$

Let $\displaystyle u = \frac{y}{x}$ then $\displaystyle dy = x \ du + u \ dx$

Now substitute the above back into the original equation.

$\displaystyle x \frac{du}{dx} + u = \frac{1 + u}{1 - u}$

$\displaystyle x \frac{du}{dx} = \frac{1 + u^2}{1 - u}$

Thus:

$\displaystyle \int \frac{1 - u}{1 + u^2} du = \int \frac{dx}{x}$

$\displaystyle \int \frac{1}{1 + u^2} - \int \frac{u}{1 + u^2} = \ln{(x)} + C$

$\displaystyle \arctan(u) - \frac{1}{2} \ln{(u)} = \ln{(x)} + C$

But $\displaystyle u = \frac{y}{x}$

$\displaystyle \arctan \left( \frac{y}{x} \right) - \frac{1}{2} \ln{\left( \frac{y}{x} \right)} = \ln{(x)} + C$
• Sep 24th 2009, 10:08 AM
shawsend
You could solve them simultaneously:

$\displaystyle \frac{dx}{dt}=x+y$

$\displaystyle \frac{dy}{dt}=x-y$

calculte eigenvalues and come up with parametric solutions which because of the complex eigenvalues are:

$\displaystyle x(t)=c_1 e^{t}\cos(t)+c_2e^t\sin(t)$

$\displaystyle y(t)=c_3 e^{t}\cos(t)+c_4e^t\sin(t)$

but the arbitrary constants are related so only have two for an IVP. It's a spirial.
• Sep 25th 2009, 04:53 AM
wsun
Quote:

Originally Posted by janvdl
$\displaystyle \frac{dy}{dx} = \frac{x+y}{x-y} = \frac{1 + \frac{y}{x}}{1 - \frac{y}{x}}$

Let $\displaystyle u = \frac{y}{x}$ then $\displaystyle dy = x \ du + u \ dx$

Now substitute the above back into the original equation.

$\displaystyle x \frac{du}{dx} + u = \frac{1 + u}{1 - u}$

$\displaystyle x \frac{du}{dx} = \frac{1 + u^2}{1 - u}$

Thus:

$\displaystyle \int \frac{1 - u}{1 + u^2} du = \int \frac{dx}{x}$

$\displaystyle \int \frac{1}{1 + u^2} - \int \frac{u}{1 + u^2} = \ln{(x)} + C$

$\displaystyle \arctan(u) - \frac{1}{2} \ln{(u)} = \ln{(x)} + C$

But $\displaystyle u = \frac{y}{x}$

$\displaystyle \arctan \left( \frac{y}{x} \right) - \frac{1}{2} \ln{\left( \frac{y}{x} \right)} = \ln{(x)} + C$

I think $\displaystyle \arctan(u) - \frac{1}{2} \ln{(1+u^2)} = \ln{(x)} + C$ should be right
But not $\displaystyle \arctan(u) - \frac{1}{2} \ln{(u)} = \ln{(x)} + C$
And so we'll got $\displaystyle \arctan \left( \frac{y}{x} \right) - \frac{1}{2} \ln{\left(1+( \frac{y}{x})^2 \right)} = \ln{(x)} + C$ finally.

Then, the thing make me confused is how to transfer this equation to y=f(x), that looks like hard. Please help!
• Sep 25th 2009, 11:59 AM
janvdl
Quote:

Originally Posted by wsun
I think $\displaystyle \arctan(u) - \frac{1}{2} \ln{(1+u^2)} = \ln{(x)} + C$ should be right
But not $\displaystyle \arctan(u) - \frac{1}{2} \ln{(u)} = \ln{(x)} + C$
And so we'll got $\displaystyle \arctan \left( \frac{y}{x} \right) - \frac{1}{2} \ln{\left(1+( \frac{y}{x})^2 \right)} = \ln{(x)} + C$ finally.

Then, the thing make me confused is how to transfer this equation to y=f(x), that looks like hard. Please help!

Yes you are right. Just swap that (u) for (1 + u^2).

Normally your lecturer would not expect you to put it in the form y = f(x).