
(* f1=Integrate[x^n*Cos[x]*Exp[-x^2],{x,0,Infinity}] *)

Clear[x]
n=20
mydata=Table[0,{i,1,n}]
For[i=1, i<=n, i++,
  ci=Integrate[x^(i-1)*Cos[x]*Exp[-x^2],{x,0,Infinity}];
  Print["i-1=",i-1,",  ci=",ci];
  mydata[[i]]=ci
]
Print[InputForm[mydata]]
Print["iv="]
Print[N[mydata,20]]

(* DawsonF *)
(*

/*
  mydata --> Dawson
  xij in resin_series is the local coordinate at (-1,0,-1)
*/

def std2val_diff(Std) {
  if (type(Std)>3) return map(std2val_diff,Std);
  Dawson=number_float_to_rational(
[0.69019422352157148739, 0.28778180824898885203, 0.17254855588039287185, 0.10972726031123606504, 0.043137138970098217962, -0.075059116361966066665,  
   -0.33431282701826118920, -0.94269666245650217520, -2.4129837111398690672, -6.0464300810089970702, -15.226736038648263156, -38.960938325116183746,  
   -101.78191089549764333, -272.03372892980964771, -744.34611919445344670, -2084.9703136404466661, -5975.8552527758188438, -17514.026514201805153,  
   -52446.880705939849410, -160338.97604243076559]);
   K11=deg(Std,dx11);
   K12=deg(Std,dx12);
   K22=deg(Std,dx22);
   return 2^K12*Dawson[2*K11+K12]*Dawson[K12+2*K22];
}
setprec(30);;
std2val_diff(Std=[1,dx11,dx12,dx22,dx11^2,dx12^2,dx22^2,dx11*dx12*dx22]);

def resin_diff_series(Approx) {
  F=(1+dx11+dx12+dx22)^Approx;
  F=dp_ptod(F,V=[dx11,dx12,dx22]);
  G=0;
  while (F != 0) {
    E=dp_etov(F);
    S=dp_dtop(dp_ht(F),V);
    G += std2val_diff(S)*x11^E[0]*x12^E[1]*x22^E[2]/(fac(E[0])*fac(E[1])*fac(E[2]));
    F=dp_rest(F);
  }
  return G;
}
F=resin_diff_series(5);;
F_iv=base_replace(map(poly_dact,Std,F,[x11,x12,x22]),[[x11,0],[x12,-1/100],[x22,0]]);

number_eval(F_iv);
*)

(*
F_iv2=base_replace(map(poly_dact,Std,F,[x11,x12,x22]),[[x11,0],[x12,1/100],[x22,0]]);

number_eval(F_iv2);
*)
