2.1.1 Problem 1
Internal
problem
ID
[8985]
Book
:
First
order
enumerated
odes
Section
:
section
1
Problem
number
:
1
Date
solved
:
Wednesday, March 05, 2025 at 07:13:48 AM
CAS
classification
:
[_quadrature]
Solve
\begin{align*} y^{\prime }&=0 \end{align*}
Solved as first order quadrature ode
Time used: 0.013 (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.1: Slope field \(y^{\prime } = 0\)
Summary of solutions found
\begin{align*}
y &= c_1 \\
\end{align*}
Solved as first order homogeneous class D2 ode
Time used: 0.055 (sec)
Applying change of variables \(y = u \left (x \right ) x\) , then the ode becomes
\begin{align*} u^{\prime }\left (x \right ) x +u \left (x \right ) = 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.2: Slope field \(y^{\prime } = 0\)
Summary of solutions found
\begin{align*}
y &= c_1 \\
\end{align*}
✓ Maple. Time used: 0.000 (sec). Leaf size: 5
ode := diff ( y ( 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 {d}{d x}y \left (x \right )=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 {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.003 (sec). Leaf size: 7
ode = D [ y [ x ], x ]==0;
ic ={};
DSolve [{ ode , ic }, y [ x ], x , IncludeSingularSolutions -> True ]
\[
y(x)\to c_1
\]
✓ Sympy. Time used: 0.028 (sec). Leaf size: 3
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(Derivative(y(x), x),0)
ics = {}
dsolve ( ode , func = y ( x ), ics = ics )
\[
y{\left (x \right )} = C_{1}
\]