8.1.1 problem 1

Internal problem ID [651]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.2. Integrals as general and particular solutions. Page 16
Problem number : 1
Date solved : Saturday, March 29, 2025 at 10:11:11 PM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (0\right )&=3 \end{align*}

Maple. Time used: 0.023 (sec). Leaf size: 10
ode:=diff(y(x),x) = 1+2*x; 
ic:=y(0) = 3; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = x^{2}+x +3 \]
Mathematica. Time used: 0.003 (sec). Leaf size: 11
ode=D[y[x],x]==1+2*x; 
ic=y[0]==3; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^2+x+3 \]
Sympy. Time used: 0.109 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + Derivative(y(x), x) - 1,0) 
ics = {y(0): 3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{2} + x + 3 \]