2.1.31 Problem 32

Solved using first_order_ode_homog_type_maple_C
Solved using first_order_ode_LIE
Solved using first_order_ode_dAlembert
Maple
Mathematica
Sympy

Internal problem ID [8743]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 32
Date solved : Sunday, March 30, 2025 at 01:29:23 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

Solved using first_order_ode_homog_type_maple_C

Time used: 0.336 (sec)

Solve

2t+3x+(x+2)x=0

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

ddXY(X)=3Y(X)+3y0+2X+2x0Y(X)+y0+2

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

x0=3y0=2

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

ddXY(X)=3Y(X)+2XY(X)

In canonical form, the ODE is

Y=F(X,Y)(1)=3Y+2XY

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=3Y2X 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=32ududX=32u(X)u(X)X

Or

ddXu(X)32u(X)u(X)X=0

Or

(ddXu(X))u(X)X+u(X)2+3u(X)+2=0

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

The ode

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

is separable as it can be written as

ddXu(X)=u(X)2+3u(X)+2u(X)X=f(X)g(u)

Where

f(X)=1Xg(u)=u2+3u+2u

Integrating gives

1g(u)du=f(X)dXuu2+3u+2du=1XdX
ln((u(X)+2)2u(X)+1)=ln(1X)+c1

Taking the exponential of both sides the solution becomes

(u(X)+2)2u(X)+1=c1X

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

u2+3u+2u=0

for u(X) gives

u(X)=2u(X)=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)+2)2u(X)+1=c1Xu(X)=2u(X)=1

Converting (u(X)+2)2u(X)+1=c1X back to Y(X) gives

(Y(X)+2X)2Y(X)+X=c1

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

Y(X)=2X

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

Y(X)=X

Using the solution for Y(X)

(A)(Y(X)+2X)2Y(X)+X=c1

And replacing back terms in the above solution using

Y=x+y0X=x0+t

Or

Y=x2X=t+3

Then the solution in x becomes using EQ (A)

(x4+2t)2x1+t=c1

Using the solution for Y(X)

(A)Y(X)=2X

And replacing back terms in the above solution using

Y=x+y0X=x0+t

Or

Y=x2X=t+3

Then the solution in x becomes using EQ (A)

x+2=2t+6

Using the solution for Y(X)

(A)Y(X)=X

And replacing back terms in the above solution using

Y=x+y0X=x0+t

Or

Y=x2X=t+3

Then the solution in x becomes using EQ (A)

x+2=t+3

Solving for x gives

(x4+2t)2x1+t=c1x=2t+4x=t+1
Figure 2.68: Slope field 2t+3x+(x+2)x=0

Summary of solutions found

(x4+2t)2x1+t=c1x=2t+4x=t+1
Solved using first_order_ode_LIE

Time used: 0.633 (sec)

Solve

2t+3x+(x+2)x=0

Writing the ode as

x=3x+2tx+2x=ω(t,x)

The condition of Lie symmetry is the linearized PDE given by

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

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

(1E)ξ=ta2+xa3+a1(2E)η=tb2+xb3+b1

Where the unknown coefficients are

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

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

(5E)b2(3x+2t)(b3a2)x+2(3x+2t)2a3(x+2)2+2ta2+2xa3+2a1x+2(3x+2+3x+2t(x+2)2)(tb2+xb3+b1)=0

Putting the above in normal form gives

4t2a3+2t2b24txa2+12txa3+4txb33x2a2+7x2a3x2b2+3x2b38ta2+2tb16tb2+4tb32xa16xa24xa34xb24a16b14b2(x+2)2=0

Setting the numerator to zero gives

(6E)4t2a32t2b2+4txa212txa34txb3+3x2a27x2a3+x2b23x2b3+8ta22tb1+6tb24tb3+2xa1+6xa2+4xa3+4xb2+4a1+6b1+4b2=0

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

{t,x}

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

{t=v1,x=v2}

The above PDE (6E) now becomes

(7E)4a2v1v2+3a2v224a3v1212a3v1v27a3v222b2v12+b2v224b3v1v23b3v22+2a1v2+8a2v1+6a2v2+4a3v22b1v1+6b2v1+4b2v24b3v1+4a1+6b1+4b2=0

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

{v1,v2}

Equation (7E) now becomes

(8E)(4a32b2)v12+(4a212a34b3)v1v2+(8a22b1+6b24b3)v1+(3a27a3+b23b3)v22+(2a1+6a2+4a3+4b2)v2+4a1+6b1+4b2=0

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

4a32b2=04a1+6b1+4b2=04a212a34b3=02a1+6a2+4a3+4b2=03a27a3+b23b3=08a22b1+6b24b3=0

Solving the above equations for the unknowns gives

a1=7a33b3a2=3a3+b3a3=a3b1=6a3+2b3b2=2a3b3=b3

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

ξ=t3η=x+2

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

η=ηω(t,x)ξ=x+2(3x+2tx+2)(t3)=2t2+3xt+x26t5x+4x+2ξ=0

The next step is to determine the canonical coordinates R,S. The canonical coordinates map (t,x)(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)dtξ=dxη=dS

The above comes from the requirements that (ξt+ηx)S(t,x)=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=t

S is found from

S=1ηdy=12t2+3xt+x26t5x+4x+2dy

Which results in

S=2ln(x4+2t)ln(x1+t)

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

(2)dSdR=St+ω(t,x)SxRt+ω(t,x)Rx

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

ω(t,x)=3x+2tx+2

Evaluating all the partial derivatives gives

Rt=1Rx=0St=4x4+2t1x1+tSx=x+2(x1+t)(x4+2t)

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 t,x 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+c3S(R)=c3

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

2ln(x4+2t)ln(x1+t)=c3

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 t,x coordinates

Canonical coordinates transformation

ODE in canonical coordinates (R,S)

dxdt=3x+2tx+2

dSdR=0

R=tS=2ln(x4+2t)ln(x1+t)

Solving for x gives

x=ec32e2c34tec3+12ec322t+4x=ec32+e2c34tec3+12ec322t+4

Which simplifies to

x=ec32ec3(12+ec34t)22t+4x=ec32+ec3(12+ec34t)22t+4
Figure 2.69: Slope field 2t+3x+(x+2)x=0

Summary of solutions found

x=ec32ec3(12+ec34t)22t+4x=ec32+ec3(12+ec34t)22t+4
Solved using first_order_ode_dAlembert

Time used: 0.130 (sec)

Solve

2t+3x+(x+2)x=0

Let p=x the ode becomes

2t+3x+(x+2)p=0

Solving for x from the above results in

(1)x=2t3+p2p3+p

This has the form

(*)x=tf(p)+g(p)

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

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

p=f+(tf+g)dpdt(2)pf=(tf+g)dpdt

Comparing the form x=tf+g to (1A) shows that

f=23+pg=2p3+p

Hence (2) becomes

(2A)p+23+p=(2t(3+p)223+p+2p(3+p)2)p(t)

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

p+23+p=0

Solving the above for p results in

p1=1p2=2

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

x=t+1x=2t+4

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

(3)p(t)=p(t)+23+p(t)2t(3+p(t))223+p(t)+2p(t)(3+p(t))2

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

The ode

(2)p(t)=p(t)3+6p(t)2+11p(t)+62t6

is separable as it can be written as

p(t)=p(t)3+6p(t)2+11p(t)+62t6=f(t)g(p)

Where

f(t)=1t3g(p)=12p3+3p2+112p+3

Integrating gives

1g(p)dp=f(t)dt112p3+3p2+112p+3dp=1t3dt
ln((3+p(t))(p(t)+1)(p(t)+2)2)=ln(t3)+c4

Taking the exponential of both sides the solution becomes

(3+p(t))(p(t)+1)(p(t)+2)2=c4(t3)

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

12p3+3p2+112p+3=0

for p(t) gives

p(t)=3p(t)=2p(t)=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

(3+p(t))(p(t)+1)(p(t)+2)2=c4(t3)p(t)=3p(t)=2p(t)=1

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

x=2t32c4t+3c4+1+1c4t+3c4+1+4c4t+3c4+1+2c4t+3c4+1(32c4t+3c4+1+1c4t+3c4+1)x=2t+4x=t+1

Which simplifies to

x=2t+4x=t+1x=2+(2t+4)1+(t+3)c41+(t+3)c41
Figure 2.70: Slope field 2t+3x+(x+2)x=0

Summary of solutions found

x=2t+4x=t+1x=2+(2t+4)1+(t+3)c41+(t+3)c41
Maple. Time used: 2.033 (sec). Leaf size: 30
ode:=2*t+3*x(t)+(x(t)+2)*diff(x(t),t) = 0; 
dsolve(ode,x(t), singsol=all);
 
x=4(t3)c1+11+(4t+8)c12c1

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 C 
trying homogeneous types: 
trying homogeneous D 
<- homogeneous successful 
<- homogeneous successful
 

Maple step by step

Let’s solve2t+3x(t)+(x(t)+2)(ddtx(t))=0Highest derivative means the order of the ODE is1ddtx(t)Solve for the highest derivativeddtx(t)=2t3x(t)x(t)+2
Mathematica. Time used: 60.104 (sec). Leaf size: 1165
ode=2*t+3*x[t]+(x[t]+2)*D[x[t],t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
Solution too large to show

Sympy. Time used: 2.294 (sec). Leaf size: 44
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(2*t + (x(t) + 2)*Derivative(x(t), t) + 3*x(t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
[x(t)=2C12t2C1(C1t+3)+4, x(t)=2C12t+2C1(C1t+3)+4]