4th order Taylor approximation

  • #1
baseballfan_ny
91
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?
 

Answers and Replies

  • #2
BvU
Science Advisor
Homework Helper
15,278
4,254
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
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
20,004
10,650
Taylor expand ##\sqrt{1+x}## to second order in ##x##. Set ##x= p^2/(mc)^2##.
 
  • Like
Likes baseballfan_ny, Mark44 and FactChecker
  • #4
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,699
1,275
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
baseballfan_ny
91
23
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.

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?

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
baseballfan_ny
91
23
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?
 
  • #7
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
5,478
1,423
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
BvU
Science Advisor
Homework Helper
15,278
4,254
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
pasmith
Homework Helper
2022 Award
2,523
1,127
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.

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
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,699
1,275
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:

Suggested for: 4th order Taylor approximation

  • Last Post
Replies
7
Views
347
  • Last Post
Replies
5
Views
401
Replies
0
Views
297
  • Last Post
Replies
12
Views
600
Replies
2
Views
409
  • Last Post
Replies
2
Views
397
Replies
12
Views
695
Replies
9
Views
496
Replies
1
Views
404
Replies
2
Views
2K
Top