69.3.4 problem 44

Internal problem ID [17988]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 3. The method of successive approximation. Exercises page 31
Problem number : 44
Date solved : Thursday, October 02, 2025 at 02:32:23 PM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

\begin{align*} y \left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.018 (sec). Leaf size: 10
ode:=diff(y(x),x) = 2*y(x)-2*x^2-3; 
ic:=[y(0) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = x^{2}+x +2 \]
Mathematica. Time used: 0.084 (sec). Leaf size: 36
ode=D[y[x],x]==2*y[x]-2*x^2-3; 
ic={y[0]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{2 x} \left (\int _0^x-e^{-2 K[1]} \left (2 K[1]^2+3\right )dK[1]+2\right ) \end{align*}
Sympy. Time used: 0.074 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x**2 - 2*y(x) + Derivative(y(x), x) + 3,0) 
ics = {y(0): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{2} + x + 2 \]