7.4.31 problem 31 (a)

Internal problem ID [103]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.5 (linear equations). Problems at page 54
Problem number : 31 (a)
Date solved : Saturday, March 29, 2025 at 04:31:31 PM
CAS classification : [_separable]

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

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