Monday, May 7, 2012

Compute the Taylor series for x^4-3x^2+1 around a=1

Compute the Taylor series for $f(x) = x^4-3x^2+1$ around $a=1$.

Method 1 Take derivatives.

Step 1: Determine the series coefficients.

Step 1a: Evaluate the function at 1.
$f(1) = -1$

Step 1b: Take the first derivative and evaluate it at 1.
$f^{\prime}(x) = 4x^3-6x$
$f^{\prime}(1) = -2

Step 1c: Take the second derivative and evaluate it at 1.
$f^{\prime\prime}(x) = 12x^2-6$
$f^{\prime\prime}(1) = 6

Step 1d: And so on...
$f^{\prime\prime\prime}(x) = 24x$
$f^{\prime\prime\prime}(1) = 24$
$f^{\prime\prime\prime\prime}(x) = 24$
$f^{\prime\prime\prime\prime}(1) = 24$

Step 2: Lay out the coefficients in front of the appropriate power of $(x-a)$ and divide by the corresponding factorial.
For example, the coefficient of $(x-1)^2$ is the evaluation of the second derivative (2) divided by the factorial of two.

In tabular form we have the following:
CoefficientFactorialx termAll Together
$f^{(0)}(1)=f(1)$0!$(x-1)^0$$\frac{-1}{0!}$
$f^{(1)}(1)=f^{\prime}(1)$1!$(x-1)^1$$\frac{-2}{1!}(x-1)$
$f^{(2)}(1)=f^{\prime\prime}(1)$2!$(x-1)^2$$\frac{6}{2!}(x-1)^2$
$f^{(3)}(1)=f^{\prime\prime\prime}(1)$3!$(x-1)^3$$\frac{24}{3!}(x-1)^3$
$f^{(4)}(1)=f^{\prime\prime\prime\prime}(1)$4!$(x-1)^4$$\frac{24}{4!}(x-1)^4$

At the end of the day we have $$-1-2(x-1)+3(x-1)^2+4(x-1)^3+(x-1)^4$$

[20120507]

Method 2 Potentially the easiest method provided it's allowed by the instructor.

First we recognize that $f$ can be written as $((x-1)+1)^4-3((x-1)+1)^2+1$.

Then we expand the terms to obtain $((x-1)^4+4(x-1)^3+6(x-1)^2+4(x-1)+1$ from the first term, $-3((x-1)^2+2(x-1)+1)$ from the second term, and $1$.

Simplifying we get $(x-4)^4+4(x-1)^3+3(x-1)^2-2(x-1)-1$.

[20191223]

Method 3 Theoretical method; arguably harder.

We know the coefficient of $(x-1)^4$ must be 1, because it is the only term that contributes to the highest degree term of $f$.

We expand $(x-1)^4$ to get x^4-4x^3+6x^2-4x+1 (I computed the expansion with the help of Pascal's triangle).

There are no powers of $x^3$ in $f$ so we need to offset it with $4(x-1)^3$. The expansion here is $4(x^3-3x^2+3x-1)$ or $4x^3-12x^2+12x-4$.

Keeping track we have $-6x^2+8x-3$ to worry about. So we add $3(x-1)^2$. The expansion here is $3(x^2-2x+1)$ or $3x^2-6x+3$.

The remaining amount to worry about is $2x$. So we add $-2(x-1)$ or $-2x+2$.

The remaining about to worry about is $2$. So we add $-1$.

Remark: Throughout this method, I use the term "add." It's useful to think in terms of adding negative "x" instead of subtracting "x." My high school teacher taught my fellow students and me that subtraction (Satan) and division (Devil) are evil and so we should instead "add a negative" and "multiply by the inverse," respectively.

[20191223]

No comments:

Post a Comment