75.14.21 problem 347

Internal problem ID [16856]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 14. Differential equations admitting of depression of their order. Exercises page 107
Problem number : 347
Date solved : Thursday, March 13, 2025 at 08:57:13 AM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

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

Maple. Time used: 0.007 (sec). Leaf size: 7
ode:=diff(diff(y(x),x),x)+diff(y(x),x)+2 = 0; 
ic:=y(0) = 0, D(y)(0) = -2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -2 x \]
Mathematica. Time used: 0.016 (sec). Leaf size: 8
ode=D[y[x],{x,2}]+D[y[x],x]+2==0; 
ic={y[0]==0,Derivative[1][y][0] ==-2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -2 x \]
Sympy. Time used: 0.135 (sec). Leaf size: 7
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + Derivative(y(x), (x, 2)) + 2,0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): -2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - 2 x \]