71.1.7 problem 21

Internal problem ID [14245]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 1. Introduction. Exercises page 14
Problem number : 21
Date solved : Monday, March 31, 2025 at 12:14:00 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }-\frac {y}{x}&=1 \end{align*}

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