72.8.17 problem 30

Internal problem ID [14702]
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. Review Exercises for chapter 1. page 136
Problem number : 30
Date solved : Thursday, March 13, 2025 at 04:15:33 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} x \left (0\right )&={\mathrm e} \end{align*}

Maple. Time used: 0.018 (sec). Leaf size: 12
ode:=diff(x(t),t) = -x(t)*t; 
ic:=x(0) = exp(1); 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x \left (t \right ) = {\mathrm e}^{1-\frac {t^{2}}{2}} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 16
ode=D[x[t],t]==-t*x[t]; 
ic={x[0]==Exp[1]}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to e^{1-\frac {t^2}{2}} \]
Sympy. Time used: 0.253 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t*x(t) + Derivative(x(t), t),0) 
ics = {x(0): E} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = e e^{- \frac {t^{2}}{2}} \]