2.1.47 Problem 47

Solved as second order linear exact ode
Solved as second order missing y ode
Solved as second order integrable as is ode
Solved as second order integrable as is ode (ABC method)
Solved as second order ode using non constant coeff transformation on B method
Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [8758]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 47
Date solved : Friday, April 25, 2025 at 05:03:19 PM
CAS classification : [[_2nd_order, _missing_y]]

Solved as second order linear exact ode

Time used: 0.162 (sec)

Solve

ty+4y=t2

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)=tq(x)=4r(x)=0s(x)=t2

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

yt+3y=t2dt

We now have a first order ode to solve which is

yt+3y=t33+c1

In canonical form a linear first order is

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

Comparing the above to the given ode shows that

q(t)=3tp(t)=t3+3c13t

The integrating factor μ is

μ=eqdt=e3tdt=t3

The ode becomes

ddt(μy)=μpddt(μy)=(μ)(t3+3c13t)ddt(yt3)=(t3)(t3+3c13t)d(yt3)=((t3+3c1)t23)dt

Integrating gives

yt3=(t3+3c1)t23dt=(t3+3c1)218+c2

Dividing throughout by the integrating factor t3 gives the final solution

y=(t3+3c1)218+c2t3

Will add steps showing solving for IC soon.

Summary of solutions found

y=(t3+3c1)218+c2t3

Solved as second order missing y ode

Time used: 0.124 (sec)

Solve

ty+4y=t2

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

u(t)=y

Then

u(t)=y

Hence the ode becomes

tu(t)+4u(t)t2=0

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

In canonical form a linear first order is

u+q(t)u=p(t)

Comparing the above to the given ode shows that

q(t)=4tp(t)=t

The integrating factor μ is

μ=eqdt=e4tdt=t4

The ode becomes

ddt(μu)=μpddt(μu)=(μ)(t)ddt(ut4)=(t4)(t)d(ut4)=t5dt

Integrating gives

ut4=t5dt=t66+c1

Dividing throughout by the integrating factor t4 gives the final solution

u=t6+6c16t4

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

u=t6+6c16t4

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

y(t)=t6+6c16t4

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

dy=t6+6c16t4dty=t318c13t3+c2

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

y=t318c13t3+c2

Summary of solutions found

y=t318c13t3+c2

Solved as second order integrable as is ode

Time used: 0.167 (sec)

Solve

ty+4y=t2

Integrating both sides of the ODE w.r.t t gives

(ty+4y)dt=t2dtyt+3y=t33+c1

Which is now solved for y. In canonical form a linear first order is

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

Comparing the above to the given ode shows that

q(t)=3tp(t)=t3+3c13t

The integrating factor μ is

μ=eqdt=e3tdt=t3

The ode becomes

ddt(μy)=μpddt(μy)=(μ)(t3+3c13t)ddt(yt3)=(t3)(t3+3c13t)d(yt3)=((t3+3c1)t23)dt

Integrating gives

yt3=(t3+3c1)t23dt=(t3+3c1)218+c2

Dividing throughout by the integrating factor t3 gives the final solution

y=(t3+3c1)218+c2t3

Will add steps showing solving for IC soon.

Summary of solutions found

y=(t3+3c1)218+c2t3

Solved as second order integrable as is ode (ABC method)

Time used: 0.064 (sec)

Solve

ty+4y=t2

Writing the ode as

ty+4y=t2

Integrating both sides of the ODE w.r.t t gives

(ty+4y)dt=t2dtyt+3y=t33+c1

Which is now solved for y. In canonical form a linear first order is

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

Comparing the above to the given ode shows that

q(t)=3tp(t)=t3+3c13t

The integrating factor μ is

μ=eqdt=e3tdt=t3

The ode becomes

ddt(μy)=μpddt(μy)=(μ)(t3+3c13t)ddt(yt3)=(t3)(t3+3c13t)d(yt3)=((t3+3c1)t23)dt

Integrating gives

yt3=(t3+3c1)t23dt=(t3+3c1)218+c2

Dividing throughout by the integrating factor t3 gives the final solution

y=(t3+3c1)218+c2t3

In canonical form a linear first order is

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

Comparing the above to the given ode shows that

q(t)=3tp(t)=t3+3c13t

The integrating factor μ is

μ=eqdt=e3tdt=t3

The ode becomes

ddt(μy)=μpddt(μy)=(μ)(t3+3c13t)ddt(yt3)=(t3)(t3+3c13t)d(yt3)=((t3+3c1)t23)dt

Integrating gives

yt3=(t3+3c1)t23dt=(t3+3c1)218+c2

Dividing throughout by the integrating factor t3 gives the final solution

y=(t3+3c1)218+c2t3

Will add steps showing solving for IC soon.

Solved as second order ode using non constant coeff transformation on B method

Time used: 0.151 (sec)

Solve

ty+4y=t2

Given an ode of the form

Ay+By+Cy=F(t)

This method reduces the order ode the ODE by one by applying the transformation

y=Bv

This results in

y=Bv+vBy=Bv+Bv+vB+vB=vB+2v+B+Bv

And now the original ode becomes

A(vB+2vB+Bv)+B(Bv+vB)+CBv=0(1)ABv+(2AB+B2)v+(AB+BB+CB)v=0

If the term AB+BB+CB is zero, then this method works and can be used to solve

ABv+(2AB+B2)v=0

By Using u=v which reduces the order of the above ode to one. The new ode is

ABu+(2AB+B2)u=0

The above ode is first order ode which is solved for u. Now a new ode v=u is solved for v as first order ode. Then the final solution is obtain from y=Bv.

This method works only if the term AB+BB+CB is zero. The given ODE shows that

A=tB=4C=0F=t2

The above shows that for this ode

AB+BB+CB=(t)(0)+(4)(0)+(0)(4)=0

Hence the ode in v given in (1) now simplifies to

4tv+(16)v=0

Now by applying v=u the above becomes

4tu(t)+16u(t)=0

Which is now solved for u. In canonical form a linear first order is

u+q(t)u=p(t)

Comparing the above to the given ode shows that

q(t)=4tp(t)=0

The integrating factor μ is

μ=eqdt=e4tdt=t4

The ode becomes

ddtμu=0ddt(ut4)=0

Integrating gives

ut4=0dt+c1=c1

Dividing throughout by the integrating factor t4 gives the final solution

u=c1t4

The ode for v now becomes

v(t)=c1t4

Which is now solved for v. Since the ode has the form v=f(t), then we only need to integrate f(t).

dv=c1t4dtv=c13t3+c2

Replacing v above by y(t)4, then the homogeneous solution is

yh(t)=Bv=4(3c2t3+c1)3t3

And now the particular solution yp(t) will be found. 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=4y2=1t3

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=|41t3ddt(4)ddt(1t3)|

Which gives

W=|41t303t4|

Therefore

W=(4)(3t4)(1t3)(0)

Which simplifies to

W=12t4

Which simplifies to

W=12t4

Therefore Eq. (2) becomes

u1=1t12t3dt

Which simplifies to

u1=t212dt

Hence

u1=t336

And Eq. (3) becomes

u2=4t212t3dt

Which simplifies to

u2=t53dt

Hence

u2=t618

Therefore the particular solution, from equation (1) is

yp(t)=t318

Hence the complete solution is

y(t)=yh+yp=(4(3c2t3+c1)3t3)+(t318)=t6+72c2t324c118t3

Will add steps showing solving for IC soon.

Summary of solutions found

y(t)=t6+72c2t324c118t3

Solved as second order ode using Kovacic algorithm

Time used: 0.245 (sec)

Solve

ty+4y=t2

Writing the ode as

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

Comparing (1) and (2) shows that

A=t(3)B=4C=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=2t2

Comparing the above to (5) shows that

s=2t=t2

Therefore eq. (4) becomes

(7)z(t)=(2t2)z(t)

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.13: 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)=20=2

The poles of r in eq. (7) and the order of each pole are determined by solving for the roots of t=t2. There is a pole at t=0 of order 2. Since there is no odd order pole larger than 2 and the order at is 2 then the necessary conditions for case one are met. Since there is a pole of order 2 then necessary conditions for case two are met. Since pole order is not larger than 2 and the order at is 2 then the necessary conditions for case three are met. Therefore

L=[1,2,4,6,12]

Attempting to find a solution using case n=1.

Looking at poles of order 2. The partial fractions decomposition of r is

r=2t2

For the pole at t=0 let b be the coefficient of 1t2 in the partial fractions decomposition of r given above. Therefore b=2. Hence

[r]c=0αc+=12+1+4b=2αc=121+4b=1

Since the order of r at is 2 then [r]=0. Let b be the coefficient of 1t2 in the Laurent series expansion of r at . which can be found by dividing the leading coefficient of s by the leading coefficient of t from

r=st=2t2

Since the gcd(s,t)=1. This gives b=2. Hence

[r]=0α+=12+1+4b=2α=121+4b=1

The following table summarizes the findings so far for poles and for the order of r at where r is

r=2t2

pole c location pole order [r]c αc+ αc
0 2 0 2 1

Order of r at [r] α+ α
2 0 2 1

Now that the all [r]c and its associated αc± have been determined for all the poles in the set Γ and [r] and its associated α± have also been found, the next step is to determine possible non negative integer d from these using

d=αs()cΓαcs(c)

Where s(c) is either + or and s() is the sign of α±. This is done by trial over all set of families s=(s(c))cΓ until such d is found to work in finding candidate ω. Trying α=1 then

d=α(αc1)=1(1)=0

Since d an integer and d0 then it can be used to find ω using

ω=cΓ(s(c)[r]c+αcs(c)tc)+s()[r]

The above gives

ω=(()[r]c1+αc1tc1)+()[r]=1t+()(0)=1t=1t

Now that ω is determined, the next step is find a corresponding minimal polynomial p(t) of degree d=0 to solve the ode. The polynomial p(t) needs to satisfy the equation

(1A)p+2ωp+(ω+ω2r)p=0

Let

(2A)p(t)=1

Substituting the above in eq. (1A) gives

(0)+2(1t)(0)+((1t2)+(1t)2(2t2))=00=0

The equation is satisfied since both sides are zero. Therefore the first solution to the ode z=rz is

z1(t)=peωdt=e1tdt=1t

The first solution to the original ode in y is found from

y1=z1e12BAdt=z1e124tdt=z1e2ln(t)=z1(1t2)

Which simplifies to

y1=1t3

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

y2=y1eBAdty12dt

Substituting gives

y2=y1e4tdt(y1)2dt=y1e4ln(t)(y1)2dt=y1(t33)

Therefore the solution is

y=c1y1+c2y2=c1(1t3)+c2(1t3(t33))

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

ty+4y=0

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

yh=c1t3+c23

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=1t3y2=13

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=|1t313ddt(1t3)ddt(13)|

Which gives

W=|1t3133t40|

Therefore

W=(1t3)(0)(13)(3t4)

Which simplifies to

W=1t4

Which simplifies to

W=1t4

Therefore Eq. (2) becomes

u1=t231t3dt

Which simplifies to

u1=t53dt

Hence

u1=t618

And Eq. (3) becomes

u2=1t1t3dt

Which simplifies to

u2=t2dt

Hence

u2=t33

Therefore the particular solution, from equation (1) is

yp(t)=t318

Therefore the general solution is

y=yh+yp=(c1t3+c23)+(t318)

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1t3+c23+t318
Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=diff(diff(y(t),t),t)*t+4*diff(y(t),t) = t^2; 
dsolve(ode,y(t), singsol=all);
 
y=t318c13t3+c2

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
-> Calling odsolve with the ODE, diff(_b(_a),_a) = -(-_a^2+4*_b(_a))/_a, _b(_a) 
   *** Sublevel 2 *** 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   <- 1st order linear successful 
<- high order exact linear fully integrable successful
 

Maple step by step

Let’s solvet(ddtddty(t))+4ddty(t)=t2Highest derivative means the order of the ODE is2ddtddty(t)Make substitutionu=ddty(t)to reduce order of ODEt(ddtu(t))+4u(t)=t2Solve for the highest derivativeddtu(t)=4u(t)+t2tCollect w.r.t.u(t)and simplifyddtu(t)=4u(t)t+tGroup terms withu(t)on the lhs of the ODE and the rest on the rhs of the ODEddtu(t)+4u(t)t=tThe ODE is linear; multiply by an integrating factorμ(t)μ(t)(ddtu(t)+4u(t)t)=μ(t)tAssume the lhs of the ODE is the total derivativeddt(u(t)μ(t))μ(t)(ddtu(t)+4u(t)t)=(ddtu(t))μ(t)+u(t)(ddtμ(t))Isolateddtμ(t)ddtμ(t)=4μ(t)tSolve to find the integrating factorμ(t)=t4Integrate both sides with respect tot(ddt(u(t)μ(t)))dt=μ(t)tdt+C1Evaluate the integral on the lhsu(t)μ(t)=μ(t)tdt+C1Solve foru(t)u(t)=μ(t)tdt+C1μ(t)Substituteμ(t)=t4u(t)=t5dt+C1t4Evaluate the integrals on the rhsu(t)=t66+C1t4Simplifyu(t)=t6+6C16t4Solve 1st ODE foru(t)u(t)=t6+6C16t4Make substitutionu=ddty(t)ddty(t)=t6+6C16t4Integrate both sides to solve fory(t)(ddty(t))dt=t6+6C16t4dt+C2Compute integralsy(t)=t318C13t3+C2
Mathematica. Time used: 0.034 (sec). Leaf size: 24
ode=t*D[y[t],{t,2}]+4*D[y[t],t]==t^2; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
y(t)t318c13t3+c2
Sympy. Time used: 0.208 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t**2 + t*Derivative(y(t), (t, 2)) + 4*Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
y(t)=C1+C2t3+t318