1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
NextTest("Testing orthogonal polynomials");
/* Symbolic calculations */
TestMathPiper(OrthoG(3, 1/5, x), 88/125*x^3-12/25*x);
TestMathPiper(OrthoG(9, 1/2, x), 12155/128*x^9-6435/32*x^7+9009/64*x^5-1155/32*x^3+315/128*x);
TestMathPiper(OrthoH(4, x), 16*x^4-48*x^2+12);
TestMathPiper(OrthoH(10, x), 1024*x^10-23040*x^8+161280*x^6-403200*x^4+302400*x^2-30240);
TestMathPiper(OrthoL(4, 1/3, x), x^4/24-13/18*x^3+65/18*x^2-455/81*x+455/243);
TestMathPiper(OrthoP(3,1/2,5/2,x), 21/2*x^3-7*x^2-35/16*x+7/8);
TestMathPiper(OrthoP(7,x), (429*x^7-693*x^5+315*x^3-35*x)/16);
TestMathPiper(OrthoT(15, x), 16384*x^15-61440*x^13+92160*x^11-70400*x^9+28800*x^7-6048*x^5+560*x^3-15*x);
TestMathPiper(OrthoU(16, x), 65536*x^16-245760*x^14+372736*x^12-292864*x^10+126720*x^8-29568*x^6+3360*x^4-144*x^2+1);
/* Numerical calculations */
TestMathPiper(OrthoP(100, 1), 1);
TestMathPiper(OrthoL(50,5/3,5/2), 956329424993407752478497541911420551314045339353541114044036291602395886513403153686689293955/143232645897909553890691033589829981069003266848814603996731044282564768594296559565258358784);
TestMathPiper(OrthoP(15,1/7,1/9,2/3), 3891107589471727673898835091294644097395/16032477875245178148605931130545427636128);
|