# Thread: differential equations

1. ## differential equations

solve the differential equations
xy'-2y = x^2
my work;
dy/dx = x+ 2y/x

p(x)= 2/x
Q(x)= x^2
integral 2/x = 2lnx
Ae^2lnx
y= (integral e^2lnx)(x^2)/(e^2lnx)

2. Originally Posted by twilightstr
solve the differential equations
xy'-2y = x^2
my work;
dy/dx = x+ 2y/x

p(x)= 2/x
Q(x)= x^2
integral 2/x = 2lnx
Ae^2lnx
y= (integral e^2lnx)(x^2)/(e^2lnx)
Use the integrating factor method.

Divide everything by $x$ and the equation becomes

$\frac{dy}{dx} -\frac{2}{x}y = x$.

The integrating factor is $e^{\int{-\frac{2}{x}\,dx}} = e^{-2\ln{x}} = e^{\ln{(x^{-2})}} = x^{-2}$.

So multiply everything by $x^{-2}$ and you get

$x^{-2}\frac{dy}{dx} - 2x^{-3}y = x^{-1}$

$\frac{d}{dx}(x^{-2}y) = x^{-1}$.

Can you go from here?

3. [quote=Prove It;274960]Use the integrating factor method.

Divide everything by $x$ and the equation becomes

$\frac{dy}{dx} -\frac{2}{x}y = x$.

The integrating factor is $e^{\int{-\frac{2}{x}\,dx}} = e^{-2\ln{x}} = e^{\ln{(x^{-2})}} = x^{-2}$.

how did u get the above step

4. [quote=twilightstr;274978]
Originally Posted by Prove It
Use the integrating factor method.

Divide everything by $x$ and the equation becomes

$\frac{dy}{dx} -\frac{2}{x}y = x$.

The integrating factor is $e^{\int{-\frac{2}{x}\,dx}} = e^{-2\ln{x}} = e^{\ln{(x^{-2})}} = x^{-2}$.

how did u get the above step
It's a standard technique for first order linear DE's.

If you have a first order linear DE of the form

$\frac{dy}{dx} + P(x)y = Q(x)$

The integrating factor is $I(x) = e^{\int{P(x)\,dx}}$.

Multiply both sides of the DE by the integrating factor and it reduces to

$\frac{d}{dx}(I(x)y) = I(x)Q(x)$

which is usually solvable.

5. Originally Posted by twilightstr
solve the differential equations
xy'-2y = x^2
my work;
dy/dx = x+ 2y/x

p(x)= 2/x
Q(x)= x^2
integral 2/x = 2lnx
Ae^2lnx
y= (integral e^2lnx)(x^2)/(e^2lnx)
It will help you considerably to recognise that $e^{2ln x}= e^{ln x^2}= x^2$!
y= $\frac{\int^x t^4 dt}{x^2}$

That is easy to integrate. (I wrote "t" for the dummy variable inside the integral rather than "x" to remind you that you cannot cancel the "x" in the denominator until after you have integrated.)

6. Originally Posted by HallsofIvy
It will help you considerably to recognise that $e^{2ln x}= e^{ln x^2}= x^2$!
y= $\frac{\int^x t^4 dt}{x^2}$

That is easy to integrate. (I wrote "t" for the dummy variable inside the integral rather than "x" to remind you that you cannot cancel the "x" in the denominator until after you have integrated.)
You have to divide everything through by x first.

So $P(x) = -\frac{2}{x}$, not -2.