I have this differential equation which I want to solve
$\displaystyle\frac{dT_i}{dt}=\frac{1}{RC}(T_a-T_i)+\frac{1}{C} \Phi_h$
I know it is in the form
$y'=ay+b$
But how can I solve it ?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityIf you have $$y'(x)=ay(x)+b(x),$$for constant $a$, then the simpliest way is to multiply the equation by $e^{-ax}$ (nonzero everywhere) and deduce that $$(y(x)e^{-ax})' = e^{-ax}b(x),$$which implies that $$y(x)e^{-ax} - y(0) = \int_0^x e^{-as}b(s)ds.$$ Finally, $$y(x) = y(0)e^{ax} + \int_0^x e^{-a(x-s)}b(s)ds.$$
As a separable equation:
\begin{align} {dy\over dx}&=ay+b\\ {dy\over ay+b}&=dx\\ \int {dy\over ay+b}&=\int\,dx\\ {1\over a}\ln|ay+b|&=x+C\\ \ln|ay+b|&=ax+aC\\ e^{\ln|ay+b|}&=e^{ax+aC}\\ |ay+b|&=e^{ax}e^{aC}\\ ay+b&=\pm e^{aC}e^{ax}\\ ay+b&=De^{ax}, \quad D\not= 0\\ y&=Ke^{ax}-{b\over a} \end{align}
You can also solve it via an integrating factor:
\begin{align} y'-ay&=b \qquad\quad\therefore\text{integrating factor is }e^{\int -a\,dx}=e^{-ax}\\ e^{-ax}(y'-ay)&=e^{-ax}b\\ [e^{-ax}y]'&=be^{-ax}\\ \int[e^{-ax}y]'\,dx&=\int be^{-ax}\,dx\\ e^{-ax}y&={be^{-ax}\over -a}+C\\ y&=-{b\over a}+Ce^{ax} \end{align}
$$\dfrac{1}{a}\int \dfrac{dy}{y+\dfrac{b}{a}}=\dfrac{1}{a}\int\dfrac{d\left(y+\dfrac{b}{a}\right)}{y+\dfrac{b}{a}}=\int dx$$