65.1.4 problem 5.1 (iv)

Internal problem ID [13628]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 5, Trivial differential equations. Exercises page 33
Problem number : 5.1 (iv)
Date solved : Wednesday, March 05, 2025 at 10:05:34 PM
CAS classification : [_quadrature]

\begin{align*} z^{\prime }&=x \,{\mathrm e}^{-2 x} \end{align*}

Maple. Time used: 0.000 (sec). Leaf size: 17
ode:=diff(z(x),x) = x*exp(-2*x); 
dsolve(ode,z(x), singsol=all);
 
\[ z = \frac {\left (-2 x -1\right ) {\mathrm e}^{-2 x}}{4}+c_{1} \]
Mathematica. Time used: 0.01 (sec). Leaf size: 24
ode=D[z[x],x]==x*Exp[-2*x]; 
ic={}; 
DSolve[{ode,ic},z[x],x,IncludeSingularSolutions->True]
 
\[ z(x)\to \int _1^xe^{-2 K[1]} K[1]dK[1]+c_1 \]
Sympy. Time used: 0.158 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
z = Function("z") 
ode = Eq(-x*exp(-2*x) + Derivative(z(x), x),0) 
ics = {} 
dsolve(ode,func=z(x),ics=ics)
 
\[ z{\left (x \right )} = C_{1} - \frac {x e^{- 2 x}}{2} - \frac {e^{- 2 x}}{4} \]