Index: tol_pkg/FunRn2R/BaseC2.Cache.tol
===================================================================
--- tol_pkg/FunRn2R/BaseC2.Cache.tol	(revision b83f1d6557d0232392df405a14c8bb32675e77ff)
+++ tol_pkg/FunRn2R/BaseC2.Cache.tol	(revision dac8deb31c5107f80eec918f0200049bcb3a39d7)
@@ -17,4 +17,5 @@
   Set _.partial.derivative.1 = Copy(Empty);
   Set _.partial.derivative.2 = Copy(Empty);
+  Set _.partial.integrate.1 = Copy(Empty);
 
   //Returns the cached value of the k-th basic function for an 
@@ -37,4 +38,10 @@
     Real j_ = Min(i,j);
     SubCol(_.partial.derivative.2[i_][j_],[[k]]) 
+  };
+  //Returns the cached value of the first partial integration of k-th basic 
+  //function for an  array of points given as the rows of a matrix 
+  VMatrix partial.integrate.1.v(Real k, VMatrix X, Real i)
+  { 
+    SubCol(_.partial.integrate.1[i],[[k]]) 
   };
 
@@ -62,15 +69,20 @@
   };
 
+  //Evaluates the first partial integration of all basic functions, one in 
+  //each returned column, for an  array of points given as the rows of a 
+  //matrix 
+  VMatrix partial.integrate.1.m(VMatrix X, Real i)
+  { 
+    _.partial.integrate.1[i]
+  };
   //Some bases are more efficient using cache
-  Real _build.cache(VMatrix X, Real order)
+  Real _build.cache(VMatrix X, Real deriv.order, Real integ.order)
   {
-    VMatrix If(order>=0, { _.function.r := 
-      _build.function.m(X)
-    });
-    Set If(order>=1, { _.partial.derivative.1 := 
+    VMatrix _.function := _build.function.m(X);
+    Set If(deriv.order>=1, { _.partial.derivative.1 := 
       For(1, _.n, VMatrix(Real i)
       { _build.partial.derivative.1.m(X,i) })
     });
-    Set If(order>=2, { _.partial.derivative.2 := 
+    Set If(deriv.order>=2, { _.partial.derivative.2 := 
       For(1, _.n, Set(Real i)
       { 
@@ -81,4 +93,8 @@
       })
     });
+    Set If(integ.order>=1, { _.partial.integrate.1 := 
+      For(1, _.n, VMatrix(Real i)
+      { _build.partial.integrate.1.m(X,i) })
+    });
     True
   }
Index: tol_pkg/FunRn2R/BaseC2.Eval.tol
===================================================================
--- tol_pkg/FunRn2R/BaseC2.Eval.tol	(revision b83f1d6557d0232392df405a14c8bb32675e77ff)
+++ tol_pkg/FunRn2R/BaseC2.Eval.tol	(revision dac8deb31c5107f80eec918f0200049bcb3a39d7)
@@ -37,5 +37,5 @@
   Real upgrade.cache(VMatrix X)
   {
-    _.base::upgrade.cache(X,0)
+    _.base::upgrade.cache(X,0,0)
   }
 };
@@ -62,5 +62,5 @@
   Real upgrade.cache(VMatrix X)
   {
-    _.base::upgrade.cache(X,1)
+    _.base::upgrade.cache(X,1,0)
   }
 };
@@ -89,5 +89,5 @@
   Real upgrade.cache(VMatrix X)
   {
-    _.base::upgrade.cache(X,1)
+    _.base::upgrade.cache(X,2,0)
   }
 };
@@ -111,4 +111,8 @@
   {
     _.base::partial.1ntegrate.1.m(X, _.s)
+  };
+  Real upgrade.cache(VMatrix X)
+  {
+    _.base::upgrade.cache(X,0,1)
   }
 };
Index: tol_pkg/FunRn2R/BaseC2.LinComb.tol
===================================================================
--- tol_pkg/FunRn2R/BaseC2.LinComb.tol	(revision b83f1d6557d0232392df405a14c8bb32675e77ff)
+++ tol_pkg/FunRn2R/BaseC2.LinComb.tol	(revision dac8deb31c5107f80eec918f0200049bcb3a39d7)
@@ -16,15 +16,15 @@
   VMatrix _.V;
   VMatrix _.Vi;
+    Set _.aux = Copy(Empty);
 
   ////////////////////////////////////////////////////////////////////////////
   Static Text _.autodoc.member.New = "Creates an instance B2 of "
   "@BaseC2.LinComb as B2 = B1*V";
-  Static @BaseC2.LinComb New(@BaseC2 B1, VMatrix V, VMatrix Vi)
+  Static @BaseC2.LinComb New(@BaseC2 base, VMatrix V, VMatrix Vi)
   ////////////////////////////////////////////////////////////////////////////
   {
-    Real n = B1::_.n;
-    
+    Real n = base::_.n;
     @BaseC2.LinComb aux = [[
-      Real _.n = B1::_.n;
+      Real _.n = base::_.n;
       Real _.K = VColumns(V);
       @BaseC2 _.base = base; 
@@ -79,14 +79,18 @@
   ////////////////////////////////////////////////////////////////////////////
   {
+    Set aux = [[
     Set range.K = Range(1,K,1);
+    Real n = base::_.n;
     Real K1 = base::_.K;
 
-    VMatrix u = Rand(K1*10, K1, -1, 1);
-
+    VMatrix u = Gaussian(K1, n, 0, 1);
+  //VMatrix u = Eye(K1,n);
+  //WriteLn("TRACE [@BaseC2.LinComb Compact.K] u:"<<u);
+    Real base::upgrade.cache(u,0,0);
     VMatrix Pu = Group("ConcatColumns", For(1, K1, VMatrix(Real k)
     {
       base::function.v(k,u)
     }));
-
+  //WriteLn("TRACE [@BaseC2.LinComb Compact.K] Pu:"<<Pu);
     Set Pu.svd = SVD(VMat2Mat(Pu));
 
@@ -96,17 +100,17 @@
     VMatrix Di = Eye(K,K,0,RPow(Mat2VMat(SubRow(Pu.eigenvalue,range.K)),-1));
     VMatrix W = V*Di;
-    VMatrix Wi = D*Tra(V);
-    New(base, W, Wi)
+    VMatrix Wi = D*Tra(V) ]];
+    @BaseC2.LinComb new = New(base, W, Wi);
+    Set new::_.aux := aux;
+    new
   };
 
   ////////////////////////////////////////////////////////////////////////////
-  Real _build.cache(VMatrix X, Real order) 
+  Real _build.cache(VMatrix X, Real deriv.order, Real integ.order) 
   ////////////////////////////////////////////////////////////////////////////
   { 
-    Real _.base::upgrade.cache(X,order);
-    VMatrix If(order>=0, { _.function := 
-      _.base::function.m(X)*_.V
-    });
-    Set If(order>=1, { _.partial.derivative.1 := 
+    Real _.base::upgrade.cache(X,deriv.order,integ.order);
+    VMatrix _.function := _.base::function.m(X)*_.V;
+    Set If(deriv.order>=1, { _.partial.derivative.1 := 
       For(1, _.n, VMatrix(Real i)
       { 
@@ -114,5 +118,5 @@
       })
     });
-    Set If(order>=2, { _.partial.derivative.2 := 
+    Set If(deriv.order>=2, { _.partial.derivative.2 := 
       For(1, _.n, Set(Real i)
       { 
@@ -123,4 +127,10 @@
       })
     });
+    Set If(integ.order>=1, { _.partial.integrate.1 := 
+      For(1, _.n, VMatrix(Real i)
+      { 
+        _.base::partial.integrate.1.m(X,i)*_.V 
+      })
+    });
     True
   }
Index: tol_pkg/FunRn2R/BaseC2.Monomial.tol
===================================================================
--- tol_pkg/FunRn2R/BaseC2.Monomial.tol	(revision b83f1d6557d0232392df405a14c8bb32675e77ff)
+++ tol_pkg/FunRn2R/BaseC2.Monomial.tol	(revision dac8deb31c5107f80eec918f0200049bcb3a39d7)
@@ -9,5 +9,5 @@
   "functions R^n -> R . Linear independence is ensured since distinct "
   "monomials are allways independent\n";
-Class @BaseC2.Monomial : @BaseC2
+Class @BaseC2.Monomial :  @BaseC2.Cache
 //////////////////////////////////////////////////////////////////////////////
 {
@@ -65,8 +65,13 @@
   ////////////////////////////////////////////////////////////////////////////
   {
-  //WriteLn("TRACE @BaseC2.Monomial::_build.function.2.v");
+  //WriteLn("TRACE @BaseC2.Monomial::_build.function.v");
     BinGroup("$*", For(1,_.n, VMatrix(Real i)
     {
-      RPow(SubCol(X,[[i]]),_.degComb[k][i])
+      Real d = _.degComb[k][i];
+      If(d==0, Rand(VRows(X),1,1,1),
+      {
+      //WriteLn("  _.degComb["<<k+"]["<<i+"]="<<_.degComb[k][i]);
+        RPow(SubCol(X,[[i]]),_.degComb[k][i])
+      })
     }))
   }; 
Index: tol_pkg/FunRn2R/BaseC2.tol
===================================================================
--- tol_pkg/FunRn2R/BaseC2.tol	(revision b83f1d6557d0232392df405a14c8bb32675e77ff)
+++ tol_pkg/FunRn2R/BaseC2.tol	(revision dac8deb31c5107f80eec918f0200049bcb3a39d7)
@@ -101,5 +101,5 @@
   };
   //Some bases are more efficient using cache
-  Real _build.cache(VMatrix X, Real order) { False };
+  Real _build.cache(VMatrix X, Real deriv.order, Real integ.order) { False };
 
   ////////////////////////////////////////////////////////////////////////////
@@ -169,5 +169,5 @@
   };
   //Some bases are more efficient using cache
-  Real upgrade.cache(VMatrix X, Real order) 
-  { _build.cache(X,order) }
+  Real upgrade.cache(VMatrix X, Real deriv.order, Real integ.order) 
+  { _build.cache(X, deriv.order, integ.order) }
 };
Index: tol_pkg/FunRn2R/FunC2.tol
===================================================================
--- tol_pkg/FunRn2R/FunC2.tol	(revision b83f1d6557d0232392df405a14c8bb32675e77ff)
+++ tol_pkg/FunRn2R/FunC2.tol	(revision dac8deb31c5107f80eec918f0200049bcb3a39d7)
@@ -77,4 +77,5 @@
   ////////////////////////////////////////////////////////////////////////////
   {
+    Real _.base::upgrade.cache(X,0,0);
     _.base::function.m(X)*_.linComb
   };
@@ -83,4 +84,5 @@
   ////////////////////////////////////////////////////////////////////////////
   {
+    Real _.base::upgrade.cache(X,1,0);
     _.base::partial.derivative.1.m(X,i)*_.linComb
   };
@@ -89,6 +91,15 @@
   ////////////////////////////////////////////////////////////////////////////
   {
+    Real _.base::upgrade.cache(X,2,0);
     _.base::partial.derivative.2.m(X,i,j)*_.linComb
+  };
+  ////////////////////////////////////////////////////////////////////////////
+  VMatrix eval.partial.integrate.1.v(VMatrix X, Real i)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    Real _.base::upgrade.cache(X,1,0);
+    _.base::partial.integrate.1.m(X,i)*_.linComb
   }
+
 };
 
Index: tol_pkg/FunRn2R/test/test_0001/test.tol
===================================================================
--- tol_pkg/FunRn2R/test/test_0001/test.tol	(revision b83f1d6557d0232392df405a14c8bb32675e77ff)
+++ tol_pkg/FunRn2R/test/test_0001/test.tol	(revision dac8deb31c5107f80eec918f0200049bcb3a39d7)
@@ -48,5 +48,5 @@
 FunRn2R::@FunC2 f2 = FunRn2R::@FunC2.InBaseC2::New(B2, u2);
 
-Real B2::upgrade.cache(X,0);
+Real B2::upgrade.cache(X,0,0);
 
 VMatrix F2 = f2::eval.function.v(X);
