2.1.24 Problem 24

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

Internal problem ID [9008]
Book : First order enumerated odes
Section : section 1
Problem number : 24
Date solved : Wednesday, March 05, 2025 at 07:14:27 AM
CAS classification : [_quadrature]

Solve

asin(x)yxy=0

Factoring the ode gives these factors

(1)y=0(2)y=0

Now each of the above equations is solved in turn.

Solving equation (1)

Solving for y from

y=0

Solving gives y=0

Solving equation (2)

Solved as first order quadrature ode

Time used: 0.013 (sec)

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

dy=0dx+c1y=c1
Figure 2.19: Slope field asin(x)yxy=0

Summary of solutions found

y=c1
Solved as first order homogeneous class D2 ode

Time used: 0.091 (sec)

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

asin(x)u(x)x2(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)+c1

Taking the exponential of both sides the solution becomes

u(x)=c1x

Converting u(x)=c1x back to y gives

y=c1
Figure 2.20: Slope field asin(x)yxy=0

Summary of solutions found

y=c1
Maple. Time used: 0.002 (sec). Leaf size: 9
ode:=a*sin(x)*y(x)*x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=0y=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 solveasin(x)y(x)x(ddxy(x))=0Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=0Integrate both sides with respect tox(ddxy(x))dx=0dx+C1Evaluate integraly(x)=C1Solve fory(x)y(x)=C1
Mathematica. Time used: 0.005 (sec). Leaf size: 12
ode=a*Sin[x]*y[x]*x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)0y(x)c1
Sympy. Time used: 0.133 (sec). Leaf size: 3
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a*x*y(x)*sin(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1