How to choose the correct function to use for a Taylor expansion?

Click For Summary

Homework Help Overview

The discussion revolves around the selection of appropriate functions for Taylor expansions in the context of calculating electric fields, particularly when the variable \( z \) is much larger than \( R \). Participants explore the implications of using different functions, \( f_1(s) \) and \( f_2(s) \), and their respective Taylor expansions.

Discussion Character

  • Exploratory, Conceptual clarification, Assumption checking

Approaches and Questions Raised

  • Participants examine two different Taylor expansions and question how to choose between them based on the context of the problem. There is a focus on understanding the relationship between the functions and the variables involved, particularly how different definitions of \( s \) affect the expansions.

Discussion Status

The discussion is ongoing with participants sharing insights about the equivalence of results derived from different Taylor expansions. Some guidance has been offered regarding the importance of considering the entire expression for the electric field when \( z \) is significantly larger than \( R \), but no consensus has been reached on a definitive approach.

Contextual Notes

Participants note that the definitions of \( s \) differ between the two functions, which may influence the choice of Taylor expansion. The implications of these definitions and their impact on the results are under consideration.

zenterix
Messages
774
Reaction score
84
Homework Statement
I have a question regarding a mathematical tool used a lot in physics apparently: Taylor expansions.
Relevant Equations
Here is the context.

I calculated the electric field at a particular point in 3D space.

$$E_p=\begin{cases}
\frac{2k_eQ}{R^2}(1-\frac{z}{(z^2+R^2)^{1/2}}) & \text{for } z \geq 0\\
\frac{2k_eQ}{R^2}(-1-\frac{z}{(z^2+R^2)^{1/2}}) & \text{for } z < 0\\
\end{cases}$$

And I am interested in knowing what happens when ##z>>R##

First, to isolate just the mathematical operation of Taylor expansion, let's consider

$$\frac{z}{(z^2+R^2)^{1/2}}$$
$$=\frac{1}{(1+\frac{R^2}{z^2})^{1/2}}$$

When ##z>>R## we also have ##\frac{R}{z}## and ##\frac{R^2}{z^2}## both approach zero.
Consider two different Taylor expansions.

First, let ##f_1(s)=(1+s)^{1/2}##

$$f_1'(s)=-\frac{1}{2(1+s^{3/2})}$$

Near ##s=0##, we have the first order Taylor expansion
$$f_1(s) \approx 1 - \frac{s}{2}$$

Now consider a different choice for ##f(s)##

$$f_2(s)=(1+s^2)^{1/2}$$
$$f_2'(s)=-\frac{s}{(1+s)^{3/2}}$$
$$f_2''(s)=-\frac{1}{(1+s)^{1/2}}+\frac{3s^2}{(1+s^2)^{5/2}}$$

Near ##s=0##, we have the first order Taylor expansion
$$f_2(s)\approx 1$$

and the second order Taylor expansion
$$f_2(s) \approx 1 - \frac{s^2}{2}$$

My question is simply: how do we choose which approximation to use?

Considering the original context of what happens to the electric field if ##z>>R##, it appears that the choice of Taylor expansion doesn't affect the result. I guess I am trying to wrap my head around the intuition of why this is.

If I use ##f_1##, then

$$E_p=\begin{cases}
\frac{2k_eQ}{R^2}(1-1+\frac{R^2}{2z^2}) & \text{for } z \geq 0\\
\frac{2k_eQ}{R^2}(-1-1+\frac{R^2}{2z^2}) & \text{for } z < 0\\
\end{cases}$$

$$E_p=\begin{cases}
\frac{k_eQ}{z^2} & \text{for } z \geq 0\\
\frac{k_eQ}{z^2}-\frac{4k_eQ}{R^2} & \text{for } z < 0\\
\end{cases}$$

If I use ##f_2##, then

$$E_p=\begin{cases}
\frac{2K_eQ}{R^2}(1-1+\frac{R^4}{2z^4}) & \text{for } z \geq 0\\
\frac{2K_eQ}{R^2}(-1-1+\frac{R^4}{2z^4}) & \text{for } z < 0\\
\end{cases}$$

$$E_p=\begin{cases}
\frac{k_eQ}{z^2} & \text{for } z \geq 0\\
\frac{k_eQ}{z^2}-\frac{4k_eQ}{R^2} & \text{for } z < 0\\
\end{cases}$$

ie, same result in both cases.Here are some plots

1636558155318.png
1636558507874.png

1636558245236.png
1636558271728.png

1636558292263.png
 
Last edited:
Physics news on Phys.org
zenterix said:
My question is simply: how do we choose which approximation to use?
It depends how precise an answer you want.
 
PeroK said:
It depends how precise an answer you want.
Inoticed that both calculations give the same result ultimately. The result differs in the variable ##s## but it is the same in ##R## and ##z##.
 
zenterix said:
Inoticed that both calculations give the same result ultimately. The result differs in the variable ##s## but it is the same in ##R## and ##z##.
I'm not sure I know what that means.
 
What I mean is that if you just consider the functions ##f_1## and ##f_2## as I defined them, they are in fact two different functions of ##s##. The Taylor expansions will be different for each function.

However, we actually defined ##s## differently in each case. For ##f_1## we had ##s=\frac{R}{z}## and for ##f_2## we had ##s=\frac{R^2}{z^2}##. When we substitute these ##s## expressions into the respective Taylor expansions, the Taylor expansions are the same.
 
zenterix said:
What I mean is that if you just consider the functions ##f_1## and ##f_2## as I defined them, they are in fact two different functions of ##s##. The Taylor expansions will be different for each function.

However, we actually defined ##s## differently in each case. For ##f_1## we had ##s=\frac{R}{z}## and for ##f_2## we had ##s=\frac{R^2}{z^2}##. When we substitute these ##s## expressions into the respective Taylor expansions, the Taylor expansions are the same.
That makes sense. They must be the same.
 
I think I've gotten some practice some with Taylor expansions :)
 
  • Like
Likes   Reactions: PeroK
zenterix said:
Homework Statement:: I have a question regarding a mathematical tool used a lot in physics apparently: Taylor expansions.
Relevant Equations:: Here is the context.

I calculated the electric field at a particular point in 3D space.

$$E_p=\begin{cases}
\frac{2k_eQ}{R^2}(1-\frac{z}{(z^2+R^2)^{1/2}}) & \text{for } z \geq 0\\
\frac{2k_eQ}{R^2}(-1-\frac{z}{(z^2+R^2)^{1/2}}) & \text{for } z < 0\\
\end{cases}$$

And I am interested in knowing what happens when ##z>>R##
I would assume that you are interested in knowing what happens to the electric field, not part of the electric field, when ##z>>R##. In that case, your function should be the entire expression for the electric field, not just a piece of it. That is always safe. You have $$E_p=\begin{cases}
\frac{2k_eQ}{R^2}(1-\frac{z}{(z^2+R^2)^{1/2}}) & \text{for } z \geq 0\\
\frac{2k_eQ}{R^2}(-1-\frac{z}{(z^2+R^2)^{1/2}}) & \text{for } z < 0\\
\end{cases}.$$ You can expand the top function in Taylor series and then note that if you subtract ##2\times \dfrac{2k_eQ}{R^2}## from the top function, you get the bottom function. So if you expand the top function to any order, you immediately have the bottom function to the same order. That is also safe.
 
  • Like
Likes   Reactions: zenterix

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
Replies
2
Views
1K
  • · Replies 17 ·
Replies
17
Views
1K
  • · Replies 33 ·
2
Replies
33
Views
2K
  • · Replies 21 ·
Replies
21
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
2
Views
971
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
3
Views
716