69.3.3 problem 43

Internal problem ID [17987]
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 : 43
Date solved : Thursday, October 02, 2025 at 02:32:23 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }&=x +y \end{align*}

With initial conditions

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