2.1.13 Problem 3 (i)

Solved using first_order_ode_separable
Solved using first_order_ode_exact
Maple
Mathematica
Sympy

Internal problem ID [18429]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 3. Solutions of first-order equations. Exercises at page 47
Problem number : 3 (i)
Date solved : Monday, March 31, 2025 at 05:28:15 PM
CAS classification : [_separable]

Solved using first_order_ode_separable

Time used: 0.073 (sec)

Solve

3t2xtx+(3t3x2+t3x4)x=0

The ode

(1)x=3t1t2x(x2+3)

is separable as it can be written as

x=3t1t2x(x2+3)=f(t)g(x)

Where

f(t)=3t1t2g(x)=1x(x2+3)

Integrating gives

1g(x)dx=f(t)dtx(x2+3)dx=3t1t2dt
(x2+3)24=ln(1t3)1t+c1

Solving for x gives

x=t(3t+2ln(1t3)t2+c1t2t)tx=t(3t+2ln(1t3)t2+c1t2t)tx=t(3t+2ln(1t3)t2+c1t2t)tx=t(3t+2ln(1t3)t2+c1t2t)t

Which simplifies to

x=3t2+2tt(ln(1t3)t+c1t1)tx=3t22tt(ln(1t3)t+c1t1)tx=3t2+2tt(ln(1t3)t+c1t1)tx=3t22tt(ln(1t3)t+c1t1)t
Figure 2.11: Slope field 3t2xtx+(3t3x2+t3x4)x=0

Summary of solutions found

x=3t2+2tt(ln(1t3)t+c1t1)tx=3t22tt(ln(1t3)t+c1t1)tx=3t2+2tt(ln(1t3)t+c1t1)tx=3t22tt(ln(1t3)t+c1t1)t
Solved using first_order_ode_exact

Time used: 0.093 (sec)

Solve

3t2xtx+(3t3x2+t3x4)x=0

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

Therefore

(t2x(x2+3))dx=(3t+1)dt(2A)(3t1)dt+(t2x(x2+3))dx=0

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

M(t,x)=3t1N(t,x)=t2x(x2+3)

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied

Mx=Nt

Using result found above gives

Mx=x(3t1)=0

And

Nt=t(t2x(x2+3))=2tx(x2+3)

Since MxNt, 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(MxNt)=1t2x(x2+3)((0)(2tx(x2+3)))=2t

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

μ=eAdt=e2tdt

The result of integrating gives

μ=e2ln(t)=1t2

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=1t2(3t1)=3t1t2

And

N=μN=1t2(t2x(x2+3))=x(x2+3)

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

M+Ndxdt=0(3t1t2)+(x(x2+3))dxdt=0

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

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

Integrating (1) w.r.t. t gives

ϕtdt=Mdtϕtdt=3t1t2dt(3)ϕ=3ln(t)+1t+f(x)

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

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

But equation (2) says that ϕx=x(x2+3). Therefore equation (4) becomes

(5)x(x2+3)=0+f(x)

Solving equation (5) for f(x) gives

f(x)=x(x2+3)

Integrating the above w.r.t x gives

f(x)dx=(x(x2+3))dxf(x)=(x2+3)24+c2

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

ϕ=3ln(t)+1t+(x2+3)24+c2

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

c2=3ln(t)+1t+(x2+3)24

Solving for x gives

x=t(3t+23ln(t)t2+c2t2t)tx=t(3t+23ln(t)t2+c2t2t)tx=t(3t+23ln(t)t2+c2t2t)tx=t(3t+23ln(t)t2+c2t2t)t

Which simplifies to

x=3t2+2tt(13ln(t)t+c2t)tx=3t22tt(13ln(t)t+c2t)tx=3t2+2tt(13ln(t)t+c2t)tx=3t22tt(13ln(t)t+c2t)t
Figure 2.12: Slope field 3t2xtx+(3t3x2+t3x4)x=0

Summary of solutions found

x=3t2+2tt(13ln(t)t+c2t)tx=3t22tt(13ln(t)t+c2t)tx=3t2+2tt(13ln(t)t+c2t)tx=3t22tt(13ln(t)t+c2t)t
Maple. Time used: 0.010 (sec). Leaf size: 139
ode:=3*x(t)*t^2-t*x(t)+(3*t^3*x(t)^2+t^3*x(t)^4)*diff(x(t),t) = 0; 
dsolve(ode,x(t), singsol=all);
 
x=0x=3t2+2tt(1+3ln(t)t+c1t)tx=3t22tt(1+3ln(t)t+c1t)tx=3t2+2tt(1+3ln(t)t+c1t)tx=3t22tt(1+3ln(t)t+c1t)t

Maple trace

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

Maple step by step

Let’s solve3t2x(t)tx(t)+(3t3x(t)2+t3x(t)4)(ddtx(t))=0Highest derivative means the order of the ODE is1ddtx(t)Solve for the highest derivativeddtx(t)=3t2x(t)+tx(t)3t3x(t)2+t3x(t)4Separate variables(ddtx(t))x(t)(x(t)2+3)=3t1t2Integrate both sides with respect tot(ddtx(t))x(t)(x(t)2+3)dt=3t1t2dt+C1Evaluate integral(x(t)2+3)24=1t3ln(t)+C1Solve forx(t){x(t)=t(3t+23ln(t)t2+C1t2t)t,x(t)=t(3t+23ln(t)t2+C1t2t)t,x(t)=t(3t+23ln(t)t2+C1t2t)t,x(t)=t(3t+23ln(t)t2+C1t2t)t}
Mathematica. Time used: 6.903 (sec). Leaf size: 157
ode=(3*t^2*x[t]-t*x[t])+(3*t^3*x[t]^2+t^3*x[t]^4)*D[x[t],t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
x(t)0x(t)39t12tlog(t)+4c1t4tx(t)39t12tlog(t)+4c1t4tx(t)3+9t12tlog(t)+4c1t4tx(t)3+9t12tlog(t)+4c1t4tx(t)0
Sympy. Time used: 9.627 (sec). Leaf size: 126
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(3*t**2*x(t) - t*x(t) + (t**3*x(t)**4 + 3*t**3*x(t)**2)*Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
[x(t)=3t(C1t12tlog(t)+9t4)t, x(t)=3t(C1t12tlog(t)+9t4)t, x(t)=3+t(C1t12tlog(t)+9t4)t, x(t)=3+t(C1t12tlog(t)+9t4)t, x(t)=0]