19.1.5 problem 5

Internal problem ID [3519]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.4, page 36
Problem number : 5
Date solved : Sunday, March 30, 2025 at 01:45:40 AM
CAS classification : [_separable]

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

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