I am having a confusing moment. This should be simple, but I am still stumbling around an inconsistency.
Below the differential equation in question: $$\frac{dT_\Delta}{dt}=cT_\Delta$$ where $T_\Delta = T - T_{\text{end}}$.
Now if I want to compute the solution to this differential equation, I can take several approaches. I will present a first approach that works, and then a second approach, where for some reason I am not getting to the same solution.
Approach 1:
Rearrange the differential equation as follows: $$\frac{dT_\Delta}{dt}-cT_\Delta=0$$ This is a homogenous differential equation, where the solution is: $$T_\Delta(t) = T_\Delta(0)e^{ct}$$ I could then rearrange this expression to my goal expression: $$T(t) = (T(0)-T_{\text{end}})e^{ct} + T_{\text{end}}$$
Till here all good. Let's move on to the problematic approach.
Approach 2:
Insert $T_\Delta = T - T_{\text{end}}$ into the differential equation: $$\frac{d(T - T_{\text{end}})}{dt}=c(T - T_{\text{end}})= cT - cT_{\text{end}}$$ Then we realise that $\frac{d(T - T_{\text{end}})}{dt}$ = $\frac{dT}{dt}$. We can therefore rearrange to this expression instead: $$\frac{dT}{dt} = cT - cT_{\text{end}}$$ I am doing this, because now the equation is in the familiar state space format. (Well, only the state equation.)
If I now proceed to solving this equation, then I would first set up the differential equation as follows: $$\frac{dT}{dt} - cT = - cT_{\text{end}}$$ I could now either define e.g. $T' = T - cT_{\text{end}}$, and I would come back to a homogenous expression similar to the one above, and get to the right answer... or I can first solve the homogenous part and then the particular part.
The homogenous differential equation would then be $\frac{dT}{dt} - cT = 0 $, to which the solution is $T(t) = T(0)e^{ct}$.
For the particular solution I choose $T=A$. This leads to $A = T_{\text{end}}$. This would lead me then to believe that the solution with this approach is $T(t) = T(0)e^{ct} + T_{\text{end}}$. This however is not the right solution.
What am I doing wrong in the second approach? Have I overlooked something?
In the homogeneous solution, you can not pre-maturely evaluate the initial condition. It must remain with a variable coefficient, $T_h(t)=Ke^{ct}$. Then the general solution is $$ T(t)=T_h(t)+T_p(t)=Ke^{ct}+T_{end}. $$ Now with this general solution of the inhomogeneous equation you evaluate the IC to find $K=T(0)-T_{end}$.