Diff EQ - Simple Linear ODE

1. Sep 26, 2006

verd

Hey,

So I solved this one linear DE and the answer I got isn't the same as the one in the back of my textbook... And I'm not sure why. I thought I was doing this right. Could someone tell me what I'm doing wrong?

Here's what I'm given:

$$x^{2}y'+xy=1$$
$$\frac{dy}{dx}+\frac{x}{x^{2}}y=\frac{1}{x^{2}}$$
$$\frac{dy}{dx}+\frac{1}{x}y=\frac{1}{x^{2}}$$
$$integrating-factor-p=\frac{1}{x}$$
$$integrating-factor\rightarrow e^{\int p(x) dx}=e^{\int \frac{1}{x}dx}= e^{lnx}=x$$
$$(xy)'=\frac{1}{x^{2}}$$
$$xy=\int x^{-2}dx=\frac{-1}{x}+C$$
$$y=\frac{-1}{x^{2}}+\frac{C}{x}$$

That's what I get.

The answer in the textbook is:
$$y=x^{-1}lnx+Cx^{-1}$$

Which is similar but not the same... What'd I do wrong?

2. Sep 26, 2006

EbolaPox

When you get an integrating factor, multiply it through both sides to obtain

$$(xy)' = \frac{1}{x}$$
Then, Integrate to obtain
$$\int d(xy) = \int \frac{1}{x} dx$$
$$y = \frac{ln(x)}{x} + Cx^{-1}$$
The step where you made the error was after the integrating factor, you did not also apply it to the right side of the equation, the $$x^{-2}$$.