44.4.26 problem 9 (b)

Internal problem ID [7039]
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.1 Solution curves without a solution. Exercises 2.1 at page 44
Problem number : 9 (b)
Date solved : Wednesday, March 05, 2025 at 04:03:34 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }&=\frac {x^{2}}{5}+y \end{align*}

With initial conditions

\begin{align*} y \left (2\right )&=-1 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 18
ode:=diff(y(x),x) = 1/5*x^2+y(x); 
ic:=y(2) = -1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {x^{2}}{5}-\frac {2 x}{5}-\frac {2}{5}+{\mathrm e}^{x -2} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 25
ode=D[y[x],x]==2/10*x^2+y[x]; 
ic={y[2]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{5} \left (-x^2-2 x-2\right )+e^{x-2} \]
Sympy. Time used: 0.161 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2/5 - y(x) + Derivative(y(x), x),0) 
ics = {y(2): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {x^{2}}{5} - \frac {2 x}{5} + \frac {e^{x}}{e^{2}} - \frac {2}{5} \]