2.1.6 Problem 6

Solved as first order polynomial type ode
Solved using Lie symmetry for first order ode
Solved as first order ode of type dAlembert
Maple
Mathematica
Sympy

Internal problem ID [4082]
Book : Differential equations, Shepley L. Ross, 1964
Section : 2.4, page 55
Problem number : 6
Date solved : Tuesday, March 04, 2025 at 05:24:24 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

Solve

y=3x+y16x+2y+3

Solved as first order polynomial type ode

Time used: 0.187 (sec)

This is ODE of type polynomial. Where the RHS of the ode is ratio of equations of two lines. Writing the ODE in the form

y=a1x+b1y+c1a2x+b2y+c3

Where a1=3,b1=1,c1=1,a2=6,b2=2,c2=3. There are now two possible solution methods. The first case is when the two lines a1x+b1y+c1,a2x+b2y+c3 are not parallel and the second case is if they are parallel. If they are not parallel, then the transformation X=xx0, Y=yy0 converts the ODE to a homogeneous ODE. The values x0,y0 have to be determined. If they are parallel then a transformation U(x)=a1x+b1y converts the given ODE in y to a separable ODE in U(x). The first case is when a1b1a2b2 and the second case when a1b1=a2b2. From the above we see that a1b1=31=3 and a2b2=62=3. Hence this is case two, where the lines are parallel. Let U(x)=3xy. Solving for y gives

y=3xU(x)

Taking derivative w.r.t x gives

y=3U(x)

Substituting the above into the ODE results in the ODE

U(x)+1(2U(x)3)(3U(x))=0

Or

(2U(x)3)U(x)5U(x)+10=0

Or

U(x)=5U(x)102U(x)3

Which is now solved as separable in U(x). Integrating gives

2U35U10dU=dx2U5+ln(U2)5=x+c2

Singular solutions are found by solving

5U102U3=0

for U(x). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

U(x)=2

Each of the above solutions is now converted converted back to y. The solution 2U(x)5+ln(U(x)2)5=x+c2 is converted to y using U(x)=3xy. Which gives

6x52y5+ln(3xy2)5=x+c2

The solution U(x)=2 is converted to y using U(x)=3xy. Which gives

3xy=2

Or

y=2+3x

Solving for y gives

y=2+3xy=LambertW(2e5x4+5c2)2+3x2
Figure 2.11: Slope field 3xy+1(6x2y3)y=0

Summary of solutions found

y=2+3xy=LambertW(2e5x4+5c2)2+3x2
Solved using Lie symmetry for first order ode

Time used: 0.574 (sec)

Writing the ode as

y=3x+y16x+2y+3y=ω(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+(3x+y1)(b3a2)6x+2y+3(3x+y1)2a3(6x+2y+3)2(36x+2y+3+18x+6y6(6x+2y+3)2)(xa2+ya3+a1)(16x+2y+32(3x+y1)(6x+2y+3)2)(xb2+yb3+b1)=0

Putting the above in normal form gives

18x2a2+9x2a336x2b218x2b312xya26xya3+24xyb2+12xyb3+2y2a2+y2a34y2b22y2b318xa2+6xa3+41xb2+3xb3+ya217ya312yb2+4yb315a13a2+a3+5b19b2+3b3(6x2y3)2=0

Setting the numerator to zero gives

(6E)18x2a29x2a3+36x2b2+18x2b3+12xya2+6xya324xyb212xyb32y2a2y2a3+4y2b2+2y2b3+18xa26xa341xb23xb3ya2+17ya3+12yb24yb3+15a1+3a2a35b1+9b23b3=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)18a2v12+12a2v1v22a2v229a3v12+6a3v1v2a3v22+36b2v1224b2v1v2+4b2v22+18b3v1212b3v1v2+2b3v22+18a2v1a2v26a3v1+17a3v241b2v1+12b2v23b3v14b3v2+15a1+3a2a35b1+9b23b3=0

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

{v1,v2}

Equation (7E) now becomes

(8E)(18a29a3+36b2+18b3)v12+(12a2+6a324b212b3)v1v2+(18a26a341b23b3)v1+(2a2a3+4b2+2b3)v22+(a2+17a3+12b24b3)v2+15a1+3a2a35b1+9b23b3=0

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

18a29a3+36b2+18b3=02a2a3+4b2+2b3=0a2+17a3+12b24b3=012a2+6a324b212b3=018a26a341b23b3=015a1+3a2a35b1+9b23b3=0

Solving the above equations for the unknowns gives

a1=a1a2=2b2a3=2b23b1=3a1+10b23b2=b2b3=b23

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

ξ=1η=3

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

η=ηω(x,y)ξ=3(3x+y16x+2y+3)(1)=15x5y106x2y3ξ=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=115x5y106x2y3dy

Which results in

S=2y5ln(3x+y+2)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)=3x+y16x+2y+3

Evaluating all the partial derivatives gives

Rx=1Ry=0Sx=315x5y10Sy=25+115x5y10

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

(2A)dSdR=15

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

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=15dRS(R)=R5+c2

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

2y5ln(3x+y+2)5=x5+c2

Which gives

y=LambertW(2e5x45c2)2+3x2

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=3x+y16x+2y+3

dSdR=15

R=xS=2y5ln(3x+y+2)5

Figure 2.12: Slope field y=3x+y16x+2y+3

Summary of solutions found

y=LambertW(2e5x45c2)2+3x2
Solved as first order ode of type dAlembert

Time used: 0.414 (sec)

Let p=y the ode becomes

p=3x+y16x+2y+3

Solving for y from the above results in

(1)y=(6p3)x1+2p+3p11+2p

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=3g=3p11+2p

Hence (2) becomes

(2A)p3=(31+2p+6p(1+2p)2+2(1+2p)2)p(x)

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

p3=0

Solving the above for p results in

p1=3

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

y=2+3x

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

(3)p(x)=p(x)331+2p(x)+6p(x)(1+2p(x))2+2(1+2p(x))2

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

Integrating gives

5(p3)(1+2p)2dp=dx11+2pln(1+2p)5+ln(p3)5=x+c1

Singular solutions are found by solving

(p3)(1+2p)25=0

for p(x). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

p(x)=3p(x)=12

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

y=3x+3eRootOf(2ln(2e_Z+5)e_Z+10c1e_Z2_Ze_Z+10xe_Z+5ln(2e_Z+5)+25c15_Z+25x5)102eRootOf(2ln(2e_Z+5)e_Z+10c1e_Z2_Ze_Z+10xe_Z+5ln(2e_Z+5)+25c15_Z+25x5)+5y=2+3x
Figure 2.13: Slope field y=3x+y16x+2y+3

Summary of solutions found

y=2+3xy=3x+3eRootOf(2ln(2e_Z+5)e_Z+10c1e_Z2_Ze_Z+10xe_Z+5ln(2e_Z+5)+25c15_Z+25x5)102eRootOf(2ln(2e_Z+5)e_Z+10c1e_Z2_Ze_Z+10xe_Z+5ln(2e_Z+5)+25c15_Z+25x5)+5
Maple. Time used: 0.028 (sec). Leaf size: 23
ode:=3*x-y(x)+1-(6*x-2*y(x)-3)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y(x)=LambertW(2e5x45c1)2+3x2

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 
1st order, trying the canonical coordinates of the invariance group 
   -> Calling odsolve with the ODE`, diff(y(x), x) = 3, y(x)`      *** Sublevel 2 *** 
      Methods for first order ODEs: 
      --- Trying classification methods --- 
      trying a quadrature 
      trying 1st order linear 
      <- 1st order linear successful 
<- 1st order, canonical coordinates successful 
<- homogeneous successful`
 

Maple step by step

Let’s solve3xy(x)+1(6x2y(x)3)(ddxy(x))=0Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=3x+y(x)16x2y(x)3
Mathematica. Time used: 3.076 (sec). Leaf size: 35
ode=(3*x-y[x]+1)-(6*x-2*y[x]-3)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)12W(e5x1+c1)+3x2y(x)3x2
Sympy. Time used: 0.954 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*x - (6*x - 2*y(x) - 3)*Derivative(y(x), x) - y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=3xW(C1e5x4)22