2.1.11 Problem 2 (v)

Existence and uniqueness analysis
Solved using first_order_ode_autonomous
Solved using first_order_ode_bernoulli
Solved using first_order_ode_exact
Solved using first_order_ode_dAlembert
Maple
Mathematica
Sympy

Internal problem ID [18427]
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 : 2 (v)
Date solved : Monday, March 31, 2025 at 05:28:08 PM
CAS classification : [_quadrature]

Existence and uniqueness analysis

Solve

x=2x

With initial conditions

x(0)=1

This is non linear first order ODE. In canonical form it is written as

x=f(t,x)=2x

The x domain of f(t,x) when t=0 is

{0x}

And the point x0=1 is inside this domain. Now we will look at the continuity of

fx=x(2x)=1x

The x domain of fx when t=0 is

{0<x}

And the point x0=1 is inside this domain. Therefore solution exists and is unique.

Solved using first_order_ode_autonomous

Time used: 0.129 (sec)

Solve

x=2x

With initial conditions

x(0)=1

Integrating gives

12xdx=dtx=t+c1

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 the constant of integration from initial conditions, the solution becomes

x=t+1

Solving for x gives

x=t2+2t+1

Which simplifies to

x=(t+1)2
Figure 2.6: Solution plot

Summary of solutions found

x=(t+1)2
Solved using first_order_ode_bernoulli

Time used: 0.116 (sec)

Solve

x=2x

With initial conditions

x(0)=1

In canonical form, the ODE is

x=F(t,x)=2x

This is a Bernoulli ODE.

(1)x=(2)x

The standard Bernoulli ODE has the form

(2)x=f0(t)x+f1(t)xn

Comparing this to (1) shows that

f0=0f1=2

The first step is to divide the above equation by xn which gives

(3)xxn=f1(t)

The next step is use the substitution v=x1n in equation (3) which generates a new ODE in v(t) which will be linear and can be easily solved using an integrating factor. Backsubstitution then gives the solution x(t) which is what we want.

This method is now applied to the ODE at hand. Comparing the ODE (1) With (2) Shows that

f0(t)=0f1(t)=2n=12

Dividing both sides of ODE (1) by xn=x gives

(4)x1x=0+2

Let

v=x1n(5)=x

Taking derivative of equation (5) w.r.t t gives

(6)v=12xx

Substituting equations (5) and (6) into equation (4) gives

2v(t)=2(7)v=1

The above now is a linear ODE in v(t) which is now solved.

Since the ode has the form v(t)=f(t), then we only need to integrate f(t).

dv=1dtv(t)=t+c2

The substitution v=x1n is now used to convert the above solution back to x which results in

x=t+c2

Solving for the constant of integration from initial conditions, the solution becomes

x=t+1

Solving for x gives

x=t2+2t+1

Which simplifies to

x=(t+1)2
Figure 2.7: Solution plot

Summary of solutions found

x=(t+1)2
Solved using first_order_ode_exact

Time used: 0.078 (sec)

Solve

x=2x

With initial conditions

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

Therefore

dx=(2x)dt(2A)(2x)dt+dx=0

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

M(t,x)=2xN(t,x)=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

Mx=Nt

Using result found above gives

Mx=x(2x)=1x

And

Nt=t(1)=0

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

Since A depends on x, it can not be used to obtain an integrating factor. We will now try a second method to find an integrating factor. Let

B=1M(NtMx)=12x((0)(1x))=12x

Since B does not depend on t, it can be used to obtain an integrating factor. Let the integrating factor be μ. Then

μ=eBdx=e12xdx

The result of integrating gives

μ=eln(x)2=1x

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

M=μM=1x(2x)=2

And

N=μN=1x(1)=1x

So now a modified ODE is obtained from the original ODE which will be exact and can be solved using the standard method. The modified ODE is

M+Ndxdt=0(2)+(1x)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=2dt(3)ϕ=2t+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=1x. Therefore equation (4) becomes

(5)1x=0+f(x)

Solving equation (5) for f(x) gives

f(x)=1x

Integrating the above w.r.t x gives

f(x)dx=(1x)dxf(x)=2x+c3

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

ϕ=2t+2x+c3

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

c3=2t+2x

Solving for the constant of integration from initial conditions, the solution becomes

2t+2x=2

Solving for x gives

x=t2+2t+1

Which simplifies to

x=(t+1)2
Figure 2.8: Solution plot

Summary of solutions found

x=(t+1)2
Solved using first_order_ode_dAlembert

Time used: 0.083 (sec)

Solve

x=2x

With initial conditions

x(0)=1

Let p=x the ode becomes

p=2x

Solving for x from the above results in

(1)x=p24

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

Hence (2) becomes

(2A)p=pp(t)2

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

p=0

No valid singular solutions found.

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

(3)p(t)=2

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

Since the ode has the form p(t)=f(t), then we only need to integrate f(t).

dp=2dtp(t)=2t+c5

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

x=(2t+c5)24

Solving for the constant of integration from initial conditions gives

x=(2t2)24x=(2t+2)24

Which simplifies to

x=(t1)2x=(t+1)2

The solution

x=(t1)2

was found not to satisfy the ode or the IC. Hence it is removed.

Figure 2.9: Solution plot

Summary of solutions found

x=(t+1)2
Maple. Time used: 0.049 (sec). Leaf size: 9
ode:=diff(x(t),t) = 2*x(t)^(1/2); 
ic:=x(0) = 1; 
dsolve([ode,ic],x(t), singsol=all);
 
x=(t+1)2

Maple trace

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

Maple step by step

Let’s solve[ddtx(t)=2x(t),x(0)=1]Highest derivative means the order of the ODE is1ddtx(t)Solve for the highest derivativeddtx(t)=2x(t)Separate variablesddtx(t)x(t)=2Integrate both sides with respect totddtx(t)x(t)dt=2dt+C1Evaluate integral2x(t)=2t+C1Solve forx(t)x(t)=t2+tC1+14C12Simplifyx(t)=(t+C12)2Redefine the integration constant(s)x(t)=(t+C1)2Use initial conditionx(0)=11=C12Solve for_C1{C1=1,C1=1}RemovesolutionsthatdontsatisfytheODESolution does not satisfy initial condition
Mathematica. Time used: 0.003 (sec). Leaf size: 10
ode=D[x[t],t]==2*Sqrt[x[t]]; 
ic={x[0]==1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
x(t)(t+1)2
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-2*sqrt(x(t)) + Derivative(x(t), t),0) 
ics = {x(0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants