58.1.18 problem 18

Internal problem ID [9089]
Book : Second order enumerated odes
Section : section 1
Problem number : 18
Date solved : Wednesday, March 05, 2025 at 07:19:32 AM
CAS classification : [[_2nd_order, _missing_y]]

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

Maple. Time used: 0.003 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+diff(y(x),x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{2}}{2}-c_{1} {\mathrm e}^{-x}-x +c_{2} \]
Mathematica. Time used: 0.043 (sec). Leaf size: 27
ode=D[y[x],{x,2}]+D[y[x],x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^2}{2}-x-c_1 e^{-x}+c_2 \]
Sympy. Time used: 0.141 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} e^{- x} + \frac {x^{2}}{2} - x \]