Problem 2

Question

Find a cubic polynomial, \(p(x)=p_{0}+p_{1} x+p_{2} x^{2}+p_{3} x^{3}\) that matches \(f(x)=e^{x}\) at \(a=0 .\) To do so, you should complete the following table. You should conclude from the table that $$ p(x)=1+x+\frac{x^{2}}{2}+\frac{x^{3}}{3 !} $$ is the cubic polynomial that matches \(f(x)=e^{x}\) at \(a=0\). Draw the graphs of \(f(x)=e^{x}\) and \(p(x)=1+x+x^{2} / 2+x^{3} / 6\) on \(-1 \leq x \leq 1\). You should find a pretty good match. The maximum separation occurs at \(x=1\) with a maximum $$ =\frac{\left|1+1+1 / 2+1 / 6-e^{1}\right|}{e^{1}} \doteq \frac{|2.6666-2.71828|}{e^{1}} \doteq 0.02 $$ There is about a \(2 \%\) relative error at \(x=1\) Compute the relative error in the approximation, \(e^{-1} \doteq p(-1)\).

Step-by-Step Solution

Verified
Answer
The relative error at \(x = -1\) is approximately 9.4%.
1Step 1: Define the functions
We are looking for a cubic polynomial function \(p(x)\) which is \(p(x) = p_0 + p_1 x + p_2 x^2 + p_3 x^3\) that approximates the exponential function \(f(x) = e^x\) around the point \(a=0\).
2Step 2: Calculate the derivatives
Compute the first few derivatives of \(f(x) = e^x\) and evaluate them at \(x = 0\):1. \(f(x) = e^x\) gives \(f(0) = e^0 = 1\),2. First derivative: \(f'(x) = e^x\) gives \(f'(0) = 1\),3. Second derivative: \(f''(x) = e^x\) gives \(f''(0) = 1\),4. Third derivative: \(f'''(x) = e^x\) gives \(f'''(0) = 1\).
3Step 3: Set up Taylor series formula
The Taylor series for \(f(x) = e^x\) around \(a=0\) is given by:\[ f(x) = f(0) + f'(0)x + \frac{f''(0)x^2}{2!} + \frac{f'''(0)x^3}{3!} + \cdots \] Since we only want the cubic polynomial, we stop at the third derivative term.
4Step 4: Construct the cubic polynomial
Using the derivatives from Step 2, construct the polynomial:\[ p(x) = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} \] This polynomial is derived from the Taylor series expansion of \(e^x\) up to the third-order term.
5Step 5: Calculate the relative error at \(x = -1\)
First, evaluate the polynomial at \(x = -1\):\[ p(-1) = 1 - 1 + \frac{1}{2} - \frac{1}{6} = \frac{1}{3} \]Next, compute the relative error using \(e^{-1} \approx 0.367879\):\[ \text{Relative Error} = \frac{|p(-1) - e^{-1}|}{e^{-1}} = \frac{|0.3333 - 0.367879|}{0.367879} \approx 0.094 \] This shows about a 9.4% relative error at \(x = -1\).

Key Concepts

Cubic PolynomialExponential FunctionApproximation Error
Cubic Polynomial
A cubic polynomial is a type of polynomial that consists of four terms: a constant, a linear term, a quadratic term, and a cubic term. In its general form, it is represented as \( p(x) = p_0 + p_1 x + p_2 x^2 + p_3 x^3 \). These types of polynomials can be used in approximation problems because they are relatively simple but still capture a change in curvature through all their terms.

For an exercise involving the exponential function, \( e^x \), we aim to match the polynomial to this function at a certain point, often using its derivatives. The polynomial essentially acts as a 'tangent' that closely follows the curve of the function for a given range of \( x \) values. In this case, the point of approximation is at \( a = 0 \). This is particularly useful when a broad range of a function is too complex to work with directly, and a simple polynomial can provide a good enough estimation.

Using derivatives helps us align the polynomial's coefficients with those of the desired function. This creates smoother and more accurate approximations.
Exponential Function
The exponential function, often represented as \( f(x) = e^x \), is one of the most significant functions in mathematics. It is unique in that its rate of growth is proportional to its current value. This property makes it appear frequently in natural growth processes and financial calculations. Also, the function’s derivative remains the same, which simplifies Taylor series expansions significantly, especially when approximating functions.

In the context of Taylor Series, the exponential function can be expanded in its series form beginning at any point \( a \). However, for simplicity and to cover common exercises, we often use \( a = 0 \). This turns the expansion into a Maclaurin Series specific to \( e^x \):
  • \( f(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots \)
In our exercise, the cubic polynomial approximation truncates this series after the \( x^3 \) term. Since \( e^x \) remains the same after each derivative, determining the terms of the polynomial is straightforward right after computing the derivatives at \( a=0 \). This makes exponential functions a favorite in approximation problems, as they allow for easy computations and meaningful understanding of the changes the polynomial needs to capture.
Approximation Error
Approximation error measures how closely an approximation matches its target function. It is crucial in understanding and assessing the quality of an approximation like our cubic polynomial. Here, the error is the difference between the cubic polynomial \( p(x) = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} \) and the exponential function \( f(x) = e^x \).

Approximation errors can be determined at specific points. For example, at \( x = 1 \), the relative error was found to be about 2\%, indicating a good fit over this range, which means the exponential graph and the cubic polynomial graph are closely aligned.

Another calculation done in the solution shows the relative error at \( x = -1 \). When \( p(-1) \) was calculated as \( \frac{1}{3} \), the relative error with respect to \( e^{-1} \) (approximately 0.368) was higher, around 9.4\%. High error, as seen further from the approximation point \( a = 0 \), reflects that the polynomial diverges from the exponential function more as we move further from the center of expansion.
  • Relative errors are often represented as a percentage and highlight areas where the approximation deviates significantly from the actual function.
  • This aspect of calculation ensures students understand the importance of choosing the right approximation methods and the implications of truncating infinite series.