How to solve this linear first order differential equation?

$$\frac{1}{N}\frac{dN}{dt} + 1 = te^{t+2}$$

The equation is separable and so is easily solvable. However doing so gives me the following:

$$\int \frac{1}{N}dN = \int(te^{t+2} - 1)dt$$

Simplyifing gives:

$$|N| = e^{-t + te^{t+2} - e^{t+2} + c}$$

How do I proceed from here?

• Why would you need to proceed? Looks done to me. – Mike Oct 8 '14 at 0:56
• @Mike I want an equation for $N$ which isn't necessarily equal to the absolute value of $N$. – guest Oct 8 '14 at 0:57
• @Amzoti I redid the integrals but got the same result - what am I missing? – guest Oct 8 '14 at 0:57
• $N=\pm$... That's about all I see. Integration looks fine from what I can see. – Mike Oct 8 '14 at 0:59
• Yes, the exponential is always positive. But we don't have $\ln n$ on the left side. We have $$\ln |n| = e^{f(t)}$$ – guest Oct 8 '14 at 1:06

Here are the steps $$\frac{1}{N}\frac{d}{dt}N+1= te^{t+2}$$ $$\frac{1}{N}\frac{d}{dt}N= te^{t+2}-1$$ $$\frac{1}{N}dN= te^{t+2}-1\ dt$$ $$\int \frac{1}{N}dN= \int te^{t+2}-1\ dt$$ $$\ln|N|+C_1= e^2\int te^t\ dt-\int dt$$ $$\ln|N|+C_1= e^2 e^t(t-1)+C_2-t+C_3$$ $$\ln|N|= e^{t+2}(t-1)-t+C$$ $$e^{\ln|N|}= e^{e^{t+2}(t-1)-t+C}$$ $$N= e^{e^{t+2}(t-1)-t+C}$$
• Doesn't $e^{\ln |N|} = |N|$ instead of $N$? – guest Oct 8 '14 at 3:00