1. ## Integrating Factor Problem

Find the solution of the initial value problem.

$\displaystyle ty' + (t+1)y = t$ ; $\displaystyle y(ln2) = 1$ ; $\displaystyle t > 0$

$\displaystyle \frac{dy}{dx} + p(x)y = Q(x)$

$\displaystyle y' + \left(1 + \frac{1}{t} \right)y = 1$

$\displaystyle p(t) = 1 + \frac{1}{t}$ ; $\displaystyle Q(t) = 1$

$\displaystyle \int p(x) = \int 1 + \frac{1}{t} dt = t + ln(t)$

Integrating Factor: $\displaystyle e^{t + ln(t)} = e^{t}e^{ln(t)} = te^t$

$\displaystyle te^t \left[y' + \left(1 + \frac{1}{t} \right)y \right] = te^t$

$\displaystyle te^t y' + \left(1 + \frac{1}{t} \right)y = te^t$

$\displaystyle u'v + v'u = \frac{d}{dx} (uv)$ ; $\displaystyle u = y$ ; $\displaystyle v = te^t$

$\displaystyle \frac{d}{dt}[yte^t] = te^t$

$\displaystyle \int d[yte^t] = \int te^t dt$

$\displaystyle yte^t = \int te^t dt$

Integrate by Parts: $\displaystyle \int te^t dt = te^t - e^t$

$\displaystyle yte^t = te^t - e^t$

$\displaystyle y(t) = 1 - \frac{1}{t} + C$

Initial Condition: $\displaystyle y(ln2) = 1$

$\displaystyle y(ln2) = 1 = 1 - \frac{1}{ln2} + C$

$\displaystyle C = \frac{1}{ln2}$

My Solution: $\displaystyle y(t) = 1 - \frac{1}{t} + \frac{1}{ln2}$

Book Solution: $\displaystyle y(t) = \frac{t - 1 + 2e^{-t}}{t}$

Where exactly did I go wrong?

2. ## Re: Integrating Factor Problem

Originally Posted by VitaX
Find the solution of the initial value problem.

$\displaystyle ty' + (t+1)y = t$ ; $\displaystyle y(ln2) = 1$ ; $\displaystyle t > 0$

$\displaystyle \frac{dy}{dx} + p(x)y = Q(x)$

$\displaystyle y' + \left(1 + \frac{1}{t} \right)y = 1$

$\displaystyle p(t) = 1 + \frac{1}{t}$ ; $\displaystyle Q(t) = 1$

$\displaystyle \int p(x) = \int 1 + \frac{1}{t} dt = t + ln(t)$

Integrating Factor: $\displaystyle e^{t + ln(t)} = e^{t}e^{ln(t)} = te^t$

$\displaystyle te^t \left[y' + \left(1 + \frac{1}{t} \right)y \right] = te^t$

$\displaystyle te^t y' + \left(1 + \frac{1}{t} \right)y = te^t$

$\displaystyle u'v + v'u = \frac{d}{dx} (uv)$ ; $\displaystyle u = y$ ; $\displaystyle v = te^t$

$\displaystyle \frac{d}{dt}[yte^t] = te^t$

$\displaystyle \int d[yte^t] = \int te^t dt$

$\displaystyle yte^t = \int te^t dt$

Integrate by Parts: $\displaystyle \int te^t dt = te^t - e^t$

$\displaystyle yte^t = te^t - e^t$ This is where you made your mistake.

$\displaystyle y(t) = 1 - \frac{1}{t} + C$

Initial Condition: $\displaystyle y(ln2) = 1$

$\displaystyle y(ln2) = 1 = 1 - \frac{1}{ln2} + C$

$\displaystyle C = \frac{1}{ln2}$

My Solution: $\displaystyle y(t) = 1 - \frac{1}{t} + \frac{1}{ln2}$

Book Solution: $\displaystyle y(t) = \frac{t - 1 + 2e^{-t}}{t}$

Where exactly did I go wrong?
You made your mistake when you said $\displaystyle yte^t = te^t-e^t$. It should be $\displaystyle yte^t=te^t-e^t{\color{red} + C}$.

That way, when you divide through by $\displaystyle te^t$, you get $\displaystyle y=1-\frac{1}{t}+\frac{1}{t}Ce^{-t}$

Now apply your initial condition to get the book's solution.

I hope this helps.

3. ## Re: Integrating Factor Problem

Ah, OK. Thanks for clearing that up.