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.

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

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

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

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

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

$ky(x-2) = kx^3-3kx^2+C$
$
y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$
where $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 $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.

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

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

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

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

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

$ky(x-2) = kx^3-3kx^2+C$
$
y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$
where $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 $y=x^2-x-2$

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

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

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

Then your solution is of the form:

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

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

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

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

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

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

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

Applying conditions gives C = 4

$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 $y(x) = \frac{x^3-3x^2 +4}{x-2} = ax^2+bx+c$, then $(ax^2+bx+c)(x-2) = x^3-3x^2 +4$

Clearly $a = 1$, so that the first terms in each bracket multiply to produce $x^3$. $c$ must be $-2$, so that the last terms in each bracket multiply to give you $4$. And to account for $-3x^2$, $b$ must be $-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.

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

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

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

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

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

$ky(x-2) = kx^3-3kx^2+C$
$
y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$
where $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 $y=x^2-x-2$

Thanks for any help.
From $y=\frac{x^3}{x-2}-\frac{3x^2}{x-2}+\frac{A}{x-2}$
when x= 3, y= 4 so $4= \frac{27}{1}- \frac{27}{1}+ \frac{A}{1}$ so A= 4
$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.