2.3.5 Problem 5

Solved using first_order_ode_homog_A
Solved using first_order_ode_homog_type_D2
Solved using first_order_ode_homog_type_maple_C
Solved using first_order_ode_isobaric
Solved using first_order_ode_LIE
Maple
Mathematica
Sympy

Internal problem ID [18471]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter IV. Methods of solution: First order equations. section 29. Problems at page 81
Problem number : 5
Date solved : Saturday, April 26, 2025 at 11:21:40 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

Solved using first_order_ode_homog_A

Time used: 0.361 (sec)

Solve

x+yy=my

In canonical form, the ODE is

y=F(x,y)(1)=myxy

An ode of the form y=M(x,y)N(x,y) is called homogeneous if the functions M(x,y) and N(x,y) are both homogeneous functions and of the same order. Recall that a function f(x,y) is homogeneous of order n if

f(tnx,tny)=tnf(x,y)

In this case, it can be seen that both M=myx and N=y are both homogeneous and of the same order n=1. Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution u=yx, or y=ux. Hence

dydx=dudxx+u

Applying the transformation y=ux to the above ODE in (1) gives

dudxx+u=m1ududx=m1u(x)u(x)x

Or

u(x)m1u(x)u(x)x=0

Or

u(x)u(x)x+u(x)2mu(x)+1=0

Which is now solved as separable in u(x).

The ode

(1)u(x)=u(x)2mu(x)+1u(x)x

is separable as it can be written as

u(x)=u(x)2mu(x)+1u(x)x=f(x)g(u)

Where

f(x)=1xg(u)=mu+u2+1u

Integrating gives

1g(u)du=f(x)dxumu+u2+1du=1xdx
ln(u(x)2mu(x)+1)2+marctanh(m2u(x)m24)m24=ln(1x)+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

mu+u2+1u=0

for u(x) gives

u(x)=m2m242u(x)=m2+m242

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

ln(u(x)2mu(x)+1)2+marctanh(m2u(x)m24)m24=ln(1x)+c1u(x)=m2m242u(x)=m2+m242

Converting ln(u(x)2mu(x)+1)2+marctanh(m2u(x)m24)m24=ln(1x)+c1 back to y gives

arctanh(mx2yx(m2)(m+2))m(m2)(m+2)+ln(myx+y2+x2x2)2=ln(1x)+c1

Converting u(x)=m2m242 back to y gives

y=x(m2m242)

Converting u(x)=m2+m242 back to y gives

y=x(m2+m242)

Which simplifies to

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c1y=x(m+m24)2y=x(m+m24)2

Summary of solutions found

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c1y=x(m+m24)2y=x(m+m24)2
Solved using first_order_ode_homog_type_D2

Time used: 0.118 (sec)

Solve

x+yy=my

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

x+u(x)x(u(x)x+u(x))=mu(x)x

Which is now solved The ode

(2)u(x)=u(x)2mu(x)+1u(x)x

is separable as it can be written as

u(x)=u(x)2mu(x)+1u(x)x=f(x)g(u)

Where

f(x)=1xg(u)=mu+u2+1u

Integrating gives

1g(u)du=f(x)dxumu+u2+1du=1xdx
ln(u(x)2mu(x)+1)2+marctanh(m2u(x)m24)m24=ln(1x)+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

mu+u2+1u=0

for u(x) gives

u(x)=m2m242u(x)=m2+m242

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

ln(u(x)2mu(x)+1)2+marctanh(m2u(x)m24)m24=ln(1x)+c2u(x)=m2m242u(x)=m2+m242

Converting ln(u(x)2mu(x)+1)2+marctanh(m2u(x)m24)m24=ln(1x)+c2 back to y gives

ln(y2x2myx+1)2+marctanh(m2yxm24)m24=ln(1x)+c2

Converting u(x)=m2m242 back to y gives

y=x(m2m242)

Converting u(x)=m2+m242 back to y gives

y=x(m2+m242)

Which simplifies to

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c2y=x(m+m24)2y=x(m+m24)2

Summary of solutions found

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c2y=x(m+m24)2y=x(m+m24)2
Solved using first_order_ode_homog_type_maple_C

Time used: 0.305 (sec)

Solve

x+yy=my

Let Y=yy0 and X=xx0 then the above is transformed to new ode in Y(X)

ddXY(X)=m(Y(X)+y0)Xx0Y(X)+y0

Solving for possible values of x0 and y0 which makes the above ode a homogeneous ode results in

x0=0y0=0

Using these values now it is possible to easily solve for Y(X). The above ode now becomes

ddXY(X)=mY(X)XY(X)

In canonical form, the ODE is

Y=F(X,Y)(1)=mYXY

An ode of the form Y=M(X,Y)N(X,Y) is called homogeneous if the functions M(X,Y) and N(X,Y) are both homogeneous functions and of the same order. Recall that a function f(X,Y) is homogeneous of order n if

f(tnX,tnY)=tnf(X,Y)

In this case, it can be seen that both M=mYX and N=Y are both homogeneous and of the same order n=1. Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution u=YX, or Y=uX. Hence

dYdX=dudXX+u

Applying the transformation Y=uX to the above ODE in (1) gives

dudXX+u=m1ududX=m1u(X)u(X)X

Or

ddXu(X)m1u(X)u(X)X=0

Or

(ddXu(X))u(X)X+u(X)2mu(X)+1=0

Which is now solved as separable in u(X).

The ode

(3)ddXu(X)=u(X)2mu(X)+1u(X)X

is separable as it can be written as

ddXu(X)=u(X)2mu(X)+1u(X)X=f(X)g(u)

Where

f(X)=1Xg(u)=mu+u2+1u

Integrating gives

1g(u)du=f(X)dXumu+u2+1du=1XdX
ln(u(X)2mu(X)+1)2+marctanh(m2u(X)m24)m24=ln(1X)+c3

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

mu+u2+1u=0

for u(X) gives

u(X)=m2m242u(X)=m2+m242

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

ln(u(X)2mu(X)+1)2+marctanh(m2u(X)m24)m24=ln(1X)+c3u(X)=m2m242u(X)=m2+m242

Converting ln(u(X)2mu(X)+1)2+marctanh(m2u(X)m24)m24=ln(1X)+c3 back to Y(X) gives

arctanh(mX2Y(X)X(m2)(m+2))m(m2)(m+2)+ln(mY(X)X+Y(X)2+X2X2)2=ln(1X)+c3

Converting u(X)=m2m242 back to Y(X) gives

Y(X)=X(m2m242)

Converting u(X)=m2+m242 back to Y(X) gives

Y(X)=X(m2+m242)

Using the solution for Y(X)

(A)arctanh(mX2Y(X)X(m2)(m+2))m(m2)(m+2)+ln(mY(X)X+Y(X)2+X2X2)2=ln(1X)+c3

And replacing back terms in the above solution using

Y=y+y0X=x0+x

Or

Y=yX=x

Then the solution in y becomes using EQ (A)

arctanh(mx2yx(m2)(m+2))m(m2)(m+2)+ln(myx+y2+x2x2)2=ln(1x)+c3

Using the solution for Y(X)

(A)Y(X)=X(m2m242)

And replacing back terms in the above solution using

Y=y+y0X=x0+x

Or

Y=yX=x

Then the solution in y becomes using EQ (A)

y=x(m2m242)

Using the solution for Y(X)

(A)Y(X)=X(m2+m242)

And replacing back terms in the above solution using

Y=y+y0X=x0+x

Or

Y=yX=x

Then the solution in y becomes using EQ (A)

y=x(m2+m242)

Which simplifies to

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c3y=x(m+m24)2y=x(m+m24)2

Summary of solutions found

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c3y=x(m+m24)2y=x(m+m24)2
Solved using first_order_ode_isobaric

Time used: 0.220 (sec)

Solve

x+yy=my

Solving for y gives

(1)y=myxy

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)=myxy

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)+xu(x)=mxu(x)xxu(x)

The ode

(4)u(x)=u(x)2u(x)m+1u(x)x

is separable as it can be written as

u(x)=u(x)2u(x)m+1u(x)x=f(x)g(u)

Where

f(x)=1xg(u)=mu+u2+1u

Integrating gives

1g(u)du=f(x)dxumu+u2+1du=1xdx
ln(u(x)2u(x)m+1)2+marctanh(m2u(x)m24)m24=ln(1x)+c4

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

mu+u2+1u=0

for u(x) gives

u(x)=m2m242u(x)=m2+m242

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

ln(u(x)2u(x)m+1)2+marctanh(m2u(x)m24)m24=ln(1x)+c4u(x)=m2m242u(x)=m2+m242

Converting ln(u(x)2u(x)m+1)2+marctanh(m2u(x)m24)m24=ln(1x)+c4 back to y gives

ln(y2x2myx+1)2+marctanh(m2yxm24)m24=ln(1x)+c4

Converting u(x)=m2m242 back to y gives

yx=m2m242

Converting u(x)=m2+m242 back to y gives

yx=m2+m242

Solving for y gives

ln(y2x2myx+1)2+marctanh(m2yxm24)m24=ln(1x)+c4y=x(m+m24)2y=x(m+m24)2

Which simplifies to

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c4y=x(m+m24)2y=x(m+m24)2

Summary of solutions found

ln(myx+y2+x2x2)2+marctanh(mx2yxm24)m24=ln(1x)+c4y=x(m+m24)2y=x(m+m24)2
Solved using first_order_ode_LIE

Time used: 12.161 (sec)

Solve

x+yy=my

Writing the ode as

y=myxyy=ω(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+(myx)(b3a2)y(myx)2a3y2+xa2+ya3+a1y(mymyxy2)(xb2+yb3+b1)=0

Putting the above in normal form gives

m2y2a32mxya3+my2a2my2b3+x2a3+x2b22xya2+2xyb3y2a3b2y2+xb1ya1y2=0

Setting the numerator to zero gives

(6E)m2y2a3+2mxya3my2a2+my2b3x2a3x2b2+2xya22xyb3+y2a3+b2y2xb1+ya1=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)m2a3v22ma2v22+2ma3v1v2+mb3v22+2a2v1v2a3v12+a3v22b2v12+b2v222b3v1v2+a1v2b1v1=0

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

{v1,v2}

Equation (7E) now becomes

(8E)(a3b2)v12+(2ma3+2a22b3)v1v2b1v1+(m2a3ma2+mb3+a3+b2)v22+a1v2=0

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

a1=0b1=0a3b2=02ma3+2a22b3=0m2a3ma2+mb3+a3+b2=0

Solving the above equations for the unknowns gives

a1=0a2=mb2+b3a3=b2b1=0b2=b2b3=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(myxy)(x)=myx+x2+y2yξ=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=1myx+x2+y2ydy

Which results in

S=ln(myx+x2+y2)2mxarctanh(mx+2ym2x24x2)m2x24x2

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)=myxy

Evaluating all the partial derivatives gives

Rx=1Ry=0Sx=myxmyxx2y2Sy=ymyxx2y2

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

(2A)dSdR=0

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=0

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=0dR+c6S(R)=c6

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

ln(myx+y2+x2)2+marctanh(mx2yxm24)m24=c6

Summary of solutions found

ln(myx+y2+x2)2+marctanh(mx2yxm24)m24=c6
Maple. Time used: 0.062 (sec). Leaf size: 57
ode:=y(x)*diff(y(x),x)+x = m*y(x); 
dsolve(ode,y(x), singsol=all);
 
y=RootOf(_Z2eRootOf(x2(4e_Zcosh(m24(2c1+_Z+2ln(x))2m)2+m24))+1_Zm)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 solvex+y(x)(ddxy(x))=my(x)Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=x+my(x)y(x)
Mathematica. Time used: 0.092 (sec). Leaf size: 72
ode=x+y[x]*D[y[x],x]==m*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
Solve[marctan(2y(x)xm4m2)4m2+12log(my(x)x+y(x)2x2+1)=log(x)+c1,y(x)]
Sympy
from sympy import * 
x = symbols("x") 
m = symbols("m") 
y = Function("y") 
ode = Eq(-m*y(x) + x + y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded