# Which is the correct integration using an integrating factor?

When shown equation $$(1)$$, I have two different answers for its integration, one mine, one more from a colleague and I am uncertain of which is the correct one.

$$\left( \frac{\partial r}{\partial T}\right)_{E/T}- r\frac{c_0}{T}= - \frac{c_0}{T} \tag{1}$$

where the subscript indicates a constant ratio of $$E/T$$ throughout the calculations.

My take on it:

Using an integrating factor $$I= e^{\int P dT}$$ where $$P=Q= \frac{c_0}{T}$$.

Following the rule for this method:

$$I r = \int^{T_f}_{T_0} I Q dT$$

$$\left( \frac{T_f}{T_0}\right)^{-c_0}r= \int^{T_f}_{T_0} \left( \frac{T_f}{T_0}\right)^{-c_0} \left( \frac{-c_0}{T} \right) dT + f(E/T)$$

because $$E/T$$ is seen as a constant and would be differentiated to $$0$$ I added a function of this term in my calculation, $$f(E/T)$$.

$$r=\ln \left( \frac{T_f}{T_0}\right)^{-c_0}+ \left(\frac{T_0}{T_f}\right)^{-c_0} f(E/T)$$

My colleague's take on it:

I don't understand where his answer comes from, but he said to have used the same process of integration, using an integrating factor, and choosing $$K$$ as the constant term.

$$r = -e^{\int_{T_0}^{T} c_0/T^\prime dT^\prime} \int \frac{c_0}{T^\prime} e^{-\int c_0/T^{\prime \prime} dT^{\prime \prime}} dT^\prime - K e^{\int_{T_0}^{T} c_0/T^\prime dT^\prime}$$

Which is the correct integration using an integrating factor?

• I start by apologising for the notation. But adding the boundary conditions, $T_f$ and $T_0$ shouldn't the formula for $I$ be a constant? (It makes sense that it isn't one, because as you said, what would the point of having it be) If it is the way you wrote it (which I believe to be true, I just don't understand why) why is there a $T_0$ in the denominator and not just $T^{-c_0}$? My apologies for not fully understanding your answer. – gfgc Jul 15 '20 at 21:05
• The beauty of integrating constant is that it only requires an antiderivative, not any specific antiderivative aka they are all the same up to a multiplicative constant (this is apparent when you see how IF is applied, who cares if you multiply both sides of a DE by an extra constant factor?) – Ninad Munshi Jul 15 '20 at 21:07
• I'll move my first comment to an answer. – Ninad Munshi Jul 15 '20 at 21:08
• Could you further explain how you obtained your $I$. Once again, thank you for your help. – gfgc Jul 15 '20 at 21:09
• I obtained $I$ the same way you did, the only difference is the bounds: $$I(x) = \int_a^x P(x)\:dx$$ – Ninad Munshi Jul 15 '20 at 21:10

The flaw is in your method, not (necessarily) your colleague's (although this really depends on what the bounds are for his antiderivatives, it's really hard to tell from the clutter in his notation). You treat the integrating factor like a constant, when it really should have been $$I = \left(\frac{T}{T_0}\right)^{-c_0} \neq \left(\frac{T_f}{T_0}\right)^{-c_0}$$ As a sanity check, nontrivial integrating factors should always be varying functions, not constants (otherwise, what's the point of an integrating factor?)
• I am sorry for asking you so many questions, but I was hoping you could answer one last one. It makes sense now why my colleagues is the correct one, but should there be limits $x$ and $a$ (as you wrote above) for his integral in the middle , $\int \frac{c_0}{T'}$? To me it makes sense that it does, but I just wanted to be sure. – gfgc Jul 16 '20 at 8:48
• But if it helps, consider that $$\int \cos x \:dx = \sin x + C$$ if rewritten as $$\int_0^x \cos t\:dt = \sin x$$ is tantamount to choosing $C=0$. With or without bounds, the point is you have to pick one antiderivative, you cannot use a whole family of them at once. – Ninad Munshi Jul 16 '20 at 9:07