69.1.136 problem 195

Internal problem ID [14218]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 195
Date solved : Monday, March 31, 2025 at 12:13:01 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\frac {y}{x}&={\mathrm e}^{x} \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=1 \end{align*}

Maple. Time used: 0.021 (sec). Leaf size: 16
ode:=diff(y(x),x)+y(x)/x = exp(x); 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\left (x -1\right ) {\mathrm e}^{x}+1}{x} \]
Mathematica. Time used: 0.067 (sec). Leaf size: 18
ode=D[y[x],x]+1/x*y[x]==Exp[x]; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^x (x-1)+1}{x} \]
Sympy. Time used: 0.199 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-exp(x) + Derivative(y(x), x) + y(x)/x,0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{x} - \frac {e^{x}}{x} + \frac {1}{x} \]