2.3.29 Problem 29

Solved using first_order_ode_homog_type_D
Solved using first_order_ode_homog_type_D2
Maple
Mathematica
Sympy

Internal problem ID [8886]
Book : Own collection of miscellaneous problems
Section : section 3.0
Problem number : 29
Date solved : Friday, April 25, 2025 at 05:22:10 PM
CAS classification : [[_homogeneous, `class D`]]

Solved using first_order_ode_homog_type_D

Time used: 0.193 (sec)

Solve

y=2x2sin(yx)2+yx

The ode

(1)u(x)=2xsin(u(x))2

is separable as it can be written as

u(x)=2xsin(u(x))2=f(x)g(u)

Where

f(x)=2xg(u)=sin(u)2

Integrating gives

1g(u)du=f(x)dx1sin(u)2du=2xdx
cot(u(x))=x2+c1

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

sin(u)2=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

cot(u(x))=x2+c1u(x)=0

s0Converting cot(u(x))=x2+c1 back to y gives

cot(yx)=x2+c1

Converting u(x)=0 back to y gives

y=0

Solving for y gives

y=0y=(π+arccot(x2+c1))x
Figure 2.182: Slope field y=2x2sin(yx)2+yx

Summary of solutions found

y=0y=(π+arccot(x2+c1))x
Solved using first_order_ode_homog_type_D2

Time used: 0.139 (sec)

Solve

y=2x2sin(yx)2+yx

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

u(x)x+u(x)=2x2sin(u(x))2+u(x)

Which is now solved The ode

(2)u(x)=2xsin(u(x))2

is separable as it can be written as

u(x)=2xsin(u(x))2=f(x)g(u)

Where

f(x)=2xg(u)=sin(u)2

Integrating gives

1g(u)du=f(x)dx1sin(u)2du=2xdx
cot(u(x))=x2+c2

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

sin(u)2=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

cot(u(x))=x2+c2u(x)=0

Converting cot(u(x))=x2+c2 back to y gives

cot(yx)=x2+c2

Converting u(x)=0 back to y gives

y=0

Solving for y gives

y=0y=(πarccot(x2+c2))x
Figure 2.183: Slope field y=2x2sin(yx)2+yx

Summary of solutions found

y=0y=(πarccot(x2+c2))x
Maple. Time used: 0.004 (sec). Leaf size: 18
ode:=diff(y(x),x) = 2*x^2*sin(y(x)/x)^2+y(x)/x; 
dsolve(ode,y(x), singsol=all);
 
y=(π2+arctan(x2+2c1))x

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying homogeneous D 
<- homogeneous successful
 

Maple step by step

Let’s solveddxy(x)=2x2sin(y(x)x)2+y(x)xHighest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=2x2sin(y(x)x)2+y(x)x
Mathematica. Time used: 0.339 (sec). Leaf size: 22
ode=D[y[x],x]== 2*x^2 * Sin[y[x]/x]^2 + y[x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)xcot1(x22c1)y(x)0
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**2*sin(y(x)/x)**2 + Derivative(y(x), x) - y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (2*x**3*sin(y(x)/x)**2 + y(x))/x cannot be solved by the factorable group method