### Related

? chebyshev_t;

Calculate

##### chebyshev_t-do-mod

/* input number n *//...

(s:6,N:2^n-5,for i fr...

(if(s=N-2*chebyshev_t...

Calculate

##### chebyshev_t

chebyshev_t(2,x);

Calculate

##### chebyshev_t-plot2d-ratsimp

ratsimp((chebyshev_t(...

x^6;

ratsimp((chebyshev_t(...

Calculate

##### chebyshev_t-expand-horner-orthopoly_weight

g(x):= 0.11* chebyshe...

horner(g(x), x);

expand(g(x));

Calculate

##### chebyshev_t-do

/* n>2 ,k>0 , k...

n:12;

(s:2*chebyshev_t(3*k...

Calculate

##### chebyshev_t-do-mod

/* input numbers k an...

n:1999;

(s:2*chebyshev_t(k,3)...

Calculate

##### chebyshev_t-plot2d-ratsimp

ratsimp((chebyshev_t(...

x^6;

ratsimp((chebyshev_t(...

Calculate

##### chebyshev_t-integrate

-integrate(chebyshev_...

Calculate

##### chebyshev_t-plot2d

plot2d(chebyshev_t(2,...

Calculate

### chebyshev_t

Run Example
```(%i1)/* b=0,6 (mod 8) , n>
2 *//* input numbers b and n */b:6;
(%o1)                                  6
(%i2)  n:31;
(%o2)                                 31
(%i3)  a:6;
(%o3)                                  6
(%i4) (s:2*chebyshev_t(b/2,a/2),N:(b^n+1)/(b+1),for i from 1 thru n-1 do (s:mod(2*chebyshev_t(b,s/2),N)));
(%o4)                                done
(%i5) (if(s=2*chebyshev_t(b/2,a/2)) then print("prime") else print("composite"));
prime
(%o5)                                prime
(%i6) ```
Run Example
```ratsimp(chebyshev_t(6,x)/2^5);
6       4       2
32 x  - 48 x  + 18 x  - 1
(%o1)                      -------------------------
32
(%i2) ratsimp(x^6-(chebyshev_t(6,x))/2^5);
4       2
48 x  - 18 x  + 1
(%o2)                          -----------------
32
(%i3) plot2d([(chebyshev_t(6,x))/2^5,x^6,x^6-(chebyshev_t(6,x))/2^5],[x,-1,1],[y,-0.2,0.2],[legend,Tst,p(x),q(x)]);
plot```
Run Example
```u : exp((x^2 - 1)/2);
2
x  - 1
------
2
(%o1)                              %e
(%i2) a : -1;
(%o2)                                 - 1
(%i3) b : 1;
(%o3)                                  1
(%i4) w : 1 / sqrt(1 - x * x);
1
(%o4)                            ------------
2
sqrt(1 - x )
(%i5) N : 4;
(%o5)                                  4
(%i6) H_oper(f):= diff(diff(f, x), x) - (x*x+1) * f;
(%o6)           H_oper(f) := diff(diff(f, x), x) - (x x + 1) f
(%i7) h[i,j]:= integrate(chebyshev_t(2*i,x) * H_oper(chebyshev_t(2*j,x)) * w, x, -1, 1);
(%o7) h     := integrate(chebyshev_t(2 i, x) H_oper(chebyshev_t(2 j, x)) w, x,
i, j
- 1, 1)
(%i8) H : genmatrix(h, N, N);
[   3 %pi  191 %pi                   ]
[ - -----  -------  96 %pi   240 %pi ]
[     4       8                      ]
[                                    ]
[    %pi     3 %pi  479 %pi          ]
[  - ---   - -----  -------  192 %pi ]
[     8        4       8             ]
(%o8)               [                                    ]
[             %pi     3 %pi  895 %pi ]
[    0      - ---   - -----  ------- ]
[              8        4       8    ]
[                                    ]
[                      %pi     3 %pi ]
[    0        0      - ---   - ----- ]
[                       8        4   ]
(%i9) f[i,j]:= -integrate(chebyshev_t(2*i,x) * H_oper(chebyshev_t(0,x)) * w, x, -1, 1);
(%o9)    f     := - integrate("T"   (x) H_oper("T" (x)) w, x, - 1, 1)
i, j                   2 i              0
(%i10) F : genmatrix(f, N, 1);
[ %pi ]
[ --- ]
[  4  ]
[     ]
(%o10)                              [  0  ]
[     ]
[  0  ]
[     ]
[  0  ]
(%i11) c : invert(H) . F;
[   13848  ]
[ - ------ ]
[   216677 ]
[          ]
[   1862   ]
[  ------  ]
[  216677  ]
(%o11)                           [          ]
[     12   ]
[ - ------ ]
[   216677 ]
[          ]
[    2     ]
[  ------  ]
[  216677  ]
(%i12) u_N : chebyshev_t(0,x) + lsum(c[j, 1] * chebyshev_t(2*j, x), j, makelist(i, i, 1, N));
2
13848 (- 4 (1 - x) + 2 (1 - x)  + 1)
(%o12) - ------------------------------------
216677
4             3             2
1862 (- 16 (1 - x) + 8 (1 - x)  - 32 (1 - x)  + 40 (1 - x)  + 1)
+ ----------------------------------------------------------------
216677
6              5              4              3
- (12 (- 36 (1 - x) + 32 (1 - x)  - 192 (1 - x)  + 432 (1 - x)  - 448 (1 - x)
2                                              8               7
+ 210 (1 - x)  + 1))/216677 + (2 (- 64 (1 - x) + 128 (1 - x)  - 1024 (1 - x)
6               5               4               3              2
+ 3328 (1 - x)  - 5632 (1 - x)  + 5280 (1 - x)  - 2688 (1 - x)  + 672 (1 - x)
+ 1))/216677 + 1
(%i13) E_t : quad_qag(abs(u-u_N), x, a, b, 6)[1];
(%o13)                         0.59751482897907
(%i14) ```

### Related Help

Help for Chebyshev_t