Since this is a
linear equation- and especially since it is a linear equation with
constant coefficients, there is a simpler approach to it. First, find the general solution to the "associated homogeneous equation". That is the equation we get by dropping "g(t)", the only part that has no "f(t)", the unknown function in it.
That gives
f′=−Af where "A" is your
λN+λ1C+λ1I.
We can write that as
fdf=−Adt and integrate both sides to get
ln(f)=−∫Adt. Since A is a constant here, that is
ln(f)=−At+C for C an arbitrary constant. Then, taking the exponential of both sides,
f(t)=e−At+C=C′e−At where
C′=eC.
Now we look for a single solution to the entire equation using a method called "variation" of parameters. We look for a solution to the entire equation of the for
f(t)=u(t)e−At for some function u(t) replacing the constant C'. (That is the "parameter" we are "varying".)
With
f(t)=u(t)e−At, we use the product rule to differentiate:
f′(t)=u′(t)e−At−Au(t)e−At. Putting those into the differential equation, \(\displaystyle u'(t)e^{-At}- Au(t)e^{-At}= -Au(t)e^{-At}+ g(t). The two "\(\displaystyle -Aue^{-At}\)" cancel as a consequence of
e−At being a solution to the associated homogeneous equation. That leaves
u′e−At=g(t) so that
u′=g(t)eAt and
u(t)=∫g(t)eAtdt.
Because, in your problem,
g(t)=dVirrCw(t) that can be writtenas
u(t)=dVirr∫0tCw(s)eAsds+D. Notice that I have changed the "dummy variable" in the integral to s, to avoid confusion with the "real" variable, t, and have written the "indefinite" integral as a definite integral from 0 to t with the added constant, D, to allow for other possible starting values than "0".
Since
f(t)=u(t)e−At, we now have
f(t)=(dVirre−At)∫0tCw(s)eAsds+De−At or,
since your
A=λN+λ1C+λ1I,
f(t)=(dVirre−(λN+λ1C+λ1I)t)∫0tCw(s)e(λN+λ1C+λ1I)sds+De−(λN+λ1C+λ1I)t\)