# Please check my work (differential equation)

1. Apr 12, 2010

### darryw

1. The problem statement, all variables and given/known data
ty' + 2y = sin t (no initial conditions given)

2. Relevant equations

3. The attempt at a solution
ty' + 2y = sin t

y' + (2/t)y = sin t / t

mu(x) = e^integ(2/t) = t^2

(t^2)y)' = integ t sin t

(t^2)y = tsin t - t cos t + c

y = (sin t - cos t)/ t + c/(t^2) (This is my solution)

thanks for any help

2. Apr 12, 2010

### tiny-tim

Hi darryw!

(have an integral: ∫ and a mu: µ and try using the X2 tag just above the Reply box )

Your equations are ok down to …
… the first line of course should be (t^2)y)' = t sin t (without the ∫) ,

but more seriously your integration by parts has come out wrong …

check it by differentiating, and you'll see how to fix it.

3. Apr 12, 2010

### darryw

i knew it! this is an ongoing problem for me.. I always have problem escaping the integration loop when i have something like ∫t cos t.. (or even worse: ∫e^t cos t

as i understand it, the idea is to integrate up to a certain point and then subtract the integrals identity from left hand side, so then you cancel the integrals. When i did that i ended up with tsin t - t cos t. Can you offer any help/tips so i dont have to write out the whole long integration process? thanks

4. Apr 12, 2010

### tiny-tim

he he

the official method for ∫ fg dx is to integrate g only, giving [f(∫ g dx)], and then subtract the integral of f' time that: ∫ { f'(∫ g dx)} dx

but my method (only works for easy cases) is to make a guess (in this case, -tcost), differentiate it (-cost + tsint), and then integrate whatever's over (-cost)