69.1.108 problem 155

Internal problem ID [14182]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 155
Date solved : Wednesday, March 05, 2025 at 10:37:45 PM
CAS classification : [[_2nd_order, _missing_y]]

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

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