72.7.17 problem 17

Internal problem ID [14687]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Exercises section 1.9 page 133
Problem number : 17
Date solved : Monday, March 31, 2025 at 12:53:01 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=-y \,{\mathrm e}^{-t^{2}}+\cos \left (t \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 28
ode:=diff(y(t),t) = -y(t)/exp(t^2)+cos(t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \left (\int \cos \left (t \right ) {\mathrm e}^{\frac {\sqrt {\pi }\, \operatorname {erf}\left (t \right )}{2}}d t +c_1 \right ) {\mathrm e}^{-\frac {\sqrt {\pi }\, \operatorname {erf}\left (t \right )}{2}} \]
Mathematica. Time used: 0.129 (sec). Leaf size: 47
ode=D[y[t],t]==-y[t]/Exp[t^2]+Cos[t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-\frac {1}{2} \sqrt {\pi } \text {erf}(t)} \left (\int _1^te^{\frac {1}{2} \sqrt {\pi } \text {erf}(K[1])} \cos (K[1])dK[1]+c_1\right ) \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(y(t)*exp(-t**2) - cos(t) + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
Timed Out