44.4.12 problem 3 (d)

Internal problem ID [7025]
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 : 3 (d)
Date solved : Wednesday, March 05, 2025 at 04:02:44 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (0\right )&=-4 \end{align*}

Maple. Time used: 0.016 (sec). Leaf size: 29
ode:=diff(y(x),x) = 1-x*y(x); 
ic:=y(0) = -4; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {\left (i \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, x}{2}\right )+8\right ) {\mathrm e}^{-\frac {x^{2}}{2}}}{2} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 36
ode=D[y[x],x]==1-x*y[x]; 
ic={y[0]==-4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} e^{-\frac {x^2}{2}} \left (\sqrt {2 \pi } \text {erfi}\left (\frac {x}{\sqrt {2}}\right )-8\right ) \]
Sympy. Time used: 0.439 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) + Derivative(y(x), x) - 1,0) 
ics = {y(0): -4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\frac {\sqrt {2} \sqrt {\pi } \operatorname {erfi}{\left (\frac {\sqrt {2} x}{2} \right )}}{2} - 4\right ) e^{- \frac {x^{2}}{2}} \]