64.1.3 problem 1(c)

Internal problem ID [13169]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 1, Differential equations and their solutions. Exercises page 13
Problem number : 1(c)
Date solved : Wednesday, March 05, 2025 at 09:18:40 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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