2.1.83 Problem 82

Solved as second order linear constant coeff ode
Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [8795]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 82
Date solved : Sunday, March 30, 2025 at 01:36:47 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

Solved as second order linear constant coeff ode

Time used: 0.158 (sec)

Solve

z+3z+2z=24e3t24e4t

This is second order non-homogeneous ODE. In standard form the ODE is

Az(t)+Bz(t)+Cz(t)=f(t)

Where A=1,B=3,C=2,f(t)=24e3t24e4t. Let the solution be

z=zh+zp

Where zh is the solution to the homogeneous ODE Az(t)+Bz(t)+Cz(t)=0, and zp is a particular solution to the non-homogeneous ODE Az(t)+Bz(t)+Cz(t)=f(t). zh is the solution to

z+3z+2z=0

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

Az(t)+Bz(t)+Cz(t)=0

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

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

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

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

λ1,2=3(2)(1)±1(2)(1)32(4)(1)(2)=32±12

Hence

λ1=32+12λ2=3212

Which simplifies to

λ1=1λ2=2

Since roots are real and distinct, then the solution is

z=c1eλ1t+c2eλ2tz=c1e(1)t+c2e(2)t

Or

z=c1et+c2e2t

Therefore the homogeneous solution zh is

zh=c1et+c2e2t

The particular solution is now found using the method of undetermined coefficients. Looking at the RHS of the ode, which is

24e3t24e4t

Shows that the corresponding undetermined set of the basis functions (UC_set) for the trial solution is

[{e4t},{e3t}]

While the set of the basis functions for the homogeneous solution found earlier is

{e2t,et}

Since there is no duplication between the basis function in the UC_set and the basis functions of the homogeneous solution, the trial solution is a linear combination of all the basis in the UC_set.

zp=A1e4t+A2e3t

The unknowns {A1,A2} are found by substituting the above trial solution zp into the ODE and comparing coefficients. Substituting the trial solution into the ODE and simplifying gives

6A1e4t+2A2e3t=24e3t24e4t

Solving for the unknowns by comparing coefficients results in

[A1=4,A2=12]

Substituting the above back in the above trial solution zp, gives the particular solution

zp=4e4t+12e3t

Therefore the general solution is

z=zh+zp=(c1et+c2e2t)+(4e4t+12e3t)

Will add steps showing solving for IC soon.

Summary of solutions found

z=4e4t+12e3t+c1et+c2e2t
Figure 2.148: Slope field z+3z+2z=24e3t24e4t
Solved as second order ode using Kovacic algorithm

Time used: 0.118 (sec)

Solve

z+3z+2z=24e3t24e4t

Writing the ode as

(1)z+3z+2z=0(2)Az+Bz+Cz=0

Comparing (1) and (2) shows that

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

Applying the Liouville transformation on the dependent variable gives

z(t)=zeB2Adt

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=14

Comparing the above to (5) shows that

s=1t=4

Therefore eq. (4) becomes

(7)z(t)=z4

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

z=zeB2Adt

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.26: 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=14 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)=et2

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

z1=z1e12BAdt=z1e1231dt=z1e3t2=z1(e3t2)

Which simplifies to

z1=e2t

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

z2=z1eBAdtz12dt

Substituting gives

z2=z1e31dt(z1)2dt=z1e3t(z1)2dt=z1(e3te4t)

Therefore the solution is

z=c1z1+c2z2=c1(e2t)+c2(e2t(e3te4t))

This is second order nonhomogeneous ODE. Let the solution be

z=zh+zp

Where zh is the solution to the homogeneous ODE Az(t)+Bz(t)+Cz(t)=0, and zp is a particular solution to the nonhomogeneous ODE Az(t)+Bz(t)+Cz(t)=f(t). zh is the solution to

z+3z+2z=0

The homogeneous solution is found using the Kovacic algorithm which results in

zh=c1e2t+c2et

The particular solution is now found using the method of undetermined coefficients. Looking at the RHS of the ode, which is

24e3t24e4t

Shows that the corresponding undetermined set of the basis functions (UC_set) for the trial solution is

[{e4t},{e3t}]

While the set of the basis functions for the homogeneous solution found earlier is

{e2t,et}

Since there is no duplication between the basis function in the UC_set and the basis functions of the homogeneous solution, the trial solution is a linear combination of all the basis in the UC_set.

zp=A1e4t+A2e3t

The unknowns {A1,A2} are found by substituting the above trial solution zp into the ODE and comparing coefficients. Substituting the trial solution into the ODE and simplifying gives

6A1e4t+2A2e3t=24e3t24e4t

Solving for the unknowns by comparing coefficients results in

[A1=4,A2=12]

Substituting the above back in the above trial solution zp, gives the particular solution

zp=4e4t+12e3t

Therefore the general solution is

z=zh+zp=(c1e2t+c2et)+(4e4t+12e3t)

Will add steps showing solving for IC soon.

Summary of solutions found

z=4e4t+12e3t+c1e2t+c2et
Figure 2.149: Slope field z+3z+2z=24e3t24e4t
Maple. Time used: 0.003 (sec). Leaf size: 30
ode:=diff(diff(z(t),t),t)+3*diff(z(t),t)+2*z(t) = 24*exp(-3*t)-24*exp(-4*t); 
dsolve(ode,z(t), singsol=all);
 
z=e2tc14e4t+12e3t+etc2

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 2; linear nonhomogeneous with symmetry [0,1] 
trying a double symmetry of the form [xi=0, eta=F(x)] 
<- double symmetry of the form [xi=0, eta=F(x)] successful
 

Maple step by step

Let’s solveddtddtz(t)+3ddtz(t)+2z(t)=24e3t24e4tHighest derivative means the order of the ODE is2ddtddtz(t)Characteristic polynomial of homogeneous ODEr2+3r+2=0Factor the characteristic polynomial(r+2)(r+1)=0Roots of the characteristic polynomialr=(2,1)1st solution of the homogeneous ODEz1(t)=e2t2nd solution of the homogeneous ODEz2(t)=etGeneral solution of the ODEz(t)=C1z1(t)+C2z2(t)+zp(t)Substitute in solutions of the homogeneous ODEz(t)=C1e2t+C2et+zp(t)Find a particular solutionzp(t)of the ODEUse variation of parameters to findzpheref(t)is the forcing function[zp(t)=z1(t)z2(t)f(t)W(z1(t),z2(t))dt+z2(t)z1(t)f(t)W(z1(t),z2(t))dt,f(t)=24e3t24e4t]Wronskian of solutions of the homogeneous equationW(z1(t),z2(t))=[e2tet2e2tet]Compute WronskianW(z1(t),z2(t))=e3tSubstitute functions into equation forzp(t)zp(t)=24e2t(e2t+et)dt+24et(e3t+e2t)dtCompute integralszp(t)=4e4t+12e3tSubstitute particular solution into general solution to ODEz(t)=C1e2t+C2et4e4t+12e3t
Mathematica. Time used: 0.19 (sec). Leaf size: 34
ode=D[z[t],{t,2}]+3*D[z[t],t]+2*z[t]==24*(Exp[-3*t]-Exp[-4*t]); 
ic={}; 
DSolve[{ode,ic},z[t],t,IncludeSingularSolutions->True]
 
z(t)e4t(12et+c1e2t+c2e3t4)
Sympy. Time used: 0.286 (sec). Leaf size: 26
from sympy import * 
t = symbols("t") 
z = Function("z") 
ode = Eq(2*z(t) + 3*Derivative(z(t), t) + Derivative(z(t), (t, 2)) - 24*exp(-3*t) + 24*exp(-4*t),0) 
ics = {} 
dsolve(ode,func=z(t),ics=ics)
 
z(t)=(C1+C2et+12e2t4e3t)et