2.1.56 Problem 56

Solved as second order ode quadrature
Solved as second order linear constant coeff ode
Solved as second order linear exact ode
Solved as second order missing y ode
Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [8768]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 56
Date solved : Sunday, March 30, 2025 at 01:30:50 PM
CAS classification : [[_2nd_order, _quadrature]]

Solved as second order ode quadrature

Time used: 0.049 (sec)

Solve

y=f(t)

Integrating once gives

y=f(t)dt+c1

Integrating again gives

y=(f(t)dt)dt+c1x+c2

Will add steps showing solving for IC soon.

Summary of solutions found

y=f(t)dtdt+tc1+c2

Solved as second order linear constant coeff ode

Time used: 0.118 (sec)

Solve

y=f(t)

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

Ay(t)+By(t)+Cy(t)=f(t)

Where A=1,B=0,C=0,f(t)=f(t). Let the solution be

y=yh+yp

Where yh is the solution to the homogeneous ODE Ay(t)+By(t)+Cy(t)=0, and yp is a particular solution to the non-homogeneous ODE Ay(t)+By(t)+Cy(t)=f(t). yh is the solution to

y=0

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

Ay(t)+By(t)+Cy(t)=0

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

(1)λ2etλ=0

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

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

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

Hence this is the case of a double root λ1,2=0. Therefore the solution is

(1)y=c11+c2t

Therefore the homogeneous solution yh is

yh=c2t+c1

The particular solution yp can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on t as well. Let

(1)yp(t)=u1y1+u2y2

Where u1,u2 to be determined, and y1,y2 are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as

y1=1y2=t

In the Variation of parameters u1,u2 are found using

(2)u1=y2f(t)aW(t)(3)u2=y1f(t)aW(t)

Where W(t) is the Wronskian and a is the coefficient in front of y in the given ODE. The Wronskian is given by W=|y1y2y1y2|. Hence

W=|1tddt(1)ddt(t)|

Which gives

W=|1t01|

Therefore

W=(1)(1)(t)(0)

Which simplifies to

W=1

Which simplifies to

W=1

Therefore Eq. (2) becomes

u1=tf(t)1dt

Which simplifies to

u1=tf(t)dt

Hence

u1=0tαf(α)dα

And Eq. (3) becomes

u2=f(t)1dt

Which simplifies to

u2=f(t)dt

Hence

u2=0tf(α)dα

Therefore the particular solution, from equation (1) is

yp(t)=0tαf(α)dα+t0tf(α)dα

Therefore the general solution is

y=yh+yp=(c2t+c1)+(0tαf(α)dα+t0tf(α)dα)

Will add steps showing solving for IC soon.

Summary of solutions found

y=0tαf(α)dα+t0tf(α)dα+c2t+c1

Solved as second order linear exact ode

Time used: 0.141 (sec)

Solve

y=f(t)

An ode of the form

p(t)y+q(t)y+r(t)y=s(t)

is exact if

(1)p(t)q(t)+r(t)=0

For the given ode we have

p(x)=1q(x)=0r(x)=0s(x)=f(t)

Hence

p(x)=0q(x)=0

Therefore (1) becomes

0(0)+(0)=0

Hence the ode is exact. Since we now know the ode is exact, it can be written as

(p(t)y+(q(t)p(t))y)=s(x)

Integrating gives

p(t)y+(q(t)p(t))y=s(t)dt

Substituting the above values for p,q,r,s gives

y=f(t)dt

We now have a first order ode to solve which is

y=f(t)dt+c1

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

dy=f(t)dt+c1dty=(f(t)dt+c1)dt+c2
y=(f(t)dt+c1)dt+c2

Will add steps showing solving for IC soon.

Summary of solutions found

y=(f(t)dt+c1)dt+c2

Solved as second order missing y ode

Time used: 0.080 (sec)

Solve

y=f(t)

This is second order ode with missing dependent variable y. Let

u(t)=y

Then

u(t)=y

Hence the ode becomes

u(t)f(t)=0

Which is now solved for u(t) as first order ode.

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

du=f(t)dtu=f(t)dt+c1
u=f(t)dt+c1

In summary, these are the solution found for u(t)

u=f(t)dt+c1

For solution u=f(t)dt+c1, since u=y(t) then we now have a new first order ode to solve which is

y(t)=f(t)dt+c1

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

dy=f(t)dt+c1dty=(f(t)dt+c1)dt+c2
y=(f(t)dt+c1)dt+c2

In summary, these are the solution found for (y)

y=(f(t)dt+c1)dt+c2

Will add steps showing solving for IC soon.

Summary of solutions found

y=(f(t)dt+c1)dt+c2

Solved as second order ode using Kovacic algorithm

Time used: 0.087 (sec)

Solve

y=f(t)

Writing the ode as

(1)y=0(2)Ay+By+Cy=0

Comparing (1) and (2) shows that

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

Applying the Liouville transformation on the dependent variable gives

z(t)=yeB2Adt

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

Comparing the above to (5) shows that

s=0t=1

Therefore eq. (4) becomes

(7)z(t)=0

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

y=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.21: 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)=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 infinity then the necessary conditions for case one are met. Therefore

L=[1]

Since r=0 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)=1

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

y1=z1e12BAdt

Since B=0 then the above reduces to

y1=z1=1

Which simplifies to

y1=1

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

y2=y1eBAdty12dt

Since B=0 then the above becomes

y2=y11y12dt=111dt=1(t)

Therefore the solution is

y=c1y1+c2y2=c1(1)+c2(1(t))

This is second order nonhomogeneous ODE. Let the solution be

y=yh+yp

Where yh is the solution to the homogeneous ODE Ay(t)+By(t)+Cy(t)=0, and yp is a particular solution to the nonhomogeneous ODE Ay(t)+By(t)+Cy(t)=f(t). yh is the solution to

y=0

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

yh=c2t+c1

The particular solution yp can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on t as well. Let

(1)yp(t)=u1y1+u2y2

Where u1,u2 to be determined, and y1,y2 are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as

y1=1y2=t

In the Variation of parameters u1,u2 are found using

(2)u1=y2f(t)aW(t)(3)u2=y1f(t)aW(t)

Where W(t) is the Wronskian and a is the coefficient in front of y in the given ODE. The Wronskian is given by W=|y1y2y1y2|. Hence

W=|1tddt(1)ddt(t)|

Which gives

W=|1t01|

Therefore

W=(1)(1)(t)(0)

Which simplifies to

W=1

Which simplifies to

W=1

Therefore Eq. (2) becomes

u1=tf(t)1dt

Which simplifies to

u1=tf(t)dt

Hence

u1=0tαf(α)dα

And Eq. (3) becomes

u2=f(t)1dt

Which simplifies to

u2=f(t)dt

Hence

u2=0tf(α)dα

Therefore the particular solution, from equation (1) is

yp(t)=0tαf(α)dα+t0tf(α)dα

Therefore the general solution is

y=yh+yp=(c2t+c1)+(0tαf(α)dα+t0tf(α)dα)

Will add steps showing solving for IC soon.

Summary of solutions found

y=0tαf(α)dα+t0tf(α)dα+c2t+c1
Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=diff(diff(y(t),t),t) = f(t); 
dsolve(ode,y(t), singsol=all);
 
y=f(t)dtdt+c1t+c2

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
<- quadrature successful
 

Maple step by step

Let’s solveddtddty(t)=f(t)Highest derivative means the order of the ODE is2ddtddty(t)Characteristic polynomial of homogeneous ODEr2=0Use quadratic formula to solve forrr=0±(0)2Roots of the characteristic polynomialr=01st solution of the homogeneous ODEy1(t)=1Repeated root, multiplyy1(t)bytto ensure linear independencey2(t)=tGeneral solution of the ODEy(t)=C1y1(t)+C2y2(t)+yp(t)Substitute in solutions of the homogeneous ODEy(t)=C1+C2t+yp(t)Find a particular solutionyp(t)of the ODEUse variation of parameters to findypheref(t)is the forcing function[yp(t)=y1(t)y2(t)f(t)W(y1(t),y2(t))dt+y2(t)y1(t)f(t)W(y1(t),y2(t))dt,f(t)=f(t)]Wronskian of solutions of the homogeneous equationW(y1(t),y2(t))=[1t01]Compute WronskianW(y1(t),y2(t))=1Substitute functions into equation foryp(t)yp(t)=tf(t)dt+tf(t)dtCompute integralsyp(t)=tf(t)dt+tf(t)dtSubstitute particular solution into general solution to ODEy(t)=C1+C2ttf(t)dt+tf(t)dt
Mathematica. Time used: 0.011 (sec). Leaf size: 30
ode=D[y[t],{t,2}]==f[t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
y(t)1t1K[2]f(K[1])dK[1]dK[2]+c2t+c1
Sympy. Time used: 0.312 (sec). Leaf size: 19
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-f(t) + Derivative(y(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
y(t)=C1+t(C2+f(t)dt)tf(t)dt