2.1.2 Problem 3

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

Internal problem ID [18453]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter 1. section 5. Problems at page 19
Problem number : 3
Date solved : Thursday, March 13, 2025 at 12:00:02 PM
CAS classification : [_quadrature]

Solve

y=cy+a

Solved as first order autonomous ode

Time used: 0.178 (sec)

Integrating gives

1cy+ady=dxln(cy+a)c=x+c1

Singular solutions are found by solving

cy+a=0

for y. 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.

y=ac

The following diagram is the phase line diagram. It classifies each of the above equilibrium points as stable or not stable or semi-stable.

Solving for y gives

y=acy=ec1cxcac

Summary of solutions found

y=acy=ec1cxcac
Solved as first order Exact ode

Time used: 0.181 (sec)

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=(cy+a)dx(2A)(cya)dx+dy=0

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

M(x,y)=cyaN(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(cya)=c

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((c)(0))=c

Since A does not depend on y, then it can be used to find an integrating factor. The integrating factor μ is

μ=eAdx=ecdx

The result of integrating gives

μ=exc=exc

M and N are multiplied by this integrating factor, giving new M and new N which are called M and N for now so not to confuse them with the original M and N.

M=μM=exc(cya)=(cy+a)exc

And

N=μN=exc(1)=exc

Now a modified ODE is ontained from the original ODE, which is exact and can be solved. The modified ODE is

M+Ndydx=0((cy+a)exc)+(exc)dydx=0

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

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

Integrating (2) w.r.t. y gives

ϕydy=Ndyϕydy=excdy(3)ϕ=excy+f(x)

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

(4)ϕx=cexcy+f(x)

But equation (1) says that ϕx=(cy+a)exc. Therefore equation (4) becomes

(5)(cy+a)exc=cexcy+f(x)

Solving equation (5) for f(x) gives

f(x)=exca

Integrating the above w.r.t x gives

f(x)dx=(exca)dxf(x)=excac+c1

Where c1 is constant of integration. Substituting result found above for f(x) into equation (3) gives ϕ

ϕ=excyexcac+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=excyexcac

Solving for y gives

y=(exca+c1c)excc

Summary of solutions found

y=(exca+c1c)excc
Solved using Lie symmetry for first order ode

Time used: 0.317 (sec)

Writing the ode as

y=cy+ay=ω(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+(cy+a)(b3a2)(cy+a)2a3+c(xb2+yb3+b1)=0

Putting the above in normal form gives

c2y2a3+2acya3a2a3+cxb2+cya2aa2+ab3+cb1+b2=0

Setting the numerator to zero gives

(6E)c2y2a3+2acya3a2a3+cxb2+cya2aa2+ab3+cb1+b2=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)c2a3v22+2aca3v2a2a3+ca2v2+cb2v1aa2+ab3+cb1+b2=0

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

{v1,v2}

Equation (7E) now becomes

(8E)cb2v1c2a3v22+(2aca3+ca2)v2a2a3aa2+ab3+cb1+b2=0

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

cb2=0c2a3=02aca3+ca2=0a2a3aa2+ab3+cb1+b2=0

Solving the above equations for the unknowns gives

a1=a1a2=0a3=0b1=ab3cb2=0b3=b3

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

ξ=0η=cy+ac

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=1cy+acdy

Which results in

S=ln(cy+a)

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)=cy+a

Evaluating all the partial derivatives gives

Rx=1Ry=0Sx=0Sy=ccy+a

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

(2A)dSdR=c

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

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=cdRS(R)=Rc+c2

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

ln(cy+a)=xc+c2

Which gives

y=exc+c2ac

Summary of solutions found

y=exc+c2ac
Solved as first order ode of type dAlembert

Time used: 0.096 (sec)

Let p=y the ode becomes

p=cy+a

Solving for y from the above results in

(1)y=apc

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

Hence (2) becomes

(2A)p=p(x)c

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

p=0

Solving the above for p results in

p1=0

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

y=ac

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

(3)p(x)=p(x)c

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

Integrating gives

1pcdp=dxln(p)c=x+c1

Singular solutions are found by solving

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

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

y=aec1cxccy=ac

Summary of solutions found

y=acy=aec1cxcc
Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=diff(y(x),x)+c*y(x) = a; 
dsolve(ode,y(x), singsol=all);
 
y(x)=ecxc1c+ac

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 

Maple step by step

Let’s solvey+cy=aHighest derivative means the order of the ODE is1ySolve for the highest derivativey=cy+aSeparate variablesycy+a=1Integrate both sides with respect toxycy+adx=1dx+C1Evaluate integralln(cy+a)c=x+C1Solve foryy=eC1cxcac
Mathematica. Time used: 0.044 (sec). Leaf size: 29
ode=D[y[x],x]+c*y[x]==a; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)ac+c1ecxy(x)ac
Sympy. Time used: 0.120 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
a = symbols("a") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-a + c*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1ecx+ac