# Solve differential equation

1. Nov 29, 2011

### sharks

The problem statement, all variables and given/known data
Solve differential equation
4xdy - ydx = (x^2)dy

The attempt at a solution

(4x - x^2)dy = ydx

(1/y)dy = (1/(4x - x^2))dx

Integrating both sides:

For integrating 1/(4x - x^2) i completed the square for the denominator part and got 4-(x-2)^2 then used substitution; let (x-2) = 2sint

lny = sin^-1((x-2)/2) + lnA

But the answer wrong for some reason unknown to me.

Last edited: Nov 29, 2011
2. Nov 29, 2011

### I like Serena

Hi sharks!

I'm not sure how you integrated, but you should have integrated dt/2cost.
But this is not so easy, and it is not what you wrote.

Instead I recommend integrating by using partial fraction decomposition.
See for instance: http://en.wikipedia.org/wiki/Partial_fraction#Illustration

3. Nov 29, 2011

### sharks

Hi "I like Serena"!

If you would allow me to expand a little bit from my first trial above:

Using substitution; let (x-2) = 2sint
Indeed, i do get 1/2cost but then i also need to change the derivative from dx to dt
I do that by differentiating x-2 = 2sint
which gives me dx = 2cost.dt
and i replace in the integral to give me:

(1/4cos^2t).2cost.dt and this gives me (you are correct!) an integral of (1/2cost).dt = (1/2).sect.dt which i then integrate to (1/2).ln(pi/4 + t/2)
and then i replace from the substitution.

2sint = x-2
sint = (x-2)/2
t = arcsin ((x-2)/2)

Wow.... OK, i see why you said it's not so easy. But is it even possible at all? As i don't see how the arcsin would go away.

Using your proposed method, since i cannot factorize x^2 - 4x
I've done this: x(x - 4)

So, the partial fraction is...

1/(4x) + 1/(4(4-x))

... and behold, i got the answer! y = A(x/(4-x))^(1/4)

Last edited: Nov 29, 2011
4. Nov 29, 2011

### ehild

The first factor should be 1/(2cost)2.

ehild

5. Nov 29, 2011

### hunt_mat

Note that $4x-x^{2}=2^{2}-(x-2)^{2}$ I think that this will help you a great deal.

6. Nov 29, 2011

### sharks

OK, i went over it again, found the mistake as you pointed out and i edited my previous post, as i got stuck with my alternate method. It really appears to be quite complicated if i use a trig substitution, but i wonder how/if it'll work out.

7. Nov 29, 2011

### I like Serena

Oh well, it says here what the integral of sec t is:
http://en.wikipedia.org/wiki/Lists_of_integrals#Trigonometric_functions

You can get rid of the arcsin, by using the definition of sine, cosine and tanget.

arcsin(x) means you have a triangle with hypotenuse 1, and opposing side x.
So for instance cos(arcsin(x)) is the adjacent/hypotenuse = √(1-x2)/1.

Btw, you could also have integrated your fraction with the completed square, since it's the derivative of (1/4)artanh((x-2)/2).