63.5.25 problem 12

Internal problem ID [13028]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.4.1. Integrating factors. Exercises page 41
Problem number : 12
Date solved : Monday, March 31, 2025 at 07:31:24 AM
CAS classification : [_separable]

\begin{align*} x^{\prime }+p \left (t \right ) x&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 13
ode:=diff(x(t),t)+p(t)*x(t) = 0; 
dsolve(ode,x(t), singsol=all);
 
\[ x = c_1 \,{\mathrm e}^{-\int p \left (t \right )d t} \]
Mathematica. Time used: 0.031 (sec). Leaf size: 27
ode=D[x[t],t]+p[t]*x[t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to c_1 \exp \left (\int _1^t-p(K[1])dK[1]\right ) \\ x(t)\to 0 \\ \end{align*}
Sympy. Time used: 0.298 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(p(t)*x(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} e^{- \int p{\left (t \right )}\, dt} \]