75.3.3 problem 43

Internal problem ID [16621]
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, March 13, 2025 at 08:27:11 AM
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.011 (sec). Leaf size: 13
ode:=diff(y(x),x) = x+y(x); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -x -1+2 \,{\mathrm e}^{x} \]
Mathematica. Time used: 0.05 (sec). Leaf size: 15
ode=D[y[x],x]==x+y[x]; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x+2 e^x-1 \]
Sympy. Time used: 0.130 (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 \]