2.1.1 Problem 1

Solved using first_order_ode_quadrature
Solved using first_order_ode_homog_type_D2
Maple
Mathematica
Sympy

Internal problem ID [8985]
Book : First order enumerated odes
Section : section 1
Problem number : 1
Date solved : Sunday, March 30, 2025 at 01:58:02 PM
CAS classification : [_quadrature]

Solved using first_order_ode_quadrature

Time used: 0.023 (sec)

Solve

y=0

Since the ode has the form y=f(x), then we only need to integrate f(x).

dy=0dx+c1y=c1
Figure 2.1: Slope field y=0

Summary of solutions found

y=c1
Solved using first_order_ode_homog_type_D2

Time used: 0.065 (sec)

Solve

y=0

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

u(x)x+u(x)=0

Which is now solved The ode

(1)u(x)=u(x)x

is separable as it can be written as

u(x)=u(x)x=f(x)g(u)

Where

f(x)=1xg(u)=u

Integrating gives

1g(u)du=f(x)dx1udu=1xdx
ln(u(x))=ln(1x)+c2

Taking the exponential of both sides the solution becomes

u(x)=c2x

We now need to find the singular solutions, these are found by finding for what values g(u) is zero, since we had to divide by this above. Solving g(u)=0 or

u=0

for u(x) gives

u(x)=0

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

u(x)=0u(x)=c2x

Converting u(x)=0 back to y gives

y=0

Converting u(x)=c2x back to y gives

y=c2
Figure 2.2: Slope field y=0

Summary of solutions found

y=0y=c2
Maple. Time used: 0.001 (sec). Leaf size: 5
ode:=diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=c1

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

Let’s solveddxy(x)=0Highest derivative means the order of the ODE is1ddxy(x)Integrate both sides with respect tox(ddxy(x))dx=0dx+C1Evaluate integraly(x)=C1
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)c1
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(x)=C1