1.1.4 problem 4

Internal problem ID [4]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.2. Problems at page 17
Problem number : 4
Date solved : Tuesday, September 30, 2025 at 03:38:07 AM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (1\right )&=5 \\ \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 11
ode:=diff(y(x),x) = 1/x^2; 
ic:=[y(1) = 5]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {1}{x}+6 \]
Mathematica. Time used: 0.002 (sec). Leaf size: 12
ode=D[y[x],x]==1/x^2; 
ic={y[1]==5}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 6-\frac {1}{x} \end{align*}
Sympy. Time used: 0.130 (sec). Leaf size: 7
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1/x**2,0) 
ics = {y(1): 5} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 6 - \frac {1}{x} \]