2.2.9 Problem 6 (ii)

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 [18451]
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 (ii)
Date solved : Monday, March 31, 2025 at 05:29:39 PM
CAS classification : [[_2nd_order, _missing_x]]

Existence and uniqueness analysis

Solve

x+x=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)=0q(t)=1F=0

Hence the ode is

x+x=0

The domain of p(t)=0 is

{<t<}

And the point t0=0 is inside this domain. The domain of q(t)=1 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.102 (sec)

Solve

x+x=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=0,C=1. Let the solution be x=eλt. Substituting this into the ODE gives

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

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

(2)λ2+1=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=0,C=1 into the above gives

λ1,2=0(2)(1)±1(2)(1)02(4)(1)(1)=±i

Hence

λ1=+iλ2=i

Which simplifies to

λ1=iλ2=i

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

λ1,2=α±iβ

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

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

Which becomes

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

Or

x=c1cos(t)+c2sin(t)

Will add steps showing solving for IC soon.

Summary of solutions found

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

Time used: 0.144 (sec)

Solve

x+x=0

With initial conditions

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

Writing the ode as

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

Comparing (1) and (2) shows that

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

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.15: 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

Since B=0 then the above reduces to

x1=z1=cos(t)

Which simplifies to

x1=cos(t)

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

x2=x1eBAdtx12dt

Since B=0 then the above becomes

x2=x11x12dt=cos(t)1cos(t)2dt=cos(t)(tan(t))

Therefore the solution is

x=c4x1+c5x2=c4(cos(t))+c5(cos(t)(tan(t)))

Will add steps showing solving for IC soon.

Summary of solutions found

x=sin(t)
Solution plot Slope field x+x=0
Maple. Time used: 0.033 (sec). Leaf size: 6
ode:=diff(diff(x(t),t),t)+x(t) = 0; 
ic:=x(0) = 0, D(x)(0) = 1; 
dsolve([ode,ic],x(t), singsol=all);
 
x=sin(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)+x(t)=0,x(0)=0,(ddtx(t))|{t=0}=1]Highest derivative means the order of the ODE is2ddtddtx(t)Characteristic polynomial of ODEr2+1=0Use quadratic formula to solve forrr=0±(4)2Roots of the characteristic polynomialr=(I,I)1st solution of the ODEx1(t)=cos(t)2nd solution of the ODEx2(t)=sin(t)General solution of the ODEx(t)=C1x1(t)+C2x2(t)Substitute in solutionsx(t)=C1cos(t)+C2sin(t)Check validity of solutionx(t)=_C1cos(t)+_C2sin(t)Use initial conditionx(0)=00=_C1Compute derivative of the solutionddtx(t)=_C1sin(t)+_C2cos(t)Use the initial condition(ddtx(t))|{t=0}=11=_C2Solve for_C1and_C2{_C1=0,_C2=1}Substitute constant values into general solution and simplifyx(t)=sin(t)Solution to the IVPx(t)=sin(t)
Mathematica. Time used: 0.01 (sec). Leaf size: 7
ode=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)sin(t)
Sympy. Time used: 0.060 (sec). Leaf size: 5
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(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)=sin(t)