Question Number 1898 by 123456 last updated on 22/Oct/15
$$\frac{{df}}{{dt}}=\alpha{f}+\beta{t}+\gamma \\ $$$${f}\left({t}\right)=?? \\ $$
Answered by Yozzy last updated on 22/Oct/15
$$\frac{{df}}{{dt}}=\alpha{f}+\beta{t}+\gamma\:\:\:{where}\:{I}\:{assume}\:{that}\:\alpha,\beta,\gamma\:{are}\:{constants}.\:{This}\:{equation}\:{may}\:{be} \\ $$$${rewritten}\:{as}\:\:\:\:\:\frac{{df}}{{dt}}−\alpha{f}=\beta{t}+\gamma\:\:\left(\ast\right).\:{The}\:{equation}\:{is}\:{a}\:{first}\:{order}\:{linear}\:{non}−{homogeneous} \\ $$$${differential}\:{equation}\:{which}\:{may}\:{be}\:{solved}\:{by}\:{use}\:{of}\:{an}\:{integrating}\:{factor}\:\psi\left({t}\right). \\ $$$${Let}\:\psi\left({t}\right)={e}^{\int−\alpha{dt}} ={e}^{−\alpha{t}} .\:{Multiplying}\:{both}\:{sides}\:{of}\:\left(\ast\right)\:{by}\:\psi\left({t}\right)\:{we}\:{get}\: \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\psi\left({t}\right)\frac{{df}}{{dt}}+\psi\left({t}\right)\left(−\alpha\right){f}=\psi\left({t}\right)\left(\beta{t}+\gamma\right) \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\Rightarrow\:\:\:\:\:\:\:{e}^{−\alpha{t}} \frac{{df}}{{dt}}+\left(−\alpha{e}^{−\alpha{t}} \right){f}={e}^{−\alpha{t}} \left(\beta{t}+\gamma\right) \\ $$$${Notice}\:{that}\:\frac{{d}}{{dt}}\left({e}^{−\alpha{t}} {f}\right)={e}^{−\alpha{t}} \frac{{df}}{{dt}}+\left(−\alpha{e}^{−\alpha{t}} \right){f}. \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\therefore\:\frac{{d}}{{dt}}\left({fe}^{−\alpha{t}} \right)={e}^{−\alpha{t}} \left(\beta{t}+\gamma\right)\:\:\:\:\left(\ast\ast\right) \\ $$$${Integrating}\:{both}\:{sides}\:{of}\:\left(\ast\ast\right)\:{we}\:{get}\: \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:{fe}^{−\alpha{t}} =\int{e}^{−\alpha{t}} \left(\beta{t}+\gamma\right){dt} \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:{f}={e}^{\alpha{t}} \int{e}^{−\alpha{t}} \left(\beta{t}+\gamma\right){dt} \\ $$$${By}\:{integrating}\:{by}\:{parts}, \\ $$$$\:\:\:\:\:\:\:\:\int{e}^{−\alpha{t}} \left(\beta{t}+\gamma\right){dt}=\frac{{e}^{−\alpha{t}} }{−\alpha}\left(\beta{t}+\gamma\right)−\int\frac{{e}^{−\alpha{t}} }{−\alpha}×\beta{dt}\:\:\:\:\:\:\left(\alpha\neq\mathrm{0}\right) \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:=\frac{{e}^{−\alpha{t}} \left(\beta{t}+\gamma\right)}{−\alpha}+\frac{\beta}{\alpha}×\frac{{e}^{−\alpha{t}} }{−\alpha}+{D} \\ $$$$\:\:\:\:\:\:\:\int{e}^{−\alpha{t}} \left(\beta{t}+\gamma\right){dt}=\frac{{e}^{−\alpha{t}} }{−\alpha}\left(\beta{t}+\gamma+\frac{\beta}{\alpha}\right)+{D} \\ $$$$\therefore\:{f}={e}^{\alpha{t}} \left(\frac{{e}^{−\alpha{t}} }{−\alpha}\left(\beta{t}+\frac{\beta}{\alpha}+\gamma\right)+{D}\right) \\ $$$$\:\:\:\:{f}\left({t}\right)={De}^{\alpha{t}} −\frac{\mathrm{1}}{\alpha}×\frac{\beta\alpha{t}+\beta+\alpha\gamma}{\alpha} \\ $$$$\:\:\:\:\:\:{f}\left({t}\right)={De}^{\alpha{t}} −\frac{\beta\alpha{t}+\beta+\alpha\gamma}{\alpha^{\mathrm{2}} }\:\:\left(\alpha\neq\mathrm{0}\right)\:{where}\:{D}\:{is}\:{an}\:{arbitrary}\:{constant}. \\ $$$${Checking}\:{Solution}: \\ $$$$\:\:\:\:\:\frac{{df}}{{dt}}=\alpha{De}^{\alpha{t}} −\frac{\beta}{\alpha} \\ $$$${De}^{\alpha{t}} ={f}+\frac{\beta}{\alpha}{t}+\frac{\beta+\alpha\gamma}{\alpha^{\mathrm{2}} } \\ $$$$\Rightarrow\frac{{df}}{{dt}}=\alpha{f}+\beta{t}+\alpha\frac{\beta}{\alpha^{\mathrm{2}} }+\alpha×\frac{\alpha\gamma}{\alpha^{\mathrm{2}} }−\frac{\beta}{\alpha} \\ $$$$\frac{{df}}{{dt}}=\alpha{f}+\beta{t}+\gamma\:\:\:\:{as}\:{given}. \\ $$$$ \\ $$