38.6.26 problem 26

Internal problem ID [8456]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.3 Linear equations. Exercises 2.3 at page 63
Problem number : 26
Date solved : Tuesday, September 30, 2025 at 05:37:22 PM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

\begin{align*} y \left (0\right )&={\frac {1}{3}} \\ \end{align*}
Maple. Time used: 0.021 (sec). Leaf size: 15
ode:=diff(y(x),x) = 2*x-3*y(x); 
ic:=[y(0) = 1/3]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {2 x}{3}-\frac {2}{9}+\frac {5 \,{\mathrm e}^{-3 x}}{9} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 35
ode=D[y[x],x]==2*x-3*y[x]; 
ic={y[0]==1/3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} e^{-3 x} \left (3 \int _0^x2 e^{3 K[1]} K[1]dK[1]+1\right ) \end{align*}
Sympy. Time used: 0.078 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + 3*y(x) + Derivative(y(x), x),0) 
ics = {y(0): 1/3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {2 x}{3} - \frac {2}{9} + \frac {5 e^{- 3 x}}{9} \]