2.2.11 Problem 6 (iv)

Existence and uniqueness analysis
Solved as second order linear constant coeff ode
Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [18446]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 4. Autonomous systems. Exercises at page 69
Problem number : 6 (iv)
Date solved : Saturday, April 26, 2025 at 11:17:30 AM
CAS classification : [[_2nd_order, _missing_x]]

Existence and uniqueness analysis

Solve

x2x+2x=0

With initial conditions

x(0)=0x(0)=1

This is a linear ODE. In canonical form it is written as

x+p(t)x+q(t)x=F

Where here

p(t)=2q(t)=2F=0

Hence the ode is

x2x+2x=0

The domain of p(t)=2 is

{<t<}

And the point t0=0 is inside this domain. The domain of q(t)=2 is

{<t<}

And the point t0=0 is also inside this domain. Hence solution exists and is unique.

Solved as second order linear constant coeff ode

Time used: 0.120 (sec)

Solve

x2x+2x=0

With initial conditions

x(0)=0x(0)=1

This is second order with constant coefficients homogeneous ODE. In standard form the ODE is

Ax(t)+Bx(t)+Cx(t)=0

Where in the above A=1,B=2,C=2. Let the solution be x=eλt. Substituting this into the ODE gives

(1)λ2etλ2λetλ+2etλ=0

Since exponential function is never zero, then dividing Eq(2) throughout by eλt gives

(2)λ22λ+2=0

Equation (2) is the characteristic equation of the ODE. Its roots determine the general solution form.Using the quadratic formula

λ1,2=B2A±12AB24AC

Substituting A=1,B=2,C=2 into the above gives

λ1,2=2(2)(1)±1(2)(1)22(4)(1)(2)=1±i

Hence

λ1=1+iλ2=1i

Which simplifies to

λ1=1+iλ2=1i

Since roots are complex conjugate of each others, then let the roots be

λ1,2=α±iβ

Where α=1 and β=1. Therefore the final solution, when using Euler relation, can be written as

x=eαt(c1cos(βt)+c2sin(βt))

Which becomes

x=et(c1cos(t)+c2sin(t))

Will add steps showing solving for IC soon.

Summary of solutions found

x=etsin(t)
Solution plot Slope field x2x+2x=0
Solved as second order ode using Kovacic algorithm

Time used: 0.250 (sec)

Solve

x2x+2x=0

With initial conditions

x(0)=0x(0)=1

Writing the ode as

(1)x2x+2x=0(2)Ax+Bx+Cx=0

Comparing (1) and (2) shows that

A=1(3)B=2C=2

Applying the Liouville transformation on the dependent variable gives

z(t)=xeB2Adt

Then (2) becomes

(4)z(t)=rz(t)

Where r is given by

(5)r=st=2AB2BA+B24AC4A2

Substituting the values of A,B,C from (3) in the above and simplifying gives

(6)r=11

Comparing the above to (5) shows that

s=1t=1

Therefore eq. (4) becomes

(7)z(t)=z(t)

Equation (7) is now solved. After finding z(t) then x is found using the inverse transformation

x=z(t)eB2Adt

The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases depending on the order of poles of r and the order of r at . The following table summarizes these cases.

Case

Allowed pole order for r

Allowed value for O()

1

{0,1,2,4,6,8,}

{,6,4,2,0,2,3,4,5,6,}

2

Need to have at least one pole that is either order 2 or odd order greater than 2. Any other pole order is allowed as long as the above condition is satisfied. Hence the following set of pole orders are all allowed. {1,2},{1,3},{2},{3},{3,4},{1,2,5}.

no condition

3

{1,2}

{2,3,4,5,6,7,}

Table 2.17: Necessary conditions for each Kovacic case

The order of r at is the degree of t minus the degree of s. Therefore

O()=deg(t)deg(s)=00=0

There are no poles in r. Therefore the set of poles Γ is empty. Since there is no odd order pole larger than 2 and the order at is 0 then the necessary conditions for case one are met. Therefore

L=[1]

Since r=1 is not a function of t, then there is no need run Kovacic algorithm to obtain a solution for transformed ode z=rz as one solution is

z1(t)=cos(t)

Using the above, the solution for the original ode can now be found. The first solution to the original ode in x is found from

x1=z1e12BAdt=z1e1221dt=z1et=z1(et)

Which simplifies to

x1=etcos(t)

The second solution x2 to the original ode is found using reduction of order

x2=x1eBAdtx12dt

Substituting gives

x2=x1e21dt(x1)2dt=x1e2t(x1)2dt=x1(tan(t))

Therefore the solution is

x=c1x1+c2x2=c1(etcos(t))+c2(etcos(t)(tan(t)))

Will add steps showing solving for IC soon.

Summary of solutions found

x=etsin(t)
Solution plot Slope field x2x+2x=0
Maple. Time used: 0.055 (sec). Leaf size: 9
ode:=diff(diff(x(t),t),t)-2*diff(x(t),t)+2*x(t) = 0; 
ic:=x(0) = 0, D(x)(0) = 1; 
dsolve([ode,ic],x(t), singsol=all);
 
x=etsin(t)

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
<- constant coefficients successful
 

Maple step by step

Let’s solve[ddtddtx(t)2ddtx(t)+2x(t)=0,x(0)=0,(ddtx(t))|{t=0}=1]Highest derivative means the order of the ODE is2ddtddtx(t)Characteristic polynomial of ODEr22r+2=0Use quadratic formula to solve forrr=2±(4)2Roots of the characteristic polynomialr=(1I,1+I)1st solution of the ODEx1(t)=etcos(t)2nd solution of the ODEx2(t)=etsin(t)General solution of the ODEx(t)=C1x1(t)+C2x2(t)Substitute in solutionsx(t)=C1etcos(t)+C2etsin(t)Check validity of solutionx(t)=_C1etcos(t)+_C2etsin(t)Use initial conditionx(0)=00=_C1Compute derivative of the solutionddtx(t)=_C1etcos(t)_C1etsin(t)+_C2etsin(t)+_C2etcos(t)Use the initial condition(ddtx(t))|{t=0}=11=_C1+_C2Solve for_C1and_C2{_C1=0,_C2=1}Substitute constant values into general solution and simplifyx(t)=etsin(t)Solution to the IVPx(t)=etsin(t)
Mathematica. Time used: 0.013 (sec). Leaf size: 11
ode=D[x[t],{t,2}]-2*D[x[t],t]+2*x[t]==0; 
ic={x[0]==0,Derivative[1][x][0] == 1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
x(t)etsin(t)
Sympy. Time used: 0.162 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(2*x(t) - 2*Derivative(x(t), t) + Derivative(x(t), (t, 2)),0) 
ics = {x(0): 0, Subs(Derivative(x(t), t), t, 0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
x(t)=etsin(t)