7.4.29 problem 29

Internal problem ID [101]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.5 (linear equations). Problems at page 54
Problem number : 29
Date solved : Saturday, March 29, 2025 at 04:31:26 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 20
ode:=diff(y(x),x) = 1+2*x*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\sqrt {\pi }\, \operatorname {erf}\left (x \right )+2 c_1 \right ) {\mathrm e}^{x^{2}}}{2} \]
Mathematica. Time used: 0.048 (sec). Leaf size: 27
ode=D[y[x],x]==1+2*x*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} e^{x^2} \left (\sqrt {\pi } \text {erf}(x)+2 c_1\right ) \]
Sympy. Time used: 0.316 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \frac {\sqrt {\pi } \operatorname {erf}{\left (x \right )}}{2}\right ) e^{x^{2}} \]