(* These are the examples that appeared in "Wolfram Koepf: A package on formal power series, The Mathematica Journal 4, 1994, 62--69." *) Series[Sin[x] Exp[x], {x, 0, 5}] << PowerSeries.m Series[Sin[x] Exp[x], {x, 0}] detore[g_ + h_, F_, x_, a_, k_]:= detore[g, F, x, a, k] + detore[h, F, x, a, k] detore[c_ * g_, F_, x_, a_, k_]:= c * detore[g, F, x, a, k] /; FreeQ[c, x] && FreeQ[c, F] detore[Derivative[k0_][F_][x_], F_, x_, a_, k_]:= Pochhammer[k+1, k0] * a[k+k0] detore[F_[x_], F_, x_, a_, k_]:= a[k] detore[x_^j_. * Derivative[k0_][F_][x_], F_, x_, a_, k_]:= Pochhammer[k+1-j, k0] * a[k+k0-j] detore[x_^j_. * F_[x_], F_, x_, a_, k_]:= a[k-j] Simplify[detore[2*x*f'[x] + f''[x] + x^2*f''[x], f, x, a, k]] theta[f_, x_]:= x D[f, x] retode[eq1_ + eq2_, k_, f_, x_]:= retode[eq1, k, f, x] + retode[eq2, k, f, x] retode[c_ * eq_, k_, f_, x_]:= c * retode[eq, k, f, x] /; (FreeQ[c, k] && FreeQ[c, f] && FreeQ[c, x]) retode[a[k_ + m_.], k_, f_, x_]:= f[x]/x^m retode[k^j_. * a[k_ + m_.], k_, f_, x_]:= theta[retode[k^(j-1) * a[k+m], k, f, x], x] retode[p_ * a[k_ + m_.], k_, f_, x_]:= retode[Expand[p * a[k+m]], k, f, x] /; PolynomialQ[p] Simplify[retode[(k+1)(2k+3)a[k+1] + (k+1)(2k+1)a[k], k, f, x]] Convert[Sum[(-1)^k/(2k+1)*x^k, {k, 0, Infinity}], x] re=SimpleRE[ArcTan[x], x] << DiscreteMath`RSolve` RSolve[{re, a[0]==0, a[1]==1}, a[k], k] Series[ArcTan[x], {x, 0}] de[1] = SimpleDE[x^n * E^(alpha x), x] de[2] = SimpleDE[((1+x)/(1-x))^n, x] de[3] = SimpleDE[ArcSin[x^5], x] de[4] = SimpleDE[ArcSin[x], x] de[5] = SimpleDE[ArcSin[x]^3, x] de[6] = SimpleDE[Sin[x]^5, x, 6] de[7] = SimpleDE[Exp[alpha x] * Sin[beta x], x] de[8] = SimpleDE[LaguerreL[n, x], x] de[9] = SimpleDE[ChebyshevT[n, x], x] de[10] = SimpleDE[BesselY[n, x], x] de[11] = SimpleDE[AiryAi[x], x] de[12] = SimpleDE[Exp[alpha x] * BesselI[n, x], x] de[13] = SimpleDE[Sin[m x] * BesselJ[n, x], x] de[14] = SimpleDE[LegendreP[n, x]^2, x] de[15] = SimpleDE[E^(-x) * LaguerreL[n, alpha, 2x], x] re[1] = DEtoRE[de[2], F, x] re[2] = DEtoRE[de[3], F, x] re[3] = DEtoRE[de[11], F, x] re[4] = DEtoRE[de[12], F, x] re[5] = DEtoRE[de[13], F, x] ps[1] = PowerSeries[E^x, x] ps[2] = PowerSeries[Sin[x], x] ps[3] = PowerSeries[ArcSin[x], x] ps[4] = PowerSeries[Log[x], {x, 1}] ps[5] = PowerSeries[Exp[ArcSin[x]], x] ps[6] = PowerSeries[Exp[ArcSinh[x]], x] psprint ps[7] = PowerSeries[E^x - 2 E^(-x/2) Cos[Sqrt[3]x/2 - Pi/3], x] nopsprint ps[8] = PowerSeries[x/(1 - x - x^2), x] re[6] = SimpleRE[x/(1 - x - x^2), x, a, k] ps[9] = PowerSeries[E^x * BesselI[0, x], x] ps[10] = PowerSeries[E^x * BesselI[1, x], x] ps[11] = PowerSeries[Sin[x] * BesselJ[0, x], x] ps[12] = PowerSeries[Sin[x] * BesselJ[1, x], x] conv[1] = Convert[Sum[(2k)!/k!^2 x^k, {k, 0, Infinity}], x] conv[2] = Convert[Sum[k!^2/(2k)! x^k, {k, 0, Infinity}], x] psprint conv[3] = Convert[Sum[k!/(2k)! x^k, {k, 0, Infinity}], x] conv[4] = Convert[Sum[ChebyshevT[k,x] z^k, {k, 0, Infinity}], z] conv[5] = Convert[Sum[LaguerreL[k,a,x] z^k, {k, 0, Infinity}], z] re[7] = FindRecursion[(1 + (-1)^n)/n, n] re[8] = FindRecursion[n + (-1)^n, n] re[9] = FindRecursion[(n + (-1)^n)/n^2, n] re[10] = FindRecursion[1/(2n+1)!, n] ps[8][[1]] re[11] = FindRecursion[%, k] re[12] = FindRecursion[E^(-x) LaguerreL[n, alpha, 2x], n] re[13] = FindRecursion[n*LaguerreL[n, alpha, 2x], n] re[14] = FindRecursion[LaguerreL[n, alpha, 2x]/n, n] re[15] = FindRecursion[LaguerreL[n, x]^2, n]