32.2.42 problem 43

Internal problem ID [7759]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Further problems 24. page 1068
Problem number : 43
Date solved : Tuesday, September 30, 2025 at 05:04:57 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=0 \\ \end{align*}
Maple. Time used: 0.060 (sec). Leaf size: 14
ode:=diff(y(x),x)+x+x*y(x)^2 = 0; 
ic:=[y(1) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\tan \left (\frac {x^{2}}{2}-\frac {1}{2}\right ) \]
Mathematica
ode=D[y[x],x]+x+x*y[x]^2==0; 
ic={y[1]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

{}

Sympy. Time used: 0.197 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)**2 + x + Derivative(y(x), x),0) 
ics = {y(1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \tan {\left (\frac {x^{2}}{2} - \frac {1}{2} \right )} \]