85.33.6 problem 6

Internal problem ID [22629]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 6
Date solved : Thursday, October 02, 2025 at 08:56:55 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }+2 x&=2 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=diff(y(x),x)+2*x = 2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x^{2}+c_1 +2 x \]
Mathematica. Time used: 0.002 (sec). Leaf size: 16
ode=D[y[x],x]+2*x==2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x^2+2 x+c_1 \end{align*}
Sympy. Time used: 0.062 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + Derivative(y(x), x) - 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - x^{2} + 2 x \]