18. dN/dt+N=Nte^{t+2} by separable method.
To solve the differential equation by separable method, we need to separate the variables
and
on opposite sides of the equation and integrate both sides.
Starting with the given differential equation:
We can first solve the homogeneous equation to get the complementary solution:
where is a constant determined by the value of the constant of integration
.
Now we need to find a particular solution to the non-homogeneous equation. We can use the method of variation of parameters to do so. Let , where
and
are functions of
. Then, we have:
Substituting this into the original differential equation and simplifying, we get:
where is a constant of integration.
Now, we can substitute the complementary and particular solutions back into the original equation to get the general solution:
where and
are constants determined by the initial conditions.
Therefore, the general solution to the given differential equation is:
where and
are constants determined by the initial conditions.