2.5.9 Problem 9

Maple
Mathematica
Sympy

Internal problem ID [8970]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 9
Date solved : Sunday, March 30, 2025 at 01:57:35 PM
CAS classification : [_separable]

Solve

xy+y=0

Using series expansion around x=0

Let the solution be represented as Frobenius power series of the form

y=n=0anxn+r

Then

y=n=0(n+r)anxn+r1

Substituting the above back into the ode gives

(1)(n=0(n+r)anxn+r1)+n=0anxn+rx=0

Which simplifies to

(2A)(n=0(n+r)anxn+r1)+(n=0xn+r1an)=0

The next step is to make all powers of x be n+r1 in each summation term. Going over each summation term above with power of x in it which is not already xn+r1 and adjusting the power and the corresponding index gives Substituting all the above in Eq (2A) gives the following equation where now all powers of x are the same and equal to n+r1.

(2B)(n=0(n+r)anxn+r1)+(n=0xn+r1an)=0

The indicial equation is obtained from n=0. From Eq (2) this gives

(n+r)anxn+r1+xn+r1an=0

When n=0 the above becomes

ra0x1+r+x1+ra0=0

Since a00 then the indicial equation becomes

(r+1)x1+r=0

Since the above is true for all x then the indicial equation simplifies to

r+1=0

Solving for r gives the root of the indicial equation as

r=1

Replacing r=1 found above results in

(n=0(n1)anxn2)+(n=0xn2an)=0

From the above we see that there is no recurrence relation since there is only one summation term. Therefore all an terms are zero except for a0. Hence

yh=a0xr

At x=0 the solution above becomes

y=c1(1x+O(x6))
Figure 2.193: Slope field xy+y=0
Maple. Time used: 0.022 (sec). Leaf size: 14
Order:=6; 
ode:=diff(y(x),x)*x+y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
y=c1x+O(x6)

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful
 

Maple step by step

Let’s solvex(ddxy(x))+y(x)=0Highest derivative means the order of the ODE is1ddxy(x)Separate variablesddxy(x)y(x)=1xIntegrate both sides with respect toxddxy(x)y(x)dx=1xdx+C1Evaluate integralln(y(x))=ln(x)+C1Solve fory(x)y(x)=eC1xRedefine the integration constant(s)y(x)=C1x
Mathematica. Time used: 0.002 (sec). Leaf size: 9
ode=x*D[y[x],x]+y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
y(x)c1x
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=0,n=6)
 
ValueError : ODE x*Derivative(y(x), x) + y(x) does not match hint 1st_power_series