2.2.41 Problem 41

Solved using first_order_ode_reduced_riccati
Solved using first_order_ode_riccati
Maple
Mathematica
Sympy

Internal problem ID [9164]
Book : Second order enumerated odes
Section : section 2
Problem number : 41
Date solved : Sunday, March 30, 2025 at 02:24:33 PM
CAS classification : [[_Riccati, _special]]

Solved using first_order_ode_reduced_riccati

Time used: 0.056 (sec)

Solve

y=xy2

This is reduced Riccati ode of the form

y=axn+by2

Comparing the given ode to the above shows that

a=1b=1n=1

Since n2 then the solution of the reduced Riccati ode is given by

(1)w=x{c1BesselJ(12k,1kabxk)+c2BesselY(12k,1kabxk)ab>0c1BesselI(12k,1kabxk)+c2BesselK(12k,1kabxk)ab<0y=1bwwk=1+n2

Since ab<0 then EQ(1) gives

k=32w=x(c1BesselI(13,2x3/23)+c2BesselK(13,2x3/23))

Therefore the solution becomes

y=1bww

Substituting the value of b,w found above and simplyfing gives

y=x(BesselI(23,2x3/23)c1BesselK(23,2x3/23)c2)c1BesselI(13,2x3/23)+c2BesselK(13,2x3/23)

Letting c2=1 the above becomes

y=x(BesselI(23,2x3/23)c1BesselK(23,2x3/23))c1BesselI(13,2x3/23)+BesselK(13,2x3/23)
Figure 2.126: Slope field y=xy2

Summary of solutions found

y=x(BesselI(23,2x3/23)c1BesselK(23,2x3/23))c1BesselI(13,2x3/23)+BesselK(13,2x3/23)
Solved using first_order_ode_riccati

Time used: 0.210 (sec)

Solve

y=xy2

In canonical form the ODE is

y=F(x,y)=y2+x

This is a Riccati ODE. Comparing the ODE to solve

y=y2+x

With Riccati ODE standard form

y=f0(x)+f1(x)y+f2(x)y2

Shows that f0(x)=x, f1(x)=0 and f2(x)=1. Let

y=uf2u(1)=uu

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for u(x) which is

(2)f2u(x)(f2+f1f2)u(x)+f22f0u(x)=0

But

f2=0f1f2=0f22f0=x

Substituting the above terms back in equation (2) gives

u(x)+xu(x)=0

This is Airy ODE. It has the general form

au+bu+cxu=F(x)

Where in this case

a=1b=0c=1F=0

Therefore the solution to the homogeneous Airy ODE becomes

u=c3AiryAi(x(1)1/3)+c4AiryBi(x(1)1/3)

Will add steps showing solving for IC soon.

Taking derivative gives

u(x)=c3(1)1/3AiryAi(1,x(1)1/3)c4(1)1/3AiryBi(1,x(1)1/3)

Doing change of constants, the solution becomes

y=c5(1)1/3AiryAi(1,x(1)1/3)(1)1/3AiryBi(1,x(1)1/3)c5AiryAi(x(1)1/3)+AiryBi(x(1)1/3)

Which simplifies to

y=(1+i3)(AiryAi(1,x(1+i3)2)c5+AiryBi(1,x(1+i3)2))2c5AiryAi(x(1+i3)2)+2AiryBi(x(1+i3)2)
Figure 2.127: Slope field y=xy2

Summary of solutions found

y=(1+i3)(AiryAi(1,x(1+i3)2)c5+AiryBi(1,x(1+i3)2))2c5AiryAi(x(1+i3)2)+2AiryBi(x(1+i3)2)
Maple. Time used: 0.001 (sec). Leaf size: 23
ode:=diff(y(x),x) = x-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
y=c1AiryAi(1,x)+AiryBi(1,x)c1AiryAi(x)+AiryBi(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 Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati Special 
<- Riccati Special successful
 

Maple step by step

Let’s solveddxy(x)=xy(x)2Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=xy(x)2
Mathematica. Time used: 0.125 (sec). Leaf size: 223
ode=D[y[x],x]==x-y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)ix3/2(2BesselJ(23,23ix3/2)+c1(BesselJ(43,23ix3/2)BesselJ(23,23ix3/2)))c1BesselJ(13,23ix3/2)2x(BesselJ(13,23ix3/2)+c1BesselJ(13,23ix3/2))y(x)ix3/2BesselJ(43,23ix3/2)ix3/2BesselJ(23,23ix3/2)+BesselJ(13,23ix3/2)2xBesselJ(13,23ix3/2)
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : bad operand type for unary -: list