72.2.28 problem 21

Internal problem ID [14584]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Exercises section 1.3 page 47
Problem number : 21
Date solved : Thursday, March 13, 2025 at 03:37:49 AM
CAS classification : [_quadrature]

\begin{align*} v^{\prime }&=\frac {K -v}{R C} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 18
ode:=diff(v(t),t) = (K-v(t))/R/C; 
dsolve(ode,v(t), singsol=all);
 
\[ v = K +c_{1} {\mathrm e}^{-\frac {t}{R C}} \]
Mathematica. Time used: 0.042 (sec). Leaf size: 26
ode=D[ v[t],t]==(k-v[t])/(r*c); 
ic={}; 
DSolve[{ode,ic},v[t],t,IncludeSingularSolutions->True]
 
\begin{align*} v(t)\to k+c_1 e^{-\frac {t}{c r}} \\ v(t)\to k \\ \end{align*}
Sympy. Time used: 0.126 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
C = symbols("C") 
K = symbols("K") 
R = symbols("R") 
v = Function("v") 
ode = Eq(Derivative(v(t), t) - (K - v(t))/(C*R),0) 
ics = {} 
dsolve(ode,func=v(t),ics=ics)
 
\[ v{\left (t \right )} = C_{1} e^{- \frac {t}{C R}} + K \]