2.4.4 Problem 4

Solved using first_order_ode_linear
Solved using first_order_ode_homog_type_D2
Solved using first_order_ode_exact
Solved using first_order_ode_LIE
Maple
Mathematica
Sympy

Internal problem ID [18477]
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 31. Problems at page 85
Problem number : 4
Date solved : Saturday, April 26, 2025 at 11:22:33 AM
CAS classification : [_linear]

Solved using first_order_ode_linear

Time used: 0.141 (sec)

Solve

p=p+at32pt2t(t2+1)

In canonical form a linear first order is

p+q(t)p=p(t)

Comparing the above to the given ode shows that

q(t)=2t21t3tp(t)=at2t21

The integrating factor μ is

μ=eqdt=e2t21t3tdt=1t+1tt1

The ode becomes

ddt(μp)=μpddt(μp)=(μ)(at2t21)ddt(pt+1tt1)=(1t+1tt1)(at2t21)d(pt+1tt1)=(at(t21)t+1t1)dt

Integrating gives

pt+1tt1=at(t21)t+1t1dt=t1t+1at21+c1

Dividing throughout by the integrating factor 1t+1tt1 gives the final solution

p=t(t1t+1a+c1(t21))t1t+1t21

Summary of solutions found

p=t(t1t+1a+c1(t21))t1t+1t21
Solved using first_order_ode_homog_type_D2

Time used: 0.136 (sec)

Solve

p=p+at32pt2t(t2+1)

Applying change of variables p=u(t)t, then the ode becomes

u(t)t+u(t)=u(t)t+at32u(t)t3t(t2+1)

Which is now solved The ode

(1)u(t)=t(u(t)a)t21

is separable as it can be written as

u(t)=t(u(t)a)t21=f(t)g(u)

Where

f(t)=tt21g(u)=ua

Integrating gives

1g(u)du=f(t)dt1uadu=tt21dt
ln(u(t)+a)=ln(t21)+c2

Taking the exponential of both sides the solution becomes

u(t)+a=c2t21

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

ua=0

for u(t) gives

u(t)=a

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(t)+a=c2t21u(t)=a

Converting u(t)+a=c2t21 back to p gives

pt+a=c2t21

Converting u(t)=a back to p gives

p=at

Solving for p gives

p=atp=(c2t21a)t

Which simplifies to

p=atp=(c2t21+a)t

Summary of solutions found

p=atp=(c2t21+a)t
Solved using first_order_ode_exact

Time used: 0.148 (sec)

Solve

p=p+at32pt2t(t2+1)

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(t,p)dt+N(t,p)dp=0

Therefore

dp=(at32pt2+pt(t2+1))dt(2A)(at32pt2+pt(t2+1))dt+dp=0

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

M(t,p)=at32pt2+pt(t2+1)N(t,p)=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

Mp=Nt

Using result found above gives

Mp=p(at32pt2+pt(t2+1))=2t2+1t3t

And

Nt=t(1)=0

Since MpNt, 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(MpNt)=1((2t2+1t(t2+1))(0))=2t2+1t3t

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

μ=eAdt=e2t2+1t3tdt

The result of integrating gives

μ=eln(t+1)2ln(t)ln(t1)2=1t+1tt1

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=1t+1tt1(at32pt2+pt(t2+1))=at32pt2+pt2(t21)t+1t1

And

N=μN=1t+1tt1(1)=1t+1tt1

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

M+Ndpdt=0(at32pt2+pt2(t21)t+1t1)+(1t+1tt1)dpdt=0

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

(1)ϕt=M(2)ϕp=N

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

ϕpdp=Ndpϕpdp=1t+1tt1dp(3)ϕ=pt+1tt1+f(t)

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

(4)ϕt=p2(t+1)3/2tt1pt+1t2t1p2t+1t(t1)3/2+f(t)=2p(t212)(t1)3/2(t+1)3/2t2+f(t)

But equation (1) says that ϕt=at32pt2+pt2(t21)t+1t1. Therefore equation (4) becomes

(5)at32pt2+pt2(t21)t+1t1=2p(t212)(t1)3/2(t+1)3/2t2+f(t)

Solving equation (5) for f(t) gives

f(t)=at(t+1)3/2(t1)3/2

Integrating the above w.r.t t gives

f(t)dt=(at(t+1)3/2(t1)3/2)dtf(t)=at1t+1+c3

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

ϕ=pt+1tt1at1t+1+c3

But since ϕ itself is a constant function, then let ϕ=c4 where c4 is new constant and combining c3 and c4 constants into the constant c3 gives the solution as

c3=pt+1tt1at1t+1

Solving for p gives

p=c3t+1tt1+at

Which simplifies to

p=t(c3t+1t1+a)

Summary of solutions found

p=t(c3t+1t1+a)
Solved using first_order_ode_LIE

Time used: 0.340 (sec)

Solve

p=p+at32pt2t(t2+1)

Writing the ode as

p=at3+2pt2pt(t21)p=ω(t,p)

The condition of Lie symmetry is the linearized PDE given by

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

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

(1E)ξ=pa3+ta2+a1(2E)η=pb3+tb2+b1

Where the unknown coefficients are

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

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

(5E)b2+(at3+2pt2p)(b3a2)t(t21)(at3+2pt2p)2a3t2(t21)2(3at2+4ptt(t21)at3+2pt2pt2(t21)2(at3+2pt2p)(t21)2)(pa3+ta2+a1)(2t21)(pb3+tb2+b1)t(t21)=0

Putting the above in normal form gives

a2t6a34apt5a3at6a2+at6b3+2p2t4a3+t6b2+4apt3a3+3at4a2at4b32pt4a1+2t5b1+2at3a13p2t2a32pt3a2t4b2+pt2a13t3b1pa1+tb1t2(t21)2=0

Setting the numerator to zero gives

(6E)a2t6a3+4apt5a3+at6a2at6b32p2t4a3t6b24apt3a33at4a2+at4b3+2pt4a12t5b12at3a1+3p2t2a3+2pt3a2+t4b2pt2a1+3t3b1+pa1tb1=0

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

{p,t}

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

{p=v1,t=v2}

The above PDE (6E) now becomes

(7E)a2a3v26+aa2v26+4aa3v1v25ab3v262a3v12v24b2v263aa2v244aa3v1v23+ab3v24+2a1v1v242b1v252aa1v23+2a2v1v23+3a3v12v22+b2v24a1v1v22+3b1v23+a1v1b1v2=0

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

{v1,v2}

Equation (7E) now becomes

(8E)2a3v12v24+3a3v12v22+4aa3v1v25+2a1v1v24+(4aa3+2a2)v1v23a1v1v22+a1v1+(a2a3+aa2ab3b2)v262b1v25+(3aa2+ab3+b2)v24+(2aa1+3b1)v23b1v2=0

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

a1=0a1=02a1=02a3=03a3=02b1=0b1=04aa3=02aa1+3b1=04aa3+2a2=03aa2+ab3+b2=0a2a3+aa2ab3b2=0

Solving the above equations for the unknowns gives

a1=0a2=0a3=0b1=0b2=ab3b3=b3

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

ξ=0η=at+p

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

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

Which results in

S=ln(at+p)

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

(2)dSdR=St+ω(t,p)SpRt+ω(t,p)Rp

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

ω(t,p)=at3+2pt2pt(t21)

Evaluating all the partial derivatives gives

Rt=1Rp=0St=aatpSp=1at+p

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

(2A)dSdR=2t21t3t

We now need to express the RHS as function of R only. This is done by solving for t,p in terms of R,S from the result obtained earlier and simplifying. This gives

dSdR=2R21R3R

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=2R21R(R21)dRS(R)=ln(R+1)2+ln(R)+ln(R1)2+c6

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

ln(at+p)=ln(t+1)2+ln(t)+ln(t1)2+c6

Solving for p gives

p=t(eln(t+1)2ln(t1)2c6a+1)eln(t+1)+ln(t1)+c6

Which simplifies to

p=t(t+1t1ec6+a)

Summary of solutions found

p=t(t+1t1ec6+a)
Maple. Time used: 0.002 (sec). Leaf size: 20
ode:=diff(p(t),t) = (p(t)+a*t^3-2*p(t)*t^2)/t/(-t^2+1); 
dsolve(ode,p(t), singsol=all);
 
p=t(c1t+1t1+a)

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 solveddtp(t)=p(t)+at32p(t)t2t(t2+1)Highest derivative means the order of the ODE is1ddtp(t)Solve for the highest derivativeddtp(t)=p(t)+at32p(t)t2t(t2+1)Collect w.r.t.p(t)and simplifyddtp(t)=(2t21)p(t)t(t21)t2at21Group terms withp(t)on the lhs of the ODE and the rest on the rhs of the ODEddtp(t)(2t21)p(t)t(t21)=t2at21The ODE is linear; multiply by an integrating factorμ(t)μ(t)(ddtp(t)(2t21)p(t)t(t21))=μ(t)t2at21Assume the lhs of the ODE is the total derivativeddt(p(t)μ(t))μ(t)(ddtp(t)(2t21)p(t)t(t21))=(ddtp(t))μ(t)+p(t)(ddtμ(t))Isolateddtμ(t)ddtμ(t)=μ(t)(2t21)t(t21)Solve to find the integrating factorμ(t)=1t1tt+1Integrate both sides with respect tot(ddt(p(t)μ(t)))dt=μ(t)t2at21dt+C1Evaluate the integral on the lhsp(t)μ(t)=μ(t)t2at21dt+C1Solve forp(t)p(t)=μ(t)t2at21dt+C1μ(t)Substituteμ(t)=1t1tt+1p(t)=t1tt+1(tat1t+1(t21)dt+C1)Evaluate the integrals on the rhsp(t)=t1tt+1(t1t+1at21+C1)Simplifyp(t)=t+1tt1(t1t+1a+C1(t21))t21
Mathematica. Time used: 0.048 (sec). Leaf size: 23
ode=D[p[t],t]==(p[t]+a*t^3-2*p[t]*t^2 )/(t*(1-t^2)); 
ic={}; 
DSolve[{ode,ic},p[t],t,IncludeSingularSolutions->True]
 
p(t)t(a+c11t2)
Sympy. Time used: 36.674 (sec). Leaf size: 338
from sympy import * 
t = symbols("t") 
a = symbols("a") 
p = Function("p") 
ode = Eq(Derivative(p(t), t) - (a*t**3 - 2*t**2*p(t) + p(t))/(t*(1 - t**2)),0) 
ics = {} 
dsolve(ode,func=p(t),ics=ics)
 
p(t)={C11t2t212t1t2+2itt2121t2t21({tt21for|t2|>1it1t2otherwise)+1t2t21({2tt21+1tt21for|t2|>12it21t2t3t+i1t2t3totherwise)+a1t22t1t2+2itt2121t2t21({tt21for|t2|>1it1t2otherwise)+1t2t21({2tt21+1tt21for|t2|>12it21t2t3t+i1t2t3totherwise)fort>1t<1NaNotherwise