8.6.15 problem 15

Internal problem ID [785]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Chapter 1 review problems. Page 78
Problem number : 15
Date solved : Saturday, March 29, 2025 at 10:25:04 PM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=3*y(x)+diff(y(x),x) = 3*x^2/exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x^{3}+c_1 \right ) {\mathrm e}^{-3 x} \]
Mathematica. Time used: 0.068 (sec). Leaf size: 17
ode=3*y[x]+D[y[x],x] == 3*x^2/Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-3 x} \left (x^3+c_1\right ) \]
Sympy. Time used: 0.166 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x**2*exp(-3*x) + 3*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x^{3}\right ) e^{- 3 x} \]