# Thread: solving ODE with integration factors

1. ## solving ODE with integration factors

I once again have a disagreement with my textbook
If anyone can find a mistake I would be grateful.

edit: I just realized I probably need to have the integration factor in absolute value and k > 0, but that will propagate through my solution and not effect the work I have done so far.

$\displaystyle y'+\frac{1}{x-2}y = 3x$; $\displaystyle y(3)=4$

integration factor $\displaystyle I(x)=e^{\int{\frac{1}{x-2}dx}}=k(x-2)$ where k is non zero.

$\displaystyle k(x-2)y' +\frac{k(x-2)}{x-2}y = 3kx^2-6kx$

$\displaystyle k\frac{d}{dx}y(x-2) = 3kx^2-6kx$

$\displaystyle \int{(k\frac{d}{dx}y(x-2))dx} = \int{(3kx^2-6kx)dx}$

$\displaystyle ky(x-2) = kx^3-3kx^2+C$
$\displaystyle y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$ where $\displaystyle A=\frac{C}{k}$

This is about where I stopped, I tried expanding the numerators and factoring to reduce my highest power of x by one which worked, but I still have x's in the denominators of my solution which the book does not have, so I guess I have made a mistake already.

The final solution in the book is $\displaystyle y=x^2-x-2$

Thanks for any help.

2. Originally Posted by stevedave
I once again have a disagreement with my textbook
If anyone can find a mistake I would be grateful.

$\displaystyle y'+\frac{1}{x-2}y = 3x$; $\displaystyle y(3)=4$

integration factor $\displaystyle I(x)=e^{\int{\frac{1}{x-2}dx}}=k(x-2)$ where k is non zero.

$\displaystyle k(x-2)y' +\frac{k(x-2)}{x-2}y = 3kx^2-6kx$

$\displaystyle k\frac{d}{dx}y(x-2) = 3kx^2-6kx$

$\displaystyle \int{(k\frac{d}{dx}y(x-2))dx} = \int{(3kx^2-6kx)dx}$

$\displaystyle ky(x-2) = kx^3-3kx^2+C$
$\displaystyle y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$ where $\displaystyle A=\frac{C}{k}$

This is about where I stopped, I tried expanding the numerators and factoring to reduce my highest power of x by one which worked, but I still have x's in the denominators of my solution which the book does not have, so I guess I have made a mistake already.

The final solution in the book is $\displaystyle y=x^2-x-2$

Thanks for any help.
$\displaystyle y'+\frac{1}{x-2}y = 3x$; $\displaystyle y(3)=4$

This if of the form $\displaystyle y'(x) + p(x)y(x) = r(x)$

In this occasion you find the integrating factor $\displaystyle \phi (x) = e^{\int p(x) dx}$, but you can exclude the constant!

Then your solution is of the form:

$\displaystyle \phi(x)y(x) = \int r(x)\phi(x)dx$

Hence, given that $\displaystyle \phi(x) = x-2$

$\displaystyle (x-2) y(x) = \int 3x(x-2) dx$

$\displaystyle (x-2) y(x) = \int 3x^2-6x dx$

$\displaystyle (x-2) y(x) = x^3-3x^2 +C$

$\displaystyle (x-2) y(x) = x^3-3x^2 +C$

$\displaystyle y(x) = \frac{x^3-3x^2 +C}{x-2}$

Applying conditions gives C = 4

$\displaystyle y(x) = \frac{x^3-3x^2 +4}{x-2}$

Use long division and you should get the same as your textbook. Alternatively use inspection!

If $\displaystyle y(x) = \frac{x^3-3x^2 +4}{x-2} = ax^2+bx+c$, then $\displaystyle (ax^2+bx+c)(x-2) = x^3-3x^2 +4$

Clearly $\displaystyle a = 1$, so that the first terms in each bracket multiply to produce $\displaystyle x^3$. $\displaystyle c$ must be $\displaystyle -2$, so that the last terms in each bracket multiply to give you $\displaystyle 4$. And to account for $\displaystyle -3x^2$, $\displaystyle b$ must be $\displaystyle -1$!

Both you and your textbook were correct .

3. Originally Posted by stevedave
I once again have a disagreement with my textbook
If anyone can find a mistake I would be grateful.

$\displaystyle y'+\frac{1}{x-2}y = 3x$; $\displaystyle y(3)=4$

integration factor $\displaystyle I(x)=e^{\int{\frac{1}{x-2}dx}}=k(x-2)$ where k is non zero.

$\displaystyle k(x-2)y' +\frac{k(x-2)}{x-2}y = 3kx^2-6kx$

$\displaystyle k\frac{d}{dx}y(x-2) = 3kx^2-6kx$

$\displaystyle \int{(k\frac{d}{dx}y(x-2))dx} = \int{(3kx^2-6kx)dx}$

$\displaystyle ky(x-2) = kx^3-3kx^2+C$
$\displaystyle y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$ where $\displaystyle A=\frac{C}{k}$

This is about where I stopped, I tried expanding the numerators and factoring to reduce my highest power of x by one which worked, but I still have x's in the denominators of my solution which the book does not have, so I guess I have made a mistake already.

The final solution in the book is $\displaystyle y=x^2-x-2$

Thanks for any help.
From $\displaystyle y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$
when x= 3, y= 4 so $\displaystyle 4= \frac{27}{1}- \frac{27}{1}+ \frac{A}{1}$ so A= 4
$\displaystyle y= \frac{x^3- 3x^2+ 4}{x-2}= x^2- x- 2$.

4. excellent, I didn't think to try long division. Thanks a lot.