I need to orthogonalize the polynomials $h_n(x)=x^{2n}(1+x^2)^{-4S}$ with $x\in\textbf{R}$, $2S\in\textbf{N}$ and $n\in\{1,3,5,\ldots, 4S-1\}$ over the inner product

$\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\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 $n$ and $m$ 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
    $\begingroup$ Could you write your formulas in TeX AND Mathematica language, please $\endgroup$ Commented Nov 19, 2013 at 14:20

1 Answer 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])

Add these properties:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.