87.16.1 problem 1

Internal problem ID [23570]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 2. Linear differential equations. Exercise at page 119
Problem number : 1
Date solved : Thursday, October 02, 2025 at 09:43:02 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} 6 y-5 y^{\prime }+y^{\prime \prime }&=x^{2}+3 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-5*diff(y(x),x)+6*y(x) = x^2+3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{3 x} c_2 +{\mathrm e}^{2 x} c_1 +\frac {x^{2}}{6}+\frac {5 x}{18}+\frac {73}{108} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 37
ode=D[y[x],{x,2}]-5*D[y[x],x]+6*y[x]==x^2+3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^2}{6}+\frac {5 x}{18}+c_1 e^{2 x}+c_2 e^{3 x}+\frac {73}{108} \end{align*}
Sympy. Time used: 0.123 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + 6*y(x) - 5*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^{2 x} + C_{2} e^{3 x} + \frac {x^{2}}{6} + \frac {5 x}{18} + \frac {73}{108} \]