2.1.27 Problem 28

Solved as first order quadrature ode
Solved as first order homogeneous class D2 ode
Maple
Mathematica
Sympy

Internal problem ID [8739]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 28
Date solved : Wednesday, March 05, 2025 at 06:43:29 AM
CAS classification : [_quadrature]

Solve

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

Solved as first order quadrature ode

Time used: 0.014 (sec)

Since the ode has the form \(y^{\prime }=f(x)\), then we only need to integrate \(f(x)\).

\begin{align*} \int {dy} &= \int {0\, dx} + c_1 \\ y &= c_1 \end{align*}
Figure 2.60: Slope field \(\frac {y^{\prime }}{x} = 0\)

Summary of solutions found

\begin{align*} y &= c_1 \\ \end{align*}
Solved as first order homogeneous class D2 ode

Time used: 0.058 (sec)

Applying change of variables \(y = u \left (x \right ) x\), then the ode becomes

\begin{align*} \frac {u^{\prime }\left (x \right ) x +u \left (x \right )}{x} = 0 \end{align*}

Which is now solved The ode

\begin{equation} u^{\prime }\left (x \right ) = -\frac {u \left (x \right )}{x} \end{equation}

is separable as it can be written as

\begin{align*} u^{\prime }\left (x \right )&= -\frac {u \left (x \right )}{x}\\ &= f(x) g(u) \end{align*}

Where

\begin{align*} f(x) &= -\frac {1}{x}\\ g(u) &= u \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(u)} \,du} &= \int { f(x) \,dx} \\ \int { \frac {1}{u}\,du} &= \int { -\frac {1}{x} \,dx} \\ \end{align*}
\[ \ln \left (u \left (x \right )\right )=\ln \left (\frac {1}{x}\right )+c_1 \]

Taking the exponential of both sides the solution becomes

\[ u \left (x \right ) = \frac {c_1}{x} \]

Converting \(u \left (x \right ) = \frac {c_1}{x}\) back to \(y\) gives

\begin{align*} y = c_1 \end{align*}
Figure 2.61: Slope field \(\frac {y^{\prime }}{x} = 0\)

Summary of solutions found

\begin{align*} y &= c_1 \\ \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 5
ode:=diff(y(x),x)/x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_{1} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d x}y \left (x \right )}{x}=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=0 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}y \left (x \right )\right )d x =\int 0d x +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & y \left (x \right )=\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\mathit {C1} \end {array} \]
Mathematica. Time used: 0.002 (sec). Leaf size: 7
ode=1/x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 \]
Sympy. Time used: 0.030 (sec). Leaf size: 3
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \]