44.3.3 problem 9

Internal problem ID [6984]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Review problems at page 34
Problem number : 9
Date solved : Wednesday, March 05, 2025 at 04:01:11 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=2 y-4 \end{align*}

Maple. Time used: 0.000 (sec). Leaf size: 12
ode:=diff(y(x),x) = 2*y(x)-4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2+{\mathrm e}^{2 x} c_{1} \]
Mathematica. Time used: 0.032 (sec). Leaf size: 20
ode=D[y[x],x]==2*y[x]-4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2+c_1 e^{2 x} \\ y(x)\to 2 \\ \end{align*}
Sympy. Time used: 0.142 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) + Derivative(y(x), x) + 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{2 x} + 2 \]