Index: pseries.cpp
===================================================================
RCS file: /home/cvs/GiNaC/ginac/pseries.cpp,v
retrieving revision 1.88
diff -r1.88 pseries.cpp
1039a1040,1092
> 	ex res;
> 	// series expansion by recurrence relations -- work in progress 
> 	if (r.rhs().is_zero() && (exponent == _ex1_2)) {
> 		const ex& xpt = r.lhs();
> 		std::vector<ex> v(order+1);
> 		ex basisexp = basis.series(r, order, options);
> 		for (int i=0; i<order; ++i) {
> 			v[i] = basisexp.coeff(xpt, i);
> 		}
> 		std::vector<ex> w(order+1);
> 		w[0] = basis.subs(r);
> 		
> 		// prep for recurrence relation
> 		for (int i=1; i<=order; ++i) {
> 			w[i] = symbol();
> 		}
> 
> 		symbol x("x");
> 		ex V;
> 		ex W;
> 		for (int i=0; i<=order; ++i) {
> 			V += v[i] * pow(x, i);
> 			W += w[i] * pow(x, i);
> 		}
> 		ex Vp;
> 		ex Wp;
> 		for (int i=1; i<=order; ++i) {
> 			Vp += i * v[i] * pow(x, i-1);
> 			Wp += i * w[i] * pow(x, i-1);
> 		}
> 
> 		// W = sqrt(V)
> 		ex dgl = 2 * W * Wp - Vp;
> 		dgl = dgl.expand();
> 
> 		epvector ser;
> 		ser.push_back(expair(w[0], 0));
> 		for (int i=0; i<order-1; ++i) {
> 			ex co = dgl.coeff(x, i);
> 			ex co2 = -co / co.coeff(w[i+1]);
> 			ex co3 = co2.subs(w[i+1]==0);
> 			co3 = co3.normal();
> 
> 			dgl= dgl.subs(w[i+1] == co3);
> 			w[i+1] = co3;
> 			ser.push_back(expair(co3, i+1));
> 		}
> 		ser.push_back(expair(Order(xpt), order));
> 		res = pseries(r, ser);
> 
> 		return res;
> 	}
> 
1061d1113
< 
