2.3.28 Problem 28

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

Internal problem ID [8885]
Book : Own collection of miscellaneous problems
Section : section 3.0
Problem number : 28
Date solved : Friday, April 25, 2025 at 05:22:07 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

Solved using first_order_ode_homog_A

Time used: 0.378 (sec)

Solve

y=eyx

In canonical form, the ODE is

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

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=eyx and N=1 are both homogeneous and of the same order n=0. 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=eududx=eu(x)u(x)x

Or

u(x)eu(x)u(x)x=0

Or

u(x)eu(x)x+u(x)eu(x)1=0

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

The ode

(1)u(x)=(u(x)eu(x)1)eu(x)x

is separable as it can be written as

u(x)=(u(x)eu(x)1)eu(x)x=f(x)g(u)

Where

f(x)=1xg(u)=(ueu1)eu

Integrating gives

1g(u)du=f(x)dxeuueu1du=1xdx
u(x)eττeτ1dτ=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

(ueu1)eu=0

for u(x) gives

u(x)=LambertW(1)

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

u(x)eττeτ1dτ=ln(1x)+c1u(x)=LambertW(1)

Converting u(x)eττeτ1dτ=ln(1x)+c1 back to y gives

yx1eττdτ=ln(1x)+c1

Converting u(x)=LambertW(1) back to y gives

y=xLambertW(1)
Figure 2.177: Slope field y=eyx

Summary of solutions found

yx1eττdτ=ln(1x)+c1y=xLambertW(1)
Solved using first_order_ode_homog_type_D2

Time used: 0.081 (sec)

Solve

y=eyx

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

u(x)x+u(x)=eu(x)

Which is now solved The ode

(2)u(x)=u(x)eu(x)x

is separable as it can be written as

u(x)=u(x)eu(x)x=f(x)g(u)

Where

f(x)=1xg(u)=u+eu

Integrating gives

1g(u)du=f(x)dx1u+eudu=1xdx
u(x)1τ+eτdτ=ln(x)+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

u+eu=0

for u(x) gives

u(x)=LambertW(1)

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

u(x)1τ+eτdτ=ln(x)+c2u(x)=LambertW(1)

Converting u(x)1τ+eτdτ=ln(x)+c2 back to y gives

yx1τ+eτdτ=ln(x)+c2

Converting u(x)=LambertW(1) back to y gives

y=xLambertW(1)
Figure 2.178: Slope field y=eyx

Summary of solutions found

yx1τ+eτdτ=ln(x)+c2y=xLambertW(1)
Solved using first_order_ode_isobaric

Time used: 0.092 (sec)

Solve

y=eyx

Solving for y gives

(1)y=eyx

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

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)=eu(x)

The ode

(3)u(x)=u(x)eu(x)x

is separable as it can be written as

u(x)=u(x)eu(x)x=f(x)g(u)

Where

f(x)=1xg(u)=u+eu

Integrating gives

1g(u)du=f(x)dx1u+eudu=1xdx
u(x)1τ+eτdτ=ln(x)+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

u+eu=0

for u(x) gives

u(x)=LambertW(1)

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

u(x)1τ+eτdτ=ln(x)+c3u(x)=LambertW(1)

Converting u(x)1τ+eτdτ=ln(x)+c3 back to y gives

yx1τ+eτdτ=ln(x)+c3

Converting u(x)=LambertW(1) back to y gives

yx=LambertW(1)

Solving for y gives

yx1τ+eτdτ=ln(x)+c3y=xLambertW(1)
Figure 2.179: Slope field y=eyx

Summary of solutions found

yx1τ+eτdτ=ln(x)+c3y=xLambertW(1)
Solved using first_order_ode_LIE

Time used: 0.462 (sec)

Solve

y=eyx

Writing the ode as

y=eyxy=ω(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+eyx(b3a2)e2yxa3yeyx(xa2+ya3+a1)x2+eyx(xb2+yb3+b1)x=0

Putting the above in normal form gives

e2yxa3x2+eyxx2a2eyxx2b2eyxx2b3+eyxxya2eyxxyb3+eyxy2a3eyxxb1+eyxya1b2x2x2=0

Setting the numerator to zero gives

(6E)e2yxa3x2eyxx2a2+eyxx2b2+eyxx2b3eyxxya2+eyxxyb3eyxy2a3+eyxxb1eyxya1+b2x2=0

Simplifying the above gives

(6E)e2yxa3x2eyxx2a2+eyxx2b2+eyxx2b3eyxxya2+eyxxyb3eyxy2a3+eyxxb1eyxya1+b2x2=0

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

{x,y,e2yx,eyx}

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

{x=v1,y=v2,e2yx=v3,eyx=v4}

The above PDE (6E) now becomes

(7E)v4v12a2v4v1v2a2v3a3v12v4v22a3+v4v12b2+v4v12b3+v4v1v2b3v4v2a1+v4v1b1+b2v12=0

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

{v1,v2,v3,v4}

Equation (7E) now becomes

(8E)v3a3v12+(a2+b2+b3)v12v4+b2v12+(b3a2)v1v2v4+v4v1b1v4v22a3v4v2a1=0

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

b1=0b2=0a1=0a3=0b3a2=0a2+b2+b3=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

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). Therefore

dydx=ηξ=yx=yx

This is easily solved to give

y=c1x

Where now the coordinate R is taken as the constant of integration. Hence

R=yx

And S is found from

dS=dxξ=dxx

Integrating gives

S=dxT=ln(x)

Where the constant of integration is set to zero as we just need one solution. 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)=eyx

Evaluating all the partial derivatives gives

Rx=yx2Ry=1xSx=1xSy=0

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

(2A)dSdR=xeyxxy

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=1eRR

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=1eRRdRS(R)=1eRRdR+c5
S(R)=1eRRdR+c5

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

ln(x)=yx1e_a_ad_a+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=eyx

dSdR=1eRR

R=yxS=ln(x)

Figure 2.180: Slope field y=eyx

Summary of solutions found

ln(x)=yx1e_a_ad_a+c5
Solved using first_order_ode_dAlembert

Time used: 0.184 (sec)

Solve

y=eyx

Let p=y the ode becomes

p=eyx

Solving for y from the above results in

(1)y=ln(p)x

This has the form

(*)y=xf(p)+g(p)

Where f,g are functions of p=y(x). The above ode is dAlembert ode which is now solved.

Taking derivative of (*) w.r.t. x gives

p=f+(xf+g)dpdx(2)pf=(xf+g)dpdx

Comparing the form y=xf+g to (1A) shows that

f=ln(p)g=0

Hence (2) becomes

(2A)p+ln(p)=xp(x)p

The singular solution is found by setting dpdx=0 in the above which gives

p+ln(p)=0

Solving the above for p results in

p1=LambertW(1)

Substituting these in (1A) and keeping singular solution that verifies the ode gives

y=xLambertW(1)

The general solution is found when dpdx0. From eq. (2A). This results in

(3)p(x)=(p(x)+ln(p(x)))p(x)x

This ODE is now solved for p(x). No inversion is needed.

The ode

(4)p(x)=(p(x)+ln(p(x)))p(x)x

is separable as it can be written as

p(x)=(p(x)+ln(p(x)))p(x)x=f(x)g(p)

Where

f(x)=1xg(p)=(p+ln(p))p

Integrating gives

1g(p)dp=f(x)dx1(p+ln(p))pdp=1xdx
p(x)1(τ+ln(τ))τdτ=ln(1x)+c6

We now need to find the singular solutions, these are found by finding for what values g(p) is zero, since we had to divide by this above. Solving g(p)=0 or

(p+ln(p))p=0

for p(x) gives

p(x)=LambertW(1)

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

p(x)1(τ+ln(τ))τdτ=ln(1x)+c6p(x)=LambertW(1)

Substituing the above solution for p in (2A) gives

y=ln(RootOf(_Z1(τ+ln(τ))τdτ+ln(1x)+c6))xy=ln(LambertW(1))x

Which simplifies to

y=xLambertW(1)y=ln(RootOf(_Z1(τ+ln(τ))τdτ+ln(1x)+c6))xy=xLambertW(1)
Figure 2.181: Slope field y=eyx

Summary of solutions found

y=xLambertW(1)y=ln(RootOf(_Z1(τ+ln(τ))τdτ+ln(1x)+c6))xy=xLambertW(1)
Maple. Time used: 0.004 (sec). Leaf size: 29
ode:=diff(y(x),x) = exp(-y(x)/x); 
dsolve(ode,y(x), singsol=all);
 
y=RootOf(_Z1e_a+_ad_a+ln(x)+c1)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)=ey(x)xHighest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=ey(x)x
Mathematica. Time used: 0.443 (sec). Leaf size: 39
ode=D[y[x],x]==Exp[-y[x]/x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
Solve[1y(x)xeK[1]eK[1]K[1]1dK[1]=log(x)+c1,y(x)]
Sympy. Time used: 1.064 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - exp(-y(x)/x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1exy(x)1u1e1u1du1