लग्रान्ज बहुपदों (Lagrange polynomials) का उपयोग संख्यात्मक विश्लेषण (numerical analysis) में होता है।
परिभाषामाना k + 1 बिन्दुओं का निम्नलिखित समुच्चय दिया हुआ है
( x 0 , y 0 ) , … , ( x k , y k ) {\displaystyle (x_{0},y_{0}),\ldots ,(x_{k},y_{k})} जहाँ सभी x j एक दूसरे से भिन्न हैं, तो निम्नलिखित अंतर्वेशी बहुपद (interpolating polynomial) लग्रानज बहुपद कहलाता है-
L ( x ) = ∑ j = 0 k y j ℓ j ( x ) {\displaystyle L(x)=\sum _{j=0}^{k}y_{j}\ell _{j}(x)} जहाँ आधार बहुपद निम्नलिखित है-
ℓ j ( x ) = ∏ i = 0 , i ≠ j k x − x i x j − x i = x − x 0 x j − x 0 ⋯ x − x j − 1 x j − x j − 1 x − x j + 1 x j − x j + 1 ⋯ x − x k x j − x k {\displaystyle \ell _{j}(x)=\prod _{i=0,\,i\neq j}^{k}{\frac {x-x_{i}}{x_{j}-x_{i}}}={\frac {x-x_{0}}{x_{j}-x_{0}}}\cdots {\frac {x-x_{j-1}}{x_{j}-x_{j-1}}}{\frac {x-x_{j+1}}{x_{j}-x_{j+1}}}\cdots {\frac {x-x_{k}}{x_{j}-x_{k}}}}
उदाहरण tan y का अन्तर्वेशन माना फलन f ( x ) = tan ( x ) {\displaystyle f(x)=\tan(x)} पर कुछ बिन्दु लेते हैं,
x 0 = − 1.5 {\displaystyle x_{0}=-1.5} f ( x 0 ) = − 14.1014 {\displaystyle f(x_{0})=-14.1014} x 1 = − 0.75 {\displaystyle x_{1}=-0.75} f ( x 1 ) = − 0.931596 {\displaystyle f(x_{1})=-0.931596} x 2 = 0 {\displaystyle x_{2}=0} f ( x 2 ) = 0 {\displaystyle f(x_{2})=0} x 3 = 0.75 {\displaystyle x_{3}=0.75} f ( x 3 ) = 0.931596 {\displaystyle f(x_{3})=0.931596} x 4 = 1.5 {\displaystyle x_{4}=1.5} f ( x 4 ) = 14.1014 {\displaystyle f(x_{4})=14.1014}
इन ५ बिन्दुओं के लिये अन्तर्वेशन बहुपद ४ घात का होगा।
आधार बहुपद निम्नलिखित हैं-
ℓ 0 ( x ) = x − x 1 x 0 − x 1 ⋅ x − x 2 x 0 − x 2 ⋅ x − x 3 x 0 − x 3 ⋅ x − x 4 x 0 − x 4 = 1 243 x ( 2 x − 3 ) ( 4 x − 3 ) ( 4 x + 3 ) {\displaystyle \ell _{0}(x)={x-x_{1} \over x_{0}-x_{1}}\cdot {x-x_{2} \over x_{0}-x_{2}}\cdot {x-x_{3} \over x_{0}-x_{3}}\cdot {x-x_{4} \over x_{0}-x_{4}}={1 \over 243}x(2x-3)(4x-3)(4x+3)} ℓ 1 ( x ) = x − x 0 x 1 − x 0 ⋅ x − x 2 x 1 − x 2 ⋅ x − x 3 x 1 − x 3 ⋅ x − x 4 x 1 − x 4 = − 8 243 x ( 2 x − 3 ) ( 2 x + 3 ) ( 4 x − 3 ) {\displaystyle \ell _{1}(x)={x-x_{0} \over x_{1}-x_{0}}\cdot {x-x_{2} \over x_{1}-x_{2}}\cdot {x-x_{3} \over x_{1}-x_{3}}\cdot {x-x_{4} \over x_{1}-x_{4}}=-{8 \over 243}x(2x-3)(2x+3)(4x-3)} ℓ 2 ( x ) = x − x 0 x 2 − x 0 ⋅ x − x 1 x 2 − x 1 ⋅ x − x 3 x 2 − x 3 ⋅ x − x 4 x 2 − x 4 = 1 243 ( 243 − 540 x 2 + 192 x 4 ) {\displaystyle \ell _{2}(x)={x-x_{0} \over x_{2}-x_{0}}\cdot {x-x_{1} \over x_{2}-x_{1}}\cdot {x-x_{3} \over x_{2}-x_{3}}\cdot {x-x_{4} \over x_{2}-x_{4}}={1 \over 243}(243-540x^{2}+192x^{4})} ℓ 3 ( x ) = x − x 0 x 3 − x 0 ⋅ x − x 1 x 3 − x 1 ⋅ x − x 2 x 3 − x 2 ⋅ x − x 4 x 3 − x 4 = − 8 243 x ( 2 x − 3 ) ( 2 x + 3 ) ( 4 x + 3 ) {\displaystyle \ell _{3}(x)={x-x_{0} \over x_{3}-x_{0}}\cdot {x-x_{1} \over x_{3}-x_{1}}\cdot {x-x_{2} \over x_{3}-x_{2}}\cdot {x-x_{4} \over x_{3}-x_{4}}=-{8 \over 243}x(2x-3)(2x+3)(4x+3)} ℓ 4 ( x ) = x − x 0 x 4 − x 0 ⋅ x − x 1 x 4 − x 1 ⋅ x − x 2 x 4 − x 2 ⋅ x − x 3 x 4 − x 3 = 1 243 x ( 2 x + 3 ) ( 4 x − 3 ) ( 4 x + 3 ) {\displaystyle \ell _{4}(x)={x-x_{0} \over x_{4}-x_{0}}\cdot {x-x_{1} \over x_{4}-x_{1}}\cdot {x-x_{2} \over x_{4}-x_{2}}\cdot {x-x_{3} \over x_{4}-x_{3}}={1 \over 243}x(2x+3)(4x-3)(4x+3)} इस प्रकार, निम्नलिखित अन्तर्वेशन बहुपद प्राप्त होता है-
1 243 ( f ( x 0 ) x ( 2 x − 3 ) ( 4 x − 3 ) ( 4 x + 3 ) − 8 f ( x 1 ) x ( 2 x − 3 ) ( 2 x + 3 ) ( 4 x − 3 ) {\displaystyle {1 \over 243}{\Big (}f(x_{0})x(2x-3)(4x-3)(4x+3)-8f(x_{1})x(2x-3)(2x+3)(4x-3)} + f ( x 2 ) ( 243 − 540 x 2 + 192 x 4 ) − 8 f ( x 3 ) x ( 2 x − 3 ) ( 2 x + 3 ) ( 4 x + 3 ) {\displaystyle +f(x_{2})(243-540x^{2}+192x^{4})-8f(x_{3})x(2x-3)(2x+3)(4x+3)\,} + f ( x 4 ) x ( 2 x + 3 ) ( 4 x − 3 ) ( 4 x + 3 ) ) {\displaystyle +f(x_{4})x(2x+3)(4x-3)(4x+3){\Big )}\,} = − 1.47748 x + 4.83456 x 3 . {\displaystyle =-1.47748x+4.83456x^{3}.\,}