# Integrating factor

gtfitzpatrick

## Homework Statement

use an integrating factor to solve
$$\frac{ \partial u}{ \partial x} = -2 + \frac{u}{2x}$$

## The Attempt at a Solution

let P(x) = $$\frac {1}{2x}$$

M(x) = $$e^(\int(\frac {1}{2x}dx))$$

= $$\sqrt{x}$$

so u = $$\frac{1}{ \sqrt{x}} \int-2\sqrt{x} dx = \frac{1}{ \sqrt{x}}(\frac{2}{3} x^(3/2))$$

=-4x + k

anyone got any ideas if im doing this right?
thanks

Homework Helper
Gold Member
You have a numerical integration factor in the wrong place

so u = $$\frac{1}{ \sqrt{x}} \int-2\sqrt{x} dx = \frac{1}{ \sqrt{x}}(\frac{2}{3} x^{(3/2)} + \mathbf{k})$$

$$=-4x + \mathbf{\frac{k}{\sqrt{x}}}$$

gtfitzpatrick

gtfitzpatrick
sorry should it be $$=\frac {-4x}{3} + \mathbf{\frac{k}{\sqrt{x}}}$$

Homework Helper
Gold Member
Sorry, I looked at the -4x in your solution, which is correct, so I missed an earlier mistake. You should have had

$$P(x) = -\frac{1}{2x}.$$

This changes quite a bit, so you should go back through the algebra.

gtfitzpatrick
i dont understand why $$P(x) = -\frac{1}{2x}.$$ should it not be term infront of u?

Homework Helper
Gold Member
i dont understand why $$P(x) = -\frac{1}{2x}.$$ should it not be term infront of u?

$$P(x)$$ is defined with that term on the same side as the derivative:

$$u'(x) + P(x) u(x) = q(x).$$

Remember that the integrating factor works because

$$(u'(x) + P(x) u(x) ) \exp \left(\int P(x) dx\right) = \frac{d}{dx} \left[ u(x) \exp \left(\int P(x) dx \right) \right].$$

gtfitzpatrick
ahh yes i didnt bring it across, thanks

gtfitzpatrick
i think this is right?
let P(x) = $$\frac {-1}{2x}$$

M(x) = $$e^(\int(\frac {-1}{2x}dx))$$

= $$\frac{1}{\sqrt{x}}$$

so u = $$\sqrt{x} \int \frac {-2}{\sqrt{x}} dx = \sqrt{x}(-4\sqrt{x} + k)$$

=-4x + $$\sqrt{x}$$ k

Homework Helper
Gold Member
The easiest way to verify a solution to a differential equation is to explicitly check that it actually satisfies the differential equation.

gtfitzpatrick
i cant figure out where i went wrong!

$$u(x)= -4x + C\sqrt{x}$$