71.11.4 problem 4

Internal problem ID [14434]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 4. N-th Order Linear Differential Equations. Exercises 4.4, page 218
Problem number : 4
Date solved : Saturday, February 22, 2025 at 03:48:30 PM
CAS classification : [[_high_order, _missing_y]]

\begin{align*} y^{\prime \prime \prime \prime }-3 y^{\prime \prime \prime }+3 y^{\prime \prime }-y^{\prime }&=6 x -20-120 x^{2} {\mathrm e}^{x} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 56
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-3*diff(diff(diff(y(x),x),x),x)+3*diff(diff(y(x),x),x)-diff(y(x),x) = 6*x-20-120*x^2*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-2 x^{5}+10 x^{4}-40 x^{3}+\left (c_{3} +120\right ) x^{2}+\left (c_{2} -2 c_{3} -240\right ) x +c_{1} -c_{2} +2 c_{3} +240\right ) {\mathrm e}^{x}-3 x^{2}+2 x +c_4 \]
Mathematica. Time used: 0.441 (sec). Leaf size: 144
ode=D[y[x],{x,4}]-3*D[y[x],{x,3}]+3*D[y[x],{x,2}]-D[y[x],x]==6*x-20-120*x^2*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^xe^{K[4]} \left (c_3 K[4]^2+\int _1^{K[4]}e^{-K[3]} \left (-60 e^{K[3]} K[3]^2+3 K[3]-10\right )dK[3] K[4]^2+c_2 K[4]+\int _1^{K[4]}2 e^{-K[2]} K[2] \left (60 e^{K[2]} K[2]^2-3 K[2]+10\right )dK[2] K[4]+c_1+\int _1^{K[4]}-e^{-K[1]} K[1]^2 \left (60 e^{K[1]} K[1]^2-3 K[1]+10\right )dK[1]\right )dK[4]+c_4 \]
Sympy. Time used: 0.344 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(120*x**2*exp(x) - 6*x - Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)) - 3*Derivative(y(x), (x, 3)) + Derivative(y(x), (x, 4)) + 20,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - 3 x^{2} + 2 x + \left (C_{2} + x \left (C_{3} + x \left (C_{4} - 2 x^{3} + 10 x^{2} - 40 x\right )\right )\right ) e^{x} \]