# Solving a differential equation?

I'm trying to analyze the transient state of a RC circuit. My book gives me the following differential equation:

$$\frac{d(v(t))}{dt} + av(t) = c$$

for some constants $a$ and $c$.

The book thens proceeds to solve it, and says that:

$$v(t) = K_1 + K_2e^{-t/\tau}$$

for some constants $\tau, K_1, K_2$. We haven't learned differential equations yet, so I wasn't able to follow along the solution of the differential equation.

However, doesn't:

$v(t) = c/a$

also satisfy the differential equation? Why isn't this a valid solution to the equation? If it is a valid question, what could possibly motivate the book to not include it?

• This solution is actually embedded in the solution they give you. They just swallowed it up into the $K_1$ (constant) term. Note that $c/a$ is constant as well. Apr 14 '14 at 19:29
• But for $c/a$ to be embedded in the solution, $K_2e^{-t/\tau}$ has to be zero for some $t$. And that isn't possibly for $t < \infty$ is it?
– dfg
Apr 14 '14 at 19:31
• @dfg According to that reasoning then it would fail for $t\neq 0$, not just negative $t$. The thing here is that the solution is given like this: there exist constants $K_1, K_2$ such that $\forall t\in \mathbb R(v(t) = K_1 + K_2e^{-t/\tau})$. Now consider the function $f$ such that $f(t)=\dfrac c a$ for all $t\in \mathbb R$. Do there exist constants $K_1, K_2$ such that $\forall t\in \mathbb R(v(t) = K_1 + K_2e^{-t/\tau})$? Yes, they do with $K_1=\dfrac c a$ and $K_2=0$. Apr 14 '14 at 19:35

Given a non-trivial interval $I$ and $a,b$ continuous functions (therefore integrable) defined on $I$, consider the differential equation $y′+ay=b$. Let $A$ be an antiderivative of $a$. There exists $K\in \mathbb R$ such that for all $t\in I$ the following holds: \begin{align} y'(t)+a(t)y(t)=b(t)&\iff e^{A(t)}(y'(t)+a(t)y(t))=e^{A(t)}b(t)\\ &\iff \dfrac{d}{dt}\left(t\mapsto e^{A(t)}y(t)\right)(t)=e^{A(t)}b(t)\\ &\iff e^{A(t)}y(t)=\int e^{A(t)}b(t)\,\mathrm dt + K\\ &\iff y(t)=e^{-A(t)}\int e^{A(t)}b(t)\,\mathrm dt+Ke^{-A(t)},\end{align} where $\displaystyle \int e^{A(t)}b(t)\mathrm dt$ denotes an antiderivative of $t\mapsto e^{A(t)}b(t)$ on $I$.

As mentioned the solution $v(t)=\dfrac c a$ for all $t$ is given in the general formula.

• Makes sense. Thanks, appreciate the help.
– dfg
Apr 14 '14 at 20:03
• @dfg You're welcome. Apr 14 '14 at 20:03

"Why isn't this a valid solution to the equation?": it absolutely is, setting $K_1=\frac{c}{a}$ and $K_2=0$ !

You just found a particular case of the general solution.

To solve a first order differential equation, you can use integral factor. This video walks you through the process(for RC circuits). https://www.youtube.com/watch?v=th39yALievI&t=3s