In[]:=
Remove["Global`*"]
Problem 1
In[]:=
DE:=(1-x)y''[x]+xy'[x]-y[x]==0BC:={y[0]==-3,y'[0]==2}ϕ[xd_]:=(y[x]/.DSolve[{DE,BC},y[x],x][[1]][[1]])/.xxd
In[]:=
ϕ[x]
Out[]=
-3+5x
x
In[]:=
Series[ϕ[x],{x,0,4}]
Out[]=
-3+2x---+
3
2
x
2
3
x
2
4
x
8
5
O[x]
Problem 2
In[]:=
DE:=y''[x]+xy[x]==0BC:={y[0]==1,y'[0]==0}ysol[xd_]:=(y[x]/.DSolve[{DE,BC},y[x],x][[1]])/.xxd
In[]:=
ysol[x]
Out[]=
1
2
2/3
3
1/3
(-1)
2
3
1/6
3
1/3
(-1)
2
3
In[]:=
Series[ysol[x],{x,0,6}]
Out[]=
1-++
3
x
6
6
x
180
7
O[x]
Problem 3
In[]:=
DE:=2x^2y''[x]+3xy'[x]-y[x]==0ysol[xd_]:=(y[x]/.DSolve[DE,y[x],x][[1]])/.xxd
In[]:=
ysol[x]
Out[]=
x
C[1]+C[2]
x
In[]:=
Wronskian[ysol[x]/.{{C[1]1,C[2]0},{C[1]0,C[2]1}},x]
Out[]=
-
3
2
3/2
x
Problem 4
In[]:=
DE:=x^2y''[x]+5xy'[x]+4y[x]==0ysol[xd_]:=(y[x]/.DSolve[DE,y[x],x][[1]])/.xxd
In[]:=
ysol[x]
Out[]=
C[1]
2
x
2C[2]Log[x]
2
x