44.6.26 problem 26

Internal problem ID [7170]
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 : Sunday, March 30, 2025 at 11:49:56 AM
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,ic],y(x), singsol=all);
 
\[ y = \frac {2 x}{3}-\frac {2}{9}+\frac {5 \,{\mathrm e}^{-3 x}}{9} \]
Mathematica. Time used: 0.043 (sec). Leaf size: 21
ode=D[y[x],x]==2*x-3*y[x]; 
ic={y[0]==1/3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{9} \left (6 x+5 e^{-3 x}-2\right ) \]
Sympy. Time used: 0.172 (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} \]