75.17.34 problem 584

Internal problem ID [17004]
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 15.3 Nonhomogeneous linear equations with constant coefficients. Superposition principle. Exercises page 137
Problem number : 584
Date solved : Thursday, March 13, 2025 at 09:09:38 AM
CAS classification : [[_3rd_order, _missing_y]]

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

Maple. Time used: 0.003 (sec). Leaf size: 34
ode:=diff(diff(diff(y(x),x),x),x)-2*diff(diff(y(x),x),x)+diff(y(x),x) = 2*x+exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x^{2}+\left (2 c_{1} -2\right ) x -2 c_{1} +2 c_{2} +2\right ) {\mathrm e}^{x}}{2}+x^{2}+4 x +c_{3} \]
Mathematica. Time used: 21.49 (sec). Leaf size: 74
ode=D[y[x],{x,3}]-2*D[y[x],{x,2}]+D[y[x],x]==2*x+Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^xe^{K[3]} \left (c_1+c_2 K[3]+\int _1^{K[3]}K[1] \left (-2 e^{-K[1]} K[1]-1\right )dK[1]+K[3] \int _1^{K[3]}\left (2 e^{-K[2]} K[2]+1\right )dK[2]\right )dK[3]+c_3 \]
Sympy. Time used: 0.192 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x - exp(x) + Derivative(y(x), x) - 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + x^{2} + 4 x + \left (C_{2} + x \left (C_{3} + \frac {x}{2}\right )\right ) e^{x} \]