2.2.11 Problem 12

Solved as second nonlinear ode solved by Mainardi Lioville method
Maple
Mathematica
Sympy

Internal problem ID [9134]
Book : Second order enumerated odes
Section : section 2
Problem number : 12
Date solved : Sunday, March 30, 2025 at 02:23:04 PM
CAS classification : [_Liouville, [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_xy]]

Solved as second nonlinear ode solved by Mainardi Lioville method

Time used: 0.440 (sec)

Solve

3y+cos(x)y+sin(y)y2=0

The ode has the Liouville form given by

(1A)y+f(x)y+g(y)y2=0

Where in this problem

f(x)=cos(x)3g(y)=sin(y)3

Dividing through by y then Eq (1A) becomes

(2A)yy+f+gy=0

But the first term in Eq (2A) can be written as

(3A)yy=ddxln(y)

And the last term in Eq (2A) can be written as

gdydx=(ddygdy)dydx(4A)=ddxgdy

Substituting (3A,4A) back into (2A) gives

(5A)ddxln(y)+ddxgdy=f

Integrating the above w.r.t. x gives

ln(y)+gdy=fdx+c1

Where c1 is arbitrary constant. Taking the exponential of the above gives

(6A)y=c2egdyefdx

Where c2 is a new arbitrary constant. But since g=sin(y)3 and f=cos(x)3, then

gdy=sin(y)3dy=cos(y)3fdx=cos(x)3dx=sin(x)3

Substituting the above into Eq(6A) gives

y=c2ecos(y)3esin(x)3

Which is now solved as first order separable ode. The ode

(1)y=c2ecos(y)3esin(x)3

is separable as it can be written as

y=c2ecos(y)3esin(x)3=f(x)g(y)

Where

f(x)=esin(x)3c2g(y)=ecos(y)3

Integrating gives

1g(y)dy=f(x)dxecos(y)3dy=esin(x)3c2dx
yecos(τ)3dτ=esin(x)3c2dx+2c3

Will add steps showing solving for IC soon.

Summary of solutions found

yecos(τ)3dτ=esin(x)3c2dx+2c3

Maple. Time used: 0.004 (sec). Leaf size: 27
ode:=3*diff(diff(y(x),x),x)+cos(x)*diff(y(x),x)+sin(y(x))*diff(y(x),x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
yecos(_a)3d_ac1esin(x)3dxc2=0

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
<- 2nd_order Liouville successful
 

Mathematica. Time used: 1.388 (sec). Leaf size: 67
ode=3*D[y[x],{x,2}]+Cos[x]*D[y[x],x]+Sin[y[x]]*(D[y[x],x])^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)InverseFunction[1#1exp(1K[3]13sin(K[1])dK[1])dK[3]&][1xexp(1K[4]13cos(K[2])dK[2])c1dK[4]+c2]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(y(x))*Derivative(y(x), x)**2 + cos(x)*Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ZeroDivisionError : polynomial division