2.1.16 Problem 16

Solved using first_order_ode_exact
Solved using first_order_ode_isobaric
Solved using first_order_ode_LIE
Maple
Mathematica
Sympy

Internal problem ID [8727]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 16
Date solved : Friday, April 25, 2025 at 04:58:11 PM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

Solved using first_order_ode_exact

Time used: 0.236 (sec)

Solve

y=xy14x3y2x2

To solve an ode of the form

(A)M(x,y)+N(x,y)dydx=0

We assume there exists a function ϕ(x,y)=c where c is constant, that satisfies the ode. Taking derivative of ϕ w.r.t. x gives

ddxϕ(x,y)=0

Hence

(B)ϕx+ϕydydx=0

Comparing (A,B) shows that

ϕx=Mϕy=N

But since 2ϕxy=2ϕyx then for the above to be valid, we require that

My=Nx

If the above condition is satisfied, then the original ode is called exact. We still need to determine ϕ(x,y) but at least we know now that we can do that since the condition 2ϕxy=2ϕyx is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is

(1A)M(x,y)dx+N(x,y)dy=0

Therefore

dy=(xy14yx32x2)dx(2A)(xy14yx32x2)dx+dy=0

Comparing (1A) and (2A) shows that

M(x,y)=xy14yx32x2N(x,y)=1

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied

My=Nx

Using result found above gives

My=y(xy14yx32x2)=32x(2xy1)2

And

Nx=x(1)=0

Since MyNx, then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let

A=1N(MyNx)=1((x4yx32x2+4(xy1)x3(4yx32x2)2)(0))=32x(2xy1)2

Since A depends on y, it can not be used to obtain an integrating factor. We will now try a second method to find an integrating factor. Let

B=1M(NxMy)=4yx32x2xy+1((0)(x4yx32x2+4(xy1)x3(4yx32x2)2))=3x2x2y2+xy1

Since B depends on x, it can not be used to obtain an integrating factor.We will now try a third method to find an integrating factor. Let

R=NxMyxMyN

R is now checked to see if it is a function of only t=xy. Therefore

R=NxMyxMyN=(0)(x4yx32x2+4(xy1)x3(4yx32x2)2)x(xy14yx32x2)y(1)=38x3y310x2y2+xy+1

Replacing all powers of terms xy by t gives

R=38t310t2+t+1

Since R depends on t only, then it can be used to find an integrating factor. Let the integrating factor be μ then

μ=eRdt=e(38t310t2+t+1)dt

The result of integrating gives

μ=e2ln(4t+1)5+ln(2t1)3ln(t1)5=2t1(4t+1)2/5(t1)3/5

Now t is replaced back with xy giving

μ=2xy1(4xy+1)2/5(xy1)3/5

Multiplying M and N by this integrating factor gives new M and new N which are called M and N so not to confuse them with the original M and N

M=μM=2xy1(4xy+1)2/5(xy1)3/5(xy14yx32x2)=xy+12(xy1)3/5(4xy+1)2/5x2

And

N=μN=2xy1(4xy+1)2/5(xy1)3/5(1)=2xy1(4xy+1)2/5(xy1)3/5

A modified ODE is now obtained from the original ODE, which is exact and can solved. The modified ODE is

M+Ndydx=0(xy+12(xy1)3/5(4xy+1)2/5x2)+(2xy1(4xy+1)2/5(xy1)3/5)dydx=0

The following equations are now set up to solve for the function ϕ(x,y)

(1)ϕx=M(2)ϕy=N

Integrating (1) w.r.t. x gives

ϕxdx=Mdxϕxdx=xy+12(xy1)3/5(4xy+1)2/5x2dx(3)ϕ=(xy1)2/5(4xy+1)3/52x+f(y)

Where f(y) is used for the constant of integration since ϕ is a function of both x and y. Taking derivative of equation (3) w.r.t y gives

(4)ϕy=(4xy+1)3/55(xy1)3/5+6(xy1)2/55(4xy+1)2/5+f(y)=2xy1(4xy+1)2/5(xy1)3/5+f(y)

But equation (2) says that ϕy=2xy1(4xy+1)2/5(xy1)3/5. Therefore equation (4) becomes

(5)2xy1(4xy+1)2/5(xy1)3/5=2xy1(4xy+1)2/5(xy1)3/5+f(y)

Solving equation (5) for f(y) gives

f(y)=0

Therefore

f(y)=c1

Where c1 is constant of integration. Substituting this result for f(y) into equation (3) gives ϕ

ϕ=(xy1)2/5(4xy+1)3/52x+c1

But since ϕ itself is a constant function, then let ϕ=c2 where c2 is new constant and combining c1 and c2 constants into the constant c1 gives the solution as

c1=(xy1)2/5(4xy+1)3/52x
Figure 2.38: Slope field y=xy14x3y2x2

Summary of solutions found

(xy1)2/5(4xy+1)3/52x=c1
Solved using first_order_ode_isobaric

Time used: 0.152 (sec)

Solve

y=xy14x3y2x2

Solving for y gives

(1)y=xy+12x2(2xy1)

Each of the above ode’s is now solved An ode y=f(x,y) is isobaric if

(1)f(tx,tmy)=tm1f(x,y)

Where here

(2)f(x,y)=xy+12x2(2xy1)

m is the order of isobaric. Substituting (2) into (1) and solving for m gives

m=1

Since the ode is isobaric of order m=1, then the substitution

y=uxm=ux

Converts the ODE to a separable in u(x). Performing this substitution gives

u(x)x2+u(x)x=u(x)+12x2(2u(x)1)

The ode

(1)u(x)=4u(x)23u(x)12x(2u(x)1)

is separable as it can be written as

u(x)=4u(x)23u(x)12x(2u(x)1)=f(x)g(u)

Where

f(x)=12xg(u)=4u23u12u1

Integrating gives

1g(u)du=f(x)dx2u14u23u1du=12xdx
ln((4u(x)+1)3/10(u(x)1)1/5)=ln(x)+c3

Taking the exponential of both sides the solution becomes

(4u(x)+1)3/10(u(x)1)1/5=c3x

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

4u23u12u1=0

for u(x) gives

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

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

(4u(x)+1)3/10(u(x)1)1/5=c3xu(x)=1u(x)=14

Converting (4u(x)+1)3/10(u(x)1)1/5=c3x back to y gives

(4xy+1)3/10(xy1)1/5=c3x

Converting u(x)=1 back to y gives

xy=1

Converting u(x)=14 back to y gives

xy=14

Solving for y gives

(4xy+1)3/10(xy1)1/5=c3xy=1xy=14x
Figure 2.39: Slope field y=xy14x3y2x2

Summary of solutions found

(4xy+1)3/10(xy1)1/5=c3xy=1xy=14x
Solved using first_order_ode_LIE

Time used: 0.551 (sec)

Solve

y=xy14x3y2x2

Writing the ode as

y=xy+12x2(2xy1)y=ω(x,y)

The condition of Lie symmetry is the linearized PDE given by

(A)ηx+ω(ηyξx)ω2ξyωxξωyη=0

To determine ξ,η then (A) is solved using ansatz. Making bivariate polynomials of degree 1 to use as anstaz gives

(1E)ξ=xa2+ya3+a1(2E)η=xb2+yb3+b1

Where the unknown coefficients are

{a1,a2,a3,b1,b2,b3}

Substituting equations (1E,2E) and ω into (A) gives

(5E)b2(xy+1)(b3a2)2x2(2xy1)(xy+1)2a34x4(2xy1)2(y2x2(2xy1)+xy+1x3(2xy1)+(xy+1)yx2(2xy1)2)(xa2+ya3+a1)(12x(2xy1)+xy+1x(2xy1)2)(xb2+yb3+b1)=0

Putting the above in normal form gives

16x6y2b216x5yb24x4y2a24x4y2b38x3y3a38x3y2a12b2x48x3ya28x3yb311x2y2a36x3b110x2ya1+2x2a2+2x2b3+2xya3+4xa1a34x4(2xy1)2=0

Setting the numerator to zero gives

(6E)16x6y2b216x5yb24x4y2a24x4y2b38x3y3a38x3y2a12b2x48x3ya28x3yb311x2y2a36x3b110x2ya1+2x2a2+2x2b3+2xya3+4xa1a3=0

Looking at the above PDE shows the following are all the terms with {x,y} in them.

{x,y}

The following substitution is now made to be able to collect on all terms with {x,y} in them

{x=v1,y=v2}

The above PDE (6E) now becomes

(7E)16b2v16v224a2v14v228a3v13v2316b2v15v24b3v14v228a1v13v228a2v13v211a3v12v222b2v148b3v13v210a1v12v26b1v13+2a2v12+2a3v1v2+2b3v12+4a1v1a3=0

Collecting the above on the terms vi introduced, and these are

{v1,v2}

Equation (7E) now becomes

(8E)16b2v16v2216b2v15v2+(4a24b3)v14v222b2v148a3v13v238a1v13v22+(8a28b3)v13v26b1v1311a3v12v2210a1v12v2+(2a2+2b3)v12+2a3v1v2+4a1v1a3=0

Setting each coefficients in (8E) to zero gives the following equations to solve

10a1=08a1=04a1=011a3=08a3=0a3=02a3=06b1=016b2=02b2=016b2=08a28b3=04a24b3=02a2+2b3=0

Solving the above equations for the unknowns gives

a1=0a2=b3a3=0b1=0b2=0b3=b3

Substituting the above solution in the anstaz (1E,2E) (using 1 as arbitrary value for any unknown in the RHS) gives

ξ=xη=y

Shifting is now applied to make ξ=0 in order to simplify the rest of the computation

η=ηω(x,y)ξ=y(xy+12x2(2xy1))(x)=4x2y23xy14x2y2xξ=0

The next step is to determine the canonical coordinates R,S. The canonical coordinates map (x,y)(R,S) where (R,S) are the canonical coordinates which make the original ode become a quadrature and hence solved by integration.

The characteristic pde which is used to find the canonical coordinates is

(1)dxξ=dyη=dS

The above comes from the requirements that (ξx+ηy)S(x,y)=1. Starting with the first pair of ode’s in (1) gives an ode to solve for the independent variable R in the canonical coordinates, where S(R). Since ξ=0 then in this special case

R=x

S is found from

S=1ηdy=14x2y23xy14x2y2xdy

Which results in

S=3ln(4xy+1)5+2ln(xy1)5

Now that R,S are found, we need to setup the ode in these coordinates. This is done by evaluating

(2)dSdR=Sx+ω(x,y)SyRx+ω(x,y)Ry

Where in the above Rx,Ry,Sx,Sy are all partial derivatives and ω(x,y) is the right hand side of the original ode given by

ω(x,y)=xy+12x2(2xy1)

Evaluating all the partial derivatives gives

Rx=1Ry=0Sx=4xy22y4x2y23xy1Sy=4x2y2x4x2y23xy1

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates.

(2A)dSdR=1x

We now need to express the RHS as function of R only. This is done by solving for x,y in terms of R,S from the result obtained earlier and simplifying. This gives

dSdR=1R

The above is a quadrature ode. This is the whole point of Lie symmetry method. It converts an ode, no matter how complicated it is, to one that can be solved by integration when the ode is in the canonical coordiates R,S.

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

dS=1RdRS(R)=ln(R)+c5

To complete the solution, we just need to transform the above back to x,y coordinates. This results in

3ln(4xy+1)5+2ln(xy1)5=ln(x)+c5

The following diagram shows solution curves of the original ode and how they transform in the canonical coordinates space using the mapping shown.

Original ode in x,y coordinates

Canonical coordinates transformation

ODE in canonical coordinates (R,S)

dydx=xy+12x2(2xy1)

dSdR=1R

R=xS=3ln(4xy+1)5+2ln(xy1)5

Figure 2.40: Slope field y=xy14x3y2x2

Summary of solutions found

3ln(4xy+1)5+2ln(xy1)5=ln(x)+c5
Maple. Time used: 0.210 (sec). Leaf size: 37
ode:=diff(y(x),x) = (-x*y(x)-1)/(4*x^3*y(x)-2*x^2); 
dsolve(ode,y(x), singsol=all);
 
y=RootOf(c1_Z2510c1_Z20+25c1_Z1516x5)514x

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 G 
<- homogeneous successful
 

Maple step by step

Let’s solveddxy(x)=xy(x)14x3y(x)2x2Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=xy(x)14x3y(x)2x2
Mathematica. Time used: 14.178 (sec). Leaf size: 391
ode=D[y[x],x] == (-x*y[x]-1)/(4*x^3*y[x]-2*x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)Root[64#15c15x580#14c15x420#13c15x3+25#12c15x2+10#1c15xx5+c15&,1]y(x)Root[64#15c15x580#14c15x420#13c15x3+25#12c15x2+10#1c15xx5+c15&,2]y(x)Root[64#15c15x580#14c15x420#13c15x3+25#12c15x2+10#1c15xx5+c15&,3]y(x)Root[64#15c15x580#14c15x420#13c15x3+25#12c15x2+10#1c15xx5+c15&,4]y(x)Root[64#15c15x580#14c15x420#13c15x3+25#12c15x2+10#1c15xx5+c15&,5]
Sympy. Time used: 0.577 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*y(x) + 1)/(4*x**3*y(x) - 2*x**2) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
log(x)+2log(xy(x)1)5+3log(xy(x)+14)5=C1