4th order Taylor approximation

In summary: But now I'm supposed to have the 4th order coefficient be ##\frac {-1} {2m^4c^4}##. So is Taylor's formula not exact?No, Taylor's formula is not exact. It is an approximation that becomes more accurate as the number of terms increases. In this case, the difference between the exact value and the Taylor approximation is due to the higher order terms in the series. As you take more derivatives, those higher order terms become more significant and affect the overall approximation. This is why it's important to check the accuracy of a Taylor approximation by comparing it to the exact value or using more terms in the series.
  • #1
baseballfan_ny
92
23
Homework Statement
Get a 4th order taylor approximation for $$ f(p) = (1 + \frac {p^2} {m^2c^2})^{\frac 1 2} $$
Relevant Equations
$$\sum_{n=0}^\infty \frac {f^{(n)}(a) (x-a)^n} {n!}$$ around a = 0
So I just followed Taylor's formula and got the four derivatives at p = 0

##f^{(0)}(p) = (1 + \frac {p^2} {m^2c^2})^{\frac 1 2} ##
##f^{(0)}(0) = 1 ##

## f^{(1)}(p) = \frac {p} {m^2c^2}(1 + \frac {p^2} {m^2c^2})^{\frac {-1} 2} ##
## f^{(1)}(0) = 0 ##

## f^{(2)}(p) = \frac {1} {m^2c^2}(1 + \frac {p^2} {m^2c^2})^{\frac {-1} 2} - \frac {p^2} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2} ##
## f^{(2)}(0) = \frac {1} {m^2c^2} ##

## f^{(3)}(p) = \frac {p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2} - \frac {3p^3} {m^6c^6}(1 + \frac {p^2} {m^2c^2})^{\frac {-5} 2} ##
## f^{(3)}(0) = 0##

## f^{(4)}(p) = \frac {1} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2} +... ## (terms that are 0 when p = 0)
## f^{(4)}(0) = \frac {1} {m^4c^4} ##

Now that would give me $$ f(p) = 1 + \frac {p^2} {2! m^2c^2} + \frac {p^4} {4! m^4c^4} $$
$$ f(p) = 1 + \frac {p^2} {2m^2c^2} + \frac {p^4} {24m^4c^4} $$

But that's not right. The answer key has the following answer (and so does Wolfram) $$ f(p) = 1 + \frac {p^2} {2m^2c^2} - \frac {p^4} {8m^4c^4} $$

A picture of the answer key soln is below. Ignore the factor of ##Mc^2## outside the approximation.
1620333257276.png


I noticed that the answer doesn't even get any of the derivatives equal to 0, and I was getting all the odd derivatives equal to 0. That makes me think I'm applying Taylor's formula incorrectly and it's more than just an algebra mistake?
 
Physics news on Phys.org
  • #2
Can you check your ##f^{(3)}(p)\ ## ?

Another comment: looks as if the expansion can be done with ##p^2## as a variable (as opposed to ##p##)...

##\ ##
 
  • Like
Likes baseballfan_ny and FactChecker
  • #3
Taylor expand ##\sqrt{1+x}## to second order in ##x##. Set ##x= p^2/(mc)^2##.
 
  • Like
Likes baseballfan_ny, Mark44 and FactChecker
  • #4
Homework Statement:: Get a 4th order taylor approximation for $$ f(p) = (1 + \frac {p^2} {m^2c^2})^{\frac 1 2} $$
Relevant Equations:: $$\sum_{n=0}^\infty \frac {f^{(n)}(a) (x-a)^n} {n!}$$ around a = 0

So I just followed Taylor's formula and got the four derivatives at p = 0
. . .

. . .
Now that would give me $$ f(p) = 1 + \frac {p^2} {2! m^2c^2} + \frac {p^4} {4! m^4c^4} $$
$$ f(p) = 1 + \frac {p^2} {2m^2c^2} + \frac {p^4} {24m^4c^4} $$

But that's not right. The answer key has the following answer (and so does Wolfram) $$ f(p) = 1 + \frac {p^2} {2m^2c^2} - \frac {p^4} {8m^4c^4} $$
. . .
I agree with @BvU .
Looks like you missed or messed up the product rule in differentiating the second term in your expression for ## f^{(2)}(p) ##.
## f^{(2)}(p) = \frac {1} {m^2c^2}(1 + \frac {p^2} {m^2c^2})^{\frac {-1} 2} - \frac {p^2} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2} #### f^{(3)}(p) = \frac {p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2} - \frac {3p^3} {m^6c^6}(1 + \frac {p^2} {m^2c^2})^{\frac {-5} 2} ##
A couple of suggestions have been given to you.

You might also want to consider that your expression for ## f^{(2)}(p) ## can be significantly simplified.

I have that ##\displaystyle f^{(2)}(p) = \frac {1} {m^2c^2}\left(1 + \frac {p^2} {m^2c^2}\right)^{ \frac { {-3} } {2}}##
 
Last edited:
  • Like
Likes baseballfan_ny
  • #5
BvU said:
Can you check your f(3)(p) ?
I definitely messed something up, but I keep getting that that ##f^{(3)}(0) = 0##.

$$ f^{(2)}(p) = \frac {1} {m^2c^2}(1 + \frac {p^2} {m^2c^2})^{\frac {-1} 2} - \frac {p^2} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2} $$

$$ f^{(3)}(p) = \frac {-1} {2} \frac {1} {m^2c^2}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} {2}} \frac {2p} {m^2c^2} - \frac {2p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} {2}} - \frac {p^2} {m^4c^4} \frac {-3} {2} (1 + \frac {p^2} {m^2c^2})^{\frac {-5} {2}} \frac {2p} {m^2c^2} $$

$$ f^{(3)}(p) = - \frac {p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} {2}} - \frac {2p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} {2}} + \frac {3p^3} {m^6c^6} (1 + \frac {p^2} {m^2c^2})^{\frac {-5} {2}} $$

$$ f^{(3)}(p) = - \frac {3p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} {2}} + \frac {3p^3} {m^6c^6} (1 + \frac {p^2} {m^2c^2})^{\frac {-5} {2}} $$

which still vanishes when p = 0.

SammyS said:
You might also want to consider that your expression for f(2)(p) can be significantly simplified.

I have that

How did you make that simplification? Are our expressions for ##f^{(2)}(p)## consistent?

Orodruin said:
Taylor expand ##\sqrt{1+x}## to second order in ##x##. Set ##x= p^2/(mc)^2##.
Oh I suppose that would be easier. I think that's what the answer key did. I'm kind of wondering why are we allowed to substitute in expressions for variables that would carry different inside derivatives when applying the chain rule? Maybe that will clear up when I'm able to fix my algebra but I'm just curious.

Thanks all for the replies btw!
 
  • #6
Oh wait a sec, my diff expression of ##f^{(3)}(p)## has consequences on ##f^{(4)}(p)##!

Now I get...
##f^{(4)}(p) = - \frac {3p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} {2}} + ... ## (other terms that vanish when p = 0)

which means ##f^{(4)}(0) = \frac {-3} {m^4c^4} ## and that gives me the Taylor approximation with the 4th order coeff being ##\frac {-1} {8}##. Thanks y'all!

I'm still wondering about why the substitution works though... How come the inside derivatives don't impact anything?
 
  • Like
Likes BvU
  • #7
baseballfan_ny said:
Oh wait a sec, my diff expression of ##f^{(3)}(p)## has consequences on ##f^{(4)}(p)##!

Now I get...
##f^{(4)}(p) = - \frac {3p} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} {2}} + ... ## (other terms that vanish when p = 0)

which means ##f^{(4)}(0) = \frac {-3} {m^4c^4} ## and that gives me the Taylor approximation with the 4th order coeff being ##\frac {-1} {8}##. Thanks y'all!

I'm still wondering about why the substitution works though... How come the inside derivatives don't impact anything?
Just think about the meaning of a Taylor series. If ##f(x)=\sqrt{1+x}\approx 1+\frac{1}{2} x## when ##x=0.00001##, then when ##y=0.001##, ##y^2=x## so we should get that ##f(y^2)\approx 1+\frac{1}{2} y^2##. If there was some better approximation in terms of y, you could just use that to get a better approximation of ##f(x)## in terms of x
 
  • Like
Likes baseballfan_ny
  • #8
baseballfan_ny said:
I'm still wondering about why the substitution works though... How come the inside derivatives don't impact anything?
Must have something to do with the fact that a function of ##p^2## is even, so a Taylor expansion can't have any odd powers of ##p## in it . . .

##\ ##
 
  • #9
Orodruin said:
Taylor expand ##\sqrt{1+x}## to second order in ##x##. Set ##x= p^2/(mc)^2##.

baseballfan_ny said:
Oh I suppose that would be easier. I think that's what the answer key did. I'm kind of wondering why are we allowed to substitute in expressions for variables that would carry different inside derivatives when applying the chain rule? Maybe that will clear up when I'm able to fix my algebra but I'm just curious.

I think the answer key is using the binomial series for [tex](1 + x)^\alpha = 1 +
\alpha x + \frac{\alpha(\alpha-1)}{2}x^2 + \dots + \frac{\alpha(\alpha-1) \cdots (\alpha - n + 1)}{n!}x^n + \dots, \qquad |x| < 1,
[/tex] with [itex]x = p^2/(mc)^2[/itex] and [itex]\alpha = \frac12[/itex].
 
  • #10
baseballfan_ny said:
I definitely messed something up, but I keep getting that that ##f^{(3)}(0) = 0##.

$$ f^{(2)}(p) = \frac {1} {m^2c^2}(1 + \frac {p^2} {m^2c^2})^{\frac {-1} 2} - \frac {p^2} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2} $$How did you make that simplification? Are our expressions for ##f^{(2)}(p)## consistent?
Starting with your expression:
##\displaystyle f^{(2)}(p) = \frac {1} {m^2c^2}(1 + \frac {p^2} {m^2c^2})^{\frac {-1} 2} - \frac {p^2} {m^4c^4}(1 + \frac {p^2} {m^2c^2})^{\frac {-3} 2}##

Then noting that ##B^{-\frac {1} 2}=B\cdot B^{-\frac {3} 2}##, we have that:

##\displaystyle f^{(2)}(p) = \frac {1} {m^2c^2}\left(1 + \frac {p^2} {m^2c^2}\right) \left(1 + \frac {p^2} {m^2c^2} \right)^{-\frac {3} 2} - \frac {p^2} {m^4c^4} \left(1 + \frac {p^2} {m^2c^2}\right)^{-\frac {3} 2}##

Then do some distributing and combining of like terms.
 
Last edited:

1. What is a 4th order Taylor approximation?

A 4th order Taylor approximation is a mathematical method used to approximate a function using a polynomial of degree 4. It involves using the function's derivatives at a specific point to create a polynomial that closely matches the behavior of the function near that point.

2. How is a 4th order Taylor approximation different from other approximations?

A 4th order Taylor approximation is a higher order approximation compared to linear or quadratic approximations. This means that it takes into account more information about the function, resulting in a more accurate approximation.

3. When is a 4th order Taylor approximation useful?

A 4th order Taylor approximation is useful when trying to approximate a function that is not easily solvable or when trying to find an approximate value for a function at a specific point. It is also commonly used in physics and engineering to model the behavior of complex systems.

4. What are the limitations of a 4th order Taylor approximation?

One limitation of a 4th order Taylor approximation is that it only provides an accurate approximation near the chosen point. As the distance from the point increases, the accuracy of the approximation decreases. Additionally, the accuracy of the approximation depends on the smoothness of the function and the size of the interval used.

5. How can a 4th order Taylor approximation be improved?

A 4th order Taylor approximation can be improved by using more terms in the polynomial, which results in a higher order approximation. Additionally, using a smaller interval around the point of interest can also improve the accuracy of the approximation. Another way to improve the approximation is by using a different method, such as a Fourier series or a Chebyshev polynomial approximation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
579
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
  • Calculus and Beyond Homework Help
Replies
27
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
817
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
240
  • Calculus and Beyond Homework Help
Replies
1
Views
649
  • Calculus and Beyond Homework Help
Replies
21
Views
815
  • Calculus and Beyond Homework Help
Replies
3
Views
396
  • Calculus and Beyond Homework Help
Replies
3
Views
536
Back
Top