2.2.3 Problem 3

Solved as second order Euler type ode
Solved as second order solved by an integrating factor
Solved as second order ode using change of variable on x method 2
Solved as second order ode using change of variable on x method 1
Solved as second order ode using change of variable on y method 1
Solved as second order ode using change of variable on y method 2
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 [18445]
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 : 3
Date solved : Monday, March 31, 2025 at 05:29:30 PM
CAS classification : [[_Emden, _Fowler], [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

Solved as second order Euler type ode

Time used: 0.068 (sec)

Solve

t2x2tx+2x=0

This is Euler second order ODE. Let the solution be x=tr, then x=rtr1 and x=r(r1)tr2. Substituting these back into the given ODE gives

t2(r(r1))tr22trtr1+2tr=0

Simplifying gives

r(r1)tr2rtr+2tr=0

Since tr0 then dividing throughout by tr gives

r(r1)2r+2=0

Or

(1)r23r+2=0

Equation (1) is the characteristic equation. Its roots determine the form of the general solution. Using the quadratic equation the roots are

r1=1r2=2

Since the roots are real and distinct, then the general solution is

x=c1x1+c2x2

Where x1=tr1 and x2=tr2. Hence

x=c2t2+c1t

Will add steps showing solving for IC soon.

Summary of solutions found

x=c2t2+c1t

Solved as second order solved by an integrating factor

Time used: 0.030 (sec)

Solve

t2x2tx+2x=0

The ode satisfies this form

x+p(t)x+(p(t)+p(t)2)x2=f(t)

Where p(t)=2t. Therefore, there is an integrating factor given by

M(x)=e12pdx=e2tdx=1t

Multiplying both sides of the ODE by the integrating factor M(x) makes the left side of the ODE a complete differential

(M(x)x)=0(xt)=0

Integrating once gives

(xt)=c1

Integrating again gives

(xt)=c1t+c2

Hence the solution is

x=c1t+c21t

Or

x=t2c1+c2t

Will add steps showing solving for IC soon.

Summary of solutions found

x=t2c1+c2t

Solved as second order ode using change of variable on x method 2

Time used: 0.122 (sec)

Solve

t2x2tx+2x=0

In normal form the ode

(1)t2x2tx+2x=0

Becomes

(2)x+p(t)x+q(t)x=0

Where

p(t)=2tq(t)=2t2

Applying change of variables τ=g(t) to (2) gives

(3)d2dτ2x(τ)+p1(ddτx(τ))+q1x(τ)=0

Where τ is the new independent variable, and

(4)p1(τ)=τ(t)+p(t)τ(t)τ(t)2(5)q1(τ)=q(t)τ(t)2

Let p1=0. Eq (4) simplifies to

τ(t)+p(t)τ(t)=0

This ode is solved resulting in

τ=ep(t)dtdt=e2tdtdt=e2ln(t)dt=t2dt(6)=t33

Using (6) to evaluate q1 from (5) gives

q1(τ)=q(t)τ(t)2=2t2t4(7)=2t6

Substituting the above in (3) and noting that now p1=0 results in

d2dτ2x(τ)+q1x(τ)=0d2dτ2x(τ)+2x(τ)t6=0

But in terms of τ

2t6=29τ2

Hence the above ode becomes

d2dτ2x(τ)+2x(τ)9τ2=0

The above ode is now solved for x(τ). This is Euler second order ODE. Let the solution be x=τr, then x=rτr1 and x=r(r1)τr2. Substituting these back into the given ODE gives

9τ2(r(r1))τr2+0rτr1+2τr=0

Simplifying gives

9r(r1)τr+0τr+2τr=0

Since τr0 then dividing throughout by τr gives

9r(r1)+0+2=0

Or

(1)9r29r+2=0

Equation (1) is the characteristic equation. Its roots determine the form of the general solution. Using the quadratic equation the roots are

r1=13r2=23

Since the roots are real and distinct, then the general solution is

x=c1x1+c2x2

Where x1=τr1 and x2=τr2. Hence

x=c1τ1/3+c2τ2/3

Will add steps showing solving for IC soon.

The above solution is now transformed back to x(t) using (6) which results in

x(t)=c132/3(t3)1/33+c231/3(t3)2/33

Will add steps showing solving for IC soon.

Summary of solutions found

x(t)=c132/3(t3)1/33+c231/3(t3)2/33

Solved as second order ode using change of variable on x method 1

Time used: 0.253 (sec)

Solve

t2x2tx+2x=0

In normal form the ode

(1)t2x2tx+2x=0

Becomes

(2)x+p(t)x+q(t)x=0

Where

p(t)=2tq(t)=2t2

Applying change of variables τ=g(t) to (2) results

(3)d2dτ2x(τ)+p1(ddτx(τ))+q1x(τ)=0

Where τ is the new independent variable, and

(4)p1(τ)=τ(t)+p(t)τ(t)τ(t)2(5)q1(τ)=q(t)τ(t)2

Let q1=c2 where c is some constant. Therefore from (5)

τ=1cq(6)=21t2cτ=2c1t2t3

Substituting the above into (4) results in

p1(τ)=τ(t)+p(t)τ(t)τ(t)2=2c1t2t32t21t2c(21t2c)2=3c22

Therefore ode (3) now becomes

x(τ)+p1x(τ)+q1x(τ)=0(7)d2dτ2x(τ)3c2(ddτx(τ))2+c2x(τ)=0

The above ode is now solved for x(τ). Since the ode is now constant coefficients, it can be easily solved to give

x(τ)=e32cτ4(c1cosh(2cτ4)+ic2sinh(2cτ4))

Now from (6)

τ=1cqdt=21t2dtc=2ln(t)c

Substituting the above into the solution obtained gives

x=t3/2(c1cosh(ln(t)2)+ic2sinh(ln(t)2))

Will add steps showing solving for IC soon.

Summary of solutions found

x=t3/2(c1cosh(ln(t)2)+ic2sinh(ln(t)2))

Solved as second order ode using change of variable on y method 1

Time used: 0.074 (sec)

Solve

t2x2tx+2x=0

In normal form the given ode is written as

(2)x+p(t)x+q(t)x=0

Where

p(t)=2tq(t)=2t2

Calculating the Liouville ode invariant Q given by

Q=qp2p24=2t2(2t)2(2t)24=2t2(2t2)2(4t2)4=2t2(1t2)1t2=0

Since the Liouville ode invariant does not depend on the independent variable t then the transformation

(3)x=v(t)z(t)

is used to change the original ode to a constant coefficients ode in v. In (3) the term z(t) is given by

z(t)=ep(t)2dt=e2t2(5)=t

Hence (3) becomes

(4)x=v(t)t

Applying this change of variable to the original ode results in

t3v(t)=0

Which is now solved for v(t).

The above ode can be simplified to

v(t)=0

Integrating twice gives the solution

v=c1t+c2

Will add steps showing solving for IC soon.

Now that v is known, then

x(t)=vz(t)(7)=(tc1+c2)(z(t))

But from (5)

z(t)=t

Hence (7) becomes

x(t)=(tc1+c2)t

Will add steps showing solving for IC soon.

Summary of solutions found

x(t)=(tc1+c2)t

Solved as second order ode using change of variable on y method 2

Time used: 0.126 (sec)

Solve

t2x2tx+2x=0

In normal form the ode

(1)t2x2tx+2x=0

Becomes

(2)x+p(t)x+q(t)x=0

Where

p(t)=2tq(t)=2t2

Applying change of variables on the depndent variable x=v(t)tn to (2) gives the following ode where the dependent variables is v(t) and not x.

(3)v(t)+(2nt+p)v(t)+(n(n1)t2+npt+q)v(t)=0

Let the coefficient of v(t) above be zero. Hence

(4)n(n1)t2+npt+q=0

Substituting the earlier values found for p(t) and q(t) into (4) gives

(5)n(n1)t22nt2+2t2=0

Solving (5) for n gives

(6)n=2

Substituting this value in (3) gives

v(t)+2v(t)t=0(7)v(t)+2v(t)t=0

Using the substitution

u(t)=v(t)

Then (7) becomes

(8)u(t)+2u(t)t=0

The above is now solved for u(t). The ode

(1)u=2ut

is separable as it can be written as

u=2ut=f(t)g(u)

Where

f(t)=2tg(u)=u

Integrating gives

1g(u)du=f(t)dt1udu=2tdt
ln(u)=ln(1t2)+c1

Taking the exponential of both sides the solution becomes

u=c1t2

We now need to find the singular solutions, these are found by finding for what values g(u) is zero, since we had to divide by this above. Solving g(u)=0 or

u=0

for u gives

u=0

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

u=0u=c1t2

Now that u is known, then

v(t)=uv(t)=udt+c2=c1t+c2

Hence

x(t)=v(t)tn=(c1t+c2)t2=(c2tc1)t

Will add steps showing solving for IC soon.

Summary of solutions found

x(t)=(c1t+c2)t2

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

Time used: 0.143 (sec)

Solve

t2x2tx+2x=0

Given an ode of the form

Ax+Bx+Cx=F(t)

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

x=Bv

This results in

x=Bv+vBx=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 x=Bv.

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

A=t2B=2tC=2F=0

The above shows that for this ode

AB+BB+CB=(t2)(0)+(2t)(2)+(2)(2t)=0

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

2t3v+(0)v=0

Now by applying v=u the above becomes

2t3u(t)=0

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

du=0dt+c1u=c1

The ode for v now becomes

v(t)=c1

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

dv=c1dtv=c1t+c2

Replacing v above by x(t)2t, then the solution becomes

x(t)=Bv=2(c1t+c2)t

Will add steps showing solving for IC soon.

Summary of solutions found

x(t)=2(c1t+c2)t

Solved as second order ode using Kovacic algorithm

Time used: 0.048 (sec)

Solve

t2x2tx+2x=0

Writing the ode as

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

Comparing (1) and (2) shows that

A=t2(3)B=2tC=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=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 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.9: 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 x is found from

x1=z1e12BAdt=z1e122tt2dt=z1eln(t)=z1(t)

Which simplifies to

x1=t

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

x2=x1eBAdtx12dt

Substituting gives

x2=x1e2tt2dt(x1)2dt=x1e2ln(t)(x1)2dt=x1(t)

Therefore the solution is

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

Will add steps showing solving for IC soon.

Summary of solutions found

x=c2t2+c1t
Maple. Time used: 0.002 (sec). Leaf size: 11
ode:=t^2*diff(diff(x(t),t),t)-2*diff(x(t),t)*t+2*x(t) = 0; 
dsolve(ode,x(t), singsol=all);
 
x=t(c2t+c1)

Maple trace

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

Maple step by step

Let’s solvet2(ddtddtx(t))2t(ddtx(t))+2x(t)=0Highest derivative means the order of the ODE is2ddtddtx(t)Isolate 2nd derivativeddtddtx(t)=2x(t)t2+2(ddtx(t))tGroup terms withx(t)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddtddtx(t)2(ddtx(t))t+2x(t)t2=0Multiply by denominators of the ODEt2(ddtddtx(t))2t(ddtx(t))+2x(t)=0Make a change of variabless=ln(t)Substitute the change of variables back into the ODECalculate the1stderivative ofxwith respect tot, using the chain ruleddtx(t)=(ddsx(s))(ddts(t))Compute derivativeddtx(t)=ddsx(s)tCalculate the2ndderivative ofxwith respect tot, using the chain ruleddtddtx(t)=(ddsddsx(s))(ddts(t))2+(ddtddts(t))(ddsx(s))Compute derivativeddtddtx(t)=ddsddsx(s)t2ddsx(s)t2Substitute the change of variables back into the ODEt2(ddsddsx(s)t2ddsx(s)t2)2ddsx(s)+2x(s)=0Simplifyddsddsx(s)3ddsx(s)+2x(s)=0Characteristic polynomial of ODEr23r+2=0Factor the characteristic polynomial(r1)(r2)=0Roots of the characteristic polynomialr=(1,2)1st solution of the ODEx1(s)=es2nd solution of the ODEx2(s)=e2sGeneral solution of the ODEx(s)=C1x1(s)+C2x2(s)Substitute in solutionsx(s)=C1es+C2e2sChange variables back usings=ln(t)x(t)=C2t2+C1tSimplifyx(t)=t(C2t+C1)
Mathematica. Time used: 0.111 (sec). Leaf size: 133
ode=t^2*D[x[t],{t,2}]-2*D[x[t],t]+2*x[t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
x(t)212i(7i)t12i72(c2ti7Hypergeometric1F1(12i72,1i7,2t)+2i7c1Hypergeometric1F1(12i(i+7),1+i7,2t))
Sympy. Time used: 0.144 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t**2*Derivative(x(t), (t, 2)) - 2*t*Derivative(x(t), t) + 2*x(t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
x(t)=t(C1+C2t)