69.16.2 problem 475

Internal problem ID [18262]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Trial and error method. Exercises page 132
Problem number : 475
Date solved : Thursday, October 02, 2025 at 03:09:53 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} y^{\prime \prime }-7 y^{\prime }&=\left (x -1\right )^{2} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-7*diff(y(x),x) = (x-1)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {6 x^{2}}{49}-\frac {x^{3}}{21}+\frac {{\mathrm e}^{7 x} c_1}{7}-\frac {37 x}{343}+c_2 \]
Mathematica. Time used: 0.395 (sec). Leaf size: 70
ode=D[y[x],{x,2}]-7*D[y[x],x]==(x-1)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \int _1^x\left (e^{7 K[1]} c_1+\frac {1}{343} \left (-49 K[1]^2+84 K[1]-37\right )\right )dK[1]+c_2\\ y(x)&\to -\frac {x^3}{21}+\frac {6 x^2}{49}-\frac {37 x}{343}+\frac {34}{1029}+c_2 \end{align*}
Sympy. Time used: 0.106 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x - 1)**2 - 7*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} e^{7 x} - \frac {x^{3}}{21} + \frac {6 x^{2}}{49} - \frac {37 x}{343} \]