58.1.35 problem 35

Internal problem ID [9106]
Book : Second order enumerated odes
Section : section 1
Problem number : 35
Date solved : Wednesday, March 05, 2025 at 07:23:52 AM
CAS classification : [[_2nd_order, _missing_y]]

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

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