Find the best (in the least squares sense) second-degree polynomial approximation to each of the given functions over the interval -1<x<1.

|x|

Short Answer

Expert verified

The best second-degree polynomial is 3/16 (5x2-1).

Step by step solution

01

Concept of the Legendre series:

An expansion in Legendre polynomials up to the second degree gives the best second-degree polynomial.

So, this corresponds to the usual Legendre polynomial fit with l=0 and l=2.

f(x)=c0P0(x)+c1P1(x)+c2P2(x)

The coefficients are given by the following integral:

cl= 2l+1/2 ∫-11 dx Pl(x) f(x)

cl = 2l+1/2 [∫-10 dxPl(x) (-x)+ ∫01 dxPl(x) (x)]

02

Calculate the value of different coefficients of the series:

Consider the following function:

Now doing calculation of coefficients as follows:

If l=0, calculation for the coefficient should be as:

c0=2(0)+1/2 ∫-11dxPl(x) f(x)

c0= 1/2 [∫-10dx (1) (-x) + ∫01dx (1) (x)]

c0= [(- x2/2)-10 + (x2/2)01]

c0= 1/4 (0+1+1-0)

c0=1/2

If l=1, calculation for the coefficient should be as:

c1= 2(1)+1/2 [∫-10 dx Pl(x)(-x)+∫01 dx Pl(x)(x)]

=3/2 [∫-10 dx(x)(-x)+∫01 dx(x) x]

=3/2 [-∫-10 x2 dx+∫01 dx (x) x]

=3/2 [-∫-10 x2 dx+∫01 (x)2 dx]

=3/2 [(-x3/3) -10 + (x3/3)01]

So,

c1=1/2 [-(0+1)+(1-0)]

=0

If l=2, calculation for the coefficient should be as:

c2= 2(2)+1/2 [∫-10 dx P2(x) (-x) + ∫01dxP2(x) x]

=5/2 [∫-10 dxP2(x) (-x)+∫01 dxP2(x) x]

=5/4 [∫-10(-3x3+x) dx+∫01 (3x3-x) dx]

=5/4 [(-3 x4/4+x2/2)-10+(3 x4/4-x2/2)01]

Simplify further as follows:

c2 =5/4 [0-(-3/4+1/2)+(3/4-1/2)-0]

=5/4 [3/4-1/2+3/4-1/2]

=5/4 (1/2)

=5/8

03

Put the value of coefficients in the function and find the best fit polynomial:

The required best fit polynomial is,

f(x) = c0P0(x)+c1P1(x)+c2P2(x)

|x| = 1/2 P0(x)+(0)P1(x)+5/8 P2(x)

|x| = 1/2 P0(x)+5/8 P2(x)

Replace the values of P0 and P2.

|x| = 1/2 +5/8 (3x2-1)/2

|x|=1/2 +15/16 x2-5/16

|x| = 15/16 x2 - 3/16

|x| = 3/16 (5x2-1)

The best fit polynomial for the given function is 3/16 (5x2-1).

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

See all solutions

Recommended explanations on Physics Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free