# Orthogonalizing polynomials with inner product depending on parameters

I need to orthogonalize the polynomials hn(x)=x2n(1+x2)−4Sh_n(x)=x^{2n}(1+x^2)^{-4S} with x∈Rx\in\textbf{R}, 2S∈N2S\in\textbf{N} and n∈{1,3,5,…,4S−1}n\in\{1,3,5,\ldots, 4S-1\} over the inner product

⟨hn,hm⟩=32πS∫10hn(x)hm(x)x(1−x2)dx(1+x2)3\langle h_n,h_m\rangle=32\pi S\displaystyle\int_0^1h_n(x)h_m(x)\frac{x(1-x^2)dx}{(1+x^2)^3}

=16πS8S−n−m∑k=0(8S+2k)(8S+1−n−m−k)28S+1(n+m+2)(n+m+1)(8S+28S−n−m)=16\pi S\frac{\displaystyle\sum_{k=0}^{8S-n-m}{8S+2 \choose k}(8S+1-n-m-k)}{\displaystyle2^{8S+1}(n+m+2)(n+m+1){8S+2 \choose 8S-n-m}} .

Using the integral itself with Orthogonalize takes forever and the result is not informative. So I’d like to use the formula above in terms of the parameters nn and mm instead. Is there a way to do this with Mathematica, i.e. use Orthogonalize with an inner product that depends on parameters rather than the functions and their variables?

=================

2

– Dr. belisarius
Nov 19 ’13 at 14:20

=================

1

=================

Define your scalar product of the h polynomials:

p[h[n_], h[m_]] := 16 Pi S Sum[Binomial[8 S + 2, k] (8 S + 1 – n – m – k), {k, 0, 8 S – n – m}] / (2^(8 S + 1) (n + m + 2) (n + m + 1) Binomial[8 S + 2, 8 S – n – m])

p[c_ pol1_h, pol2_] := c p[pol1, pol2]
p[pol1_, c_ pol2_h] := c p[pol1, pol2]

p[sum_Plus, pol_] := p[#, pol] & /@ sum
p[pol_, sum_Plus] := p[pol, #] & /@ sum

p[c_ sum_Plus, pol_] := p[Expand[c sum], pol]
p[pol_, c_ sum_Plus] := p[pol, Expand[c sum]]

Take the case

S = 2;
hs = {h[1], h[3], h[5], h[7]};

Then I think this is what you want:

ohs = Expand@ Orthogonalize[hs, p]

Check orthonormality with

Outer[p, ohs, ohs] // FullSimplify