# Solving differential equation with integrating factor...?

Can someone tell me where I go wrong here, please:

df/dt + 2f = k

g(t)= 2. h(t)= K

p(t)= exp∫ 2 dt. = e^(2t)

f = 1/(e^(2t)) ∫ e^(2t) (k) dt

= 1/e^(2t) * 1/2* k*e^2t) + c

= 1/2 * k + c

But then we lose the t???

### 2 Answers

- az_lenderLv 73 months agoFavourite answer
Agree that e^(2t) is a suitable integrating factor. So:

[e^(2t)] df/dt + f[e^(2t)] - ke^(2t) = 0 =>\

[e^(2t)] df + {f[e^(2t)] - ke^(2t)] dt = 0. <--EQN "A"

Now we seek a function of f AND t, such that

the partial of that function w/r/t f is [e^(2t)],

and the partial w/r/t "t" is {f[e^(2t) - ke^(2t)}.

Well, that's easy, the function is

fe^(2t) - (k/2)e^(2t) + c.

So the left side of the EQN "A" is the total differential of

fe^(2t) - (k/2)e^(2t) + c, and the right side is the total differential of a constant

The general solution is

fe^(2t) - (k/2)e^(2t) = C, or

f(t) = [C + (k/2)e^(2/t)] / e^(2t), or

f(t) = k/2 + Ce^(-2t).

I think what went wrong in your solution is that your "p(t)" needed a constant of integration, that's where the Ce^(-2t) will end up coming from.

- Log in to reply to the answers

- VamanLv 73 months ago
df/dt + 2f = k.Multiply it with e^2t. You have e^2t dp/dt+2 p e^2t= d/dt(pe^2t)

The equation is d/dt {e^(2t) p}= k e^2t. Integrate it.

p e^(2t) = k/2 e^(2t)+c. p = k/2 + c e^(-2t)

- Log in to reply to the answers