Differential equations question

1. Mar 7, 2013

johnsholto

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

I need to solve for a general solution of the following equation:

(x^2+6x+12)dy=y^2dx

2. The attempt at a solution

I tried using the method for seperable ODEs and got the following:

∫(x^2+6x+12)dy=∫(y^2)dx

(x^2+6x+12)y=(y^2)x+C

(x^2+6x+12-C)/x=y

2. Mar 7, 2013

Ryuzaki

Here, "x" and "y" are your variables. So, by "separation of variables", it means that one has to bring all the "x"s to one side of the equation, and all the "y"s to the other side (Technically speaking, this is not what is actually happening, since then you would be integrating a different variable on both sides of the equation, which does not make any sense. However, let's just put this aside for now, and solve the problem. Maybe we can discuss it in a subsequent post).

You have not done the above in your first step. All you have done is, treat the expressions (x2 + 6x + 12) and (y2) as constants, and you took them out of the integral sign. However, this is incorrect, as these expressions involve the variables "x" and "y" and hence can't be taken out of the integral.

The first step would be to divide both sides by (x2 + 6x + 12) (y2). Then, you would get dy/y2 = dx/(x2 + 6x + 12). Now, you have "separated" both the variables and all you need to do is integrate both sides. Can you take it from here?

3. Mar 7, 2013

johnsholto

I did try that, but I don't know how to integrate 1/x^2+6x+12 easily.

4. Mar 7, 2013

Ryuzaki

The important thing to notice while trying to integrate dx/(x2 + 6x +12 ) is that the quadratic polynomial (x2 + 6x +12) does not factor with rational coefficients, and so the method of partial fractions is ruled out.

So, what one follows in such cases is "Completing the Square". I feel this concept is best understood with an example. Consider a quadratic polynomial (x2 + 12x + 40). This quadratic is clearly not a perfect square. But one can write this quadratic as the sum of a perfect square and a constant in the following manner :- (x+6)2 + (2)2. Do you see why this works? It's because in any perfect square (x+a)2, the number "a" is always half the coefficient of x, and the constant term is always equal to a2.

Therefore, for the above problem, you can write (x2 + 6x +12) as (x+3)2 + (√3)2. So now, you've to integrate dx/( (x+3)2 + (√3)2 ). So now, you may ask why have I done this? It's because there is a direct formula for integrals of this form. Now all you have to do is just look it up, and use it.

Last edited: Mar 7, 2013
5. Mar 7, 2013

johnsholto

So the integral must be √3 *arctan(√3 *(x+3))+C.

Which would give us y=-1/√3 *arctan(√3 *(x+3))+C

6. Mar 7, 2013

Ryuzaki

No, you've evaluated the integral incorrectly I'm afraid. Can you please completely state the formula you've used?