88.20.7 problem 7

Internal problem ID [24145]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 5. Special Techniques for Linear Equations. Exercises at page 146
Problem number : 7
Date solved : Thursday, October 02, 2025 at 10:00:12 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }-2 y&=x^{2}+4 x +3 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 35
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)-2*y(x) = x^2+4*x+3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\left (\sqrt {3}-1\right ) x} c_2 +{\mathrm e}^{-\left (1+\sqrt {3}\right ) x} c_1 -\frac {x^{2}}{2}-3 x -5 \]
Mathematica. Time used: 0.012 (sec). Leaf size: 46
ode=D[y[x],{x,2}]+2*D[y[x],x]-2*y[x]==3+4*x+x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {x^2}{2}-3 x+c_1 e^{-\left (\left (1+\sqrt {3}\right ) x\right )}+c_2 e^{\left (\sqrt {3}-1\right ) x}-5 \end{align*}
Sympy. Time used: 0.137 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - 4*x - 2*y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x \left (-1 + \sqrt {3}\right )} + C_{2} e^{- x \left (1 + \sqrt {3}\right )} - \frac {x^{2}}{2} - 3 x - 5 \]