2.5.14 Problem 14

Maple
Mathematica
Sympy

Internal problem ID [8975]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 14
Date solved : Sunday, March 30, 2025 at 01:57:40 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

Solve

y+y+y=1x

Using series expansion around x=0

The type of the expansion point is first determined. This is done on the homogeneous part of the ODE.

y+y+y=0

The following is summary of singularities for the above ode. Writing the ode as

y+p(x)y+q(x)y=0

Where

p(x)=1q(x)=1
Table 2.124: Table p(x),q(x) singularites.
p(x)=1
singularity type
q(x)=1
singularity type

Combining everything together gives the following summary of singularities for the ode as

Regular singular points : []

Irregular singular points : []

Since x=0 is not an ordinary point, then we will now check if it is a regular singular point. Unable to solve since x=0 is not regular singular point. Terminating.

Maple
Order:=6; 
ode:=diff(diff(y(x),x),x)+diff(y(x),x)+y(x) = 1/x; 
dsolve(ode,y(x),type='series',x=0);
 
No solution found

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)] 
-> Try solving first the homogeneous part of the ODE 
   checking if the LODE has constant coefficients 
   <- constant coefficients successful 
<- solving first the homogeneous part of the ODE successful
 

Maple step by step

Let’s solveddxddxy(x)+ddxy(x)+y(x)=1xHighest derivative means the order of the ODE is2ddxddxy(x)Characteristic polynomial of homogeneous ODEr2+r+1=0Use quadratic formula to solve forrr=(1)±(3)2Roots of the characteristic polynomialr=(12I32,12+I32)1st solution of the homogeneous ODEy1(x)=ex2cos(3x2)2nd solution of the homogeneous ODEy2(x)=ex2sin(3x2)General solution of the ODEy(x)=C1y1(x)+C2y2(x)+yp(x)Substitute in solutions of the homogeneous ODEy(x)=C1ex2cos(3x2)+C2ex2sin(3x2)+yp(x)Find a particular solutionyp(x)of the ODEUse variation of parameters to findypheref(x)is the forcing function[yp(x)=y1(x)y2(x)f(x)W(y1(x),y2(x))dx+y2(x)y1(x)f(x)W(y1(x),y2(x))dx,f(x)=1x]Wronskian of solutions of the homogeneous equationW(y1(x),y2(x))=[ex2cos(3x2)ex2sin(3x2)ex2cos(3x2)2ex23sin(3x2)2ex2sin(3x2)2+ex23cos(3x2)2]Compute WronskianW(y1(x),y2(x))=3ex2Substitute functions into equation foryp(x)yp(x)=23ex2(ex2sin(3x2)xdxcos(3x2)ex2cos(3x2)xdxsin(3x2))3Compute integralsyp(x)=ex2((Icos(3x2)+sin(3x2))Ei1(x(1+I3)2)Ei1(x(I31)2)(Icos(3x2)sin(3x2)))33Substitute particular solution into general solution to ODEy(x)=C1ex2cos(3x2)+C2ex2sin(3x2)ex2((Icos(3x2)+sin(3x2))Ei1(x(1+I3)2)Ei1(x(I31)2)(Icos(3x2)sin(3x2)))33
Mathematica. Time used: 0.06 (sec). Leaf size: 152
ode=D[y[x],{x,2}]+D[y[x],x]+y[x]==1/x; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
y(x)c2x(x4120+x324x2+1)+c1(x36x22+1)+x(x4120+x324x2+1)(41x64320+x5120x496x318+x+log(x))+(x36x22+1)(x6180+x5600+x496x24x)
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 1/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
ValueError : ODE y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 1/x does not match hint 2nd_power_series_regular