86.3.3 problem 3

Internal problem ID [23094]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 4. Linear equations of the first order. Exercise 4a at page 56
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:20:05 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=1 \\ \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 14
ode:=diff(y(x),x)-2*x*y(x) = 3*x; 
ic:=[y(1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {3}{2}+\frac {5 \,{\mathrm e}^{x^{2}} {\mathrm e}^{-1}}{2} \]
Mathematica. Time used: 0.037 (sec). Leaf size: 20
ode=D[y[x],x]-2*x*y[x]==3*x; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {5 e^{x^2-1}}{2}-\frac {3}{2} \end{align*}
Sympy. Time used: 0.198 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x) - 3*x + Derivative(y(x), x),0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {5 e^{x^{2}}}{2 e} - \frac {3}{2} \]