40.2.4 problem 27

Internal problem ID [6582]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 4. Equations of first order and first degree (Variable separable). Supplemetary problems. Page 22
Problem number : 27
Date solved : Sunday, March 30, 2025 at 11:10:27 AM
CAS classification : [_separable]

\begin{align*} 1+y-\left (1+x \right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 10
ode:=1+y(x)-(1+x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 x +c_1 -1 \]
Mathematica. Time used: 0.034 (sec). Leaf size: 18
ode=(1+y[x])-(1+x)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -1+c_1 (x+1) \\ y(x)\to -1 \\ \end{align*}
Sympy. Time used: 0.234 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x - 1)*Derivative(y(x), x) + y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x + C_{1} - 1 \]