Find average from a Taylor's expansion

In summary, the conversation discusses expanding a function by Taylor's expansion and evaluating its average value over a small cube. The formula for the average is given and simplified to include only necessary terms. It is noted that the first order approximation does not contribute to the average, so the second order approximation is needed to measure the deviation from the center value. The Laplacian will come into play through the evaluation of the integrals of the second order terms.
  • #1
ognik
643
2
The question is:
Expand a function $ {\phi}(x, y, z) $ by Taylor’s expansion. Evaluate $ \overline{\phi} $ the average value of $ {\phi} $, averaged over a small cube of side $ l $ centered on the origin and show that the Laplacian of  is a measure of deviation of  $ {\phi} $ from (0, 0, 0).

I got the expansion - $ f(a,b,c) + \pd{f}{x}(x-a) + \pd{f}{y}(y-b) + ...+\pd{^2{f}}{{x}^2}{\left(x-a\right)}^{2} + ...$

I sketched a cub of sides $l$ centered on the origin, so each axis is $l/2$ from the side(s) of the cube, so far so good (I think)

I think all the (x-a), (y-b) etc. terms become $ (x-l), (y-l) $ etc. and $ -\frac{l}{2}\le x \le \frac{l}{2} $ etc.

But there I grind to a halt. How does one find an average from this expansion?
 
Physics news on Phys.org
  • #2
Ho ognik,

There's a factor $\frac 12$ missing in the expansion. :eek:

The formula for the average is:
$$\bar f=\frac{\iiint f dV}{~\iiint dV}$$
 
  • #3
that makes it a half-hearted transcription... ;-)

That formula makes sense (sort of per unit volume) - so the divisor would just be $ \int\int\int 1 dx dy dz $ ?
Thanks
 
  • #4
ognik said:
that makes it a half-hearted transcription... ;-)

That formula makes sense (sort of per unit volume) - so the divisor would just be $ \int\int\int 1 dx dy dz $ ?
Thanks

Yep!

So let's take it up to the first order.
Then we get:
$$\bar f=\frac{\iiint \Big[f(a,b,c) + \pd f x(a,b,c) (x-a)+ \pd f y(a,b,c) (x-b)+ \pd f z(a,b,c) (x-c)\Big]dxdydz}{l^3}$$
How can that be simplified? (Wondering)
 
  • #5
So we can discard terms in x2 etc. & higher, because we're working with a small cube (l < 1 at least)?

The first term is again $ {l}^{3} $, so I was expecting to find an $ {l}^{3} $ factor in all the other terms which I did, but ended with the messy looking $ 1 + {f}^{'}\left(a,b,c\right) 3. \left (\frac{1}{2}l - 1 \right) $ .
I am not confident with this:

Taking one of the variable terms: $ \int\int\int {f}^{'}\left(a,b,c\right)\left(x-a\right)dxdydz $
$ {f}^{'}\left(a,b,c\right) $ is a constant, so =$ {f}^{'}\left(a,b,c\right) \int\int\int \left(x-a\right)dxdydz $ = $ {f}^{'}\left(a,b,c\right)\left(\frac{1}{2}l - 1 \right){l}^{3} $

So we have the 1st term + 3 of these symmetric terms and the final answer appears to be $ 1 + {f}^{'}\left(a,b,c\right) 3. \left (\frac{1}{2}l - 1 \right) $?
( $ {f}^{'}\left(a,b,c\right) = {f}^{'}\left(l\right) $ )

In anticipation of the final part, would the laplacian for the correct $ \overline{f} $ be $ \pd{^{3}{\overline f(l)}}{{l}^{3}} $?
 
  • #6
ognik said:
So we can discard terms in x2 etc. & higher, because we're working with a small cube (l < 1 at least)?

We don't know yet.
Yes, we're working with a small cube, so we will want to ignore higher order terms.
But as yet, we'll have to figure out which order terms we'll need.
Taking one of the variable terms: $ \int\int\int {f}^{'}\left(a,b,c\right)\left(x-a\right)dxdydz $
$ {f}^{'}\left(a,b,c\right) $ is a constant, so =$ {f}^{'}\left(a,b,c\right) \int\int\int \left(x-a\right)dxdydz $ = $ {f}^{'}\left(a,b,c\right)\left(\frac{1}{2}l - 1 \right){l}^{3} $

Let's denote $f_x = \pd f x(a,b,c)$, which is pretty standard.
(Using $f'$ for $\pd f x$ can get a bit confusing when $y$ and $z$ are also involved.)

Then:
$$\iiint \pd f x(a,b,c) (x-a) dx\,dy\,dz = \iiint f_x (x-a) dx\,dy\,dz = f_x \iint dy\,dz \int_{a-l/2}^{a+l/2}(x-a)dx \\ = f_x l^2 \int_{-l/2}^{+l/2}u\,du
= f_x l^2 \Big[\frac 12u^2\Big]_{-l/2}^{+l/2}$$

See where this is going? (Wondering)
 
  • #7
I had done it pretty much like that, up to the point where you do the u subst. I'm sure yours is correct, except I then get zero for those terms - is that right?

Other Questions:
If the final answer = 1, then the laplacian = 0, which would no deviation from (0,0,0)?

For $ \int_{}^{} (x-a) \,dx $ instead of a u-subst. I did this: $ \int_{}^{} x\,dx - \int_{}^{} a\,dx $, again why would that be wrong please?

Thanks ILS :-)
 
  • #8
ognik said:
I had done it pretty much like that, up to the point where you do the u subst. I'm sure yours is correct, except I then get zero for those terms - is that right?

Yep. That is right.

Consider what we're doing.

The zeroeth order approximation is a constant.
Obviously its average over a volume is that same constant.

The first order approximation is a linear approximation.
If on one side it is sloping up, it's sloping down with the same amount on the other side.
Net effect on the average is zero.

So we'll need the second order approximation to get how much the average deviates from the center value.
Other Questions:
If the final answer = 1, then the laplacian = 0, which would no deviation from (0,0,0)?

Huh? :confused:

The next step is to evaluate the integrals of the 2nd order terms $\frac 1{2!}f_{xx}(x-a)^2$ respectively $\frac 1{2!}\cdot 2 f_{xy}(x-a)(y-b)$.
From those a laplacian will make its entrance.
For $ \int_{}^{} (x-a) \,dx $ instead of a u-subst. I did this: $ \int_{}^{} x\,dx - \int_{}^{} a\,dx $, again why would that be wrong please?

It wouldn't be wrong.
If you show your steps, we can see where a mistake crept in.
(In practice that usually happens either when doing a substitution, or when manipulating plus and minus signs.)
 
  • #9
Hi ILS, this is one of those Qs which helps me fill in understanding gaps, so I appreciate your patience - but have some questions in the meantime please:

1. With the limits, why is it $ a\pm\frac{l}{2} $ ? My thinking was - the cube is centred on (0,0,0) with length l, therefore x goes from $ - \frac{l}{2} $ to $ + \frac{l}{2} $ ?

2. How do we know "..it's sloping down with the same amount on the other side"?

3. "we'll need the second order approximation to get how much the average deviates from the center value" - I know for simple motion, 2nd order is acceleration, could you think of some intuition to illustrate why the 2nd order is useful here/what it 'means'?

4. So the Laplacian is just the 2nd order terms of the expansion? (I was thinking they wanted me to apply the laplacian to the average function series I found - ironically a reason I was reluctant to look at the 2nd order terms :-)).
-------------------------
For the hybrid terms (x-a)(y-b) etc. I get zero.
For the other terms I get $ \frac{1}{6}{l}^{5}\left( {f}_{xx} + {f}_{yy} + {f}_{zz} \right) $ - is that right so far?
Thanks again.
 
Last edited:
  • #10
ognik said:
1. With the limits, why is it $ a\pm\frac{l}{2} $ ? My thinking was - the cube is centred on (0,0,0) with length l, therefore x goes from $ - \frac{l}{2} $ to $ + \frac{l}{2} $ ?

Ah yes.
In the Taylor expansion you introduced $a$, $b$, and $c$, but we should replace them by $0$.
And apparently we should also use $\phi$ instead of $f$.

2. How do we know "..it's sloping down with the same amount on the other side"?

The slope in the x-direction is $\pd f x(0,0,0)$, which is constant.
If we calculate the surface under a section of a line, it's slope doesn't matter - the surface area is the y-coordinate in the center times the width.

3. "we'll need the second order approximation to get how much the average deviates from the center value" - I know for simple motion, 2nd order is acceleration, could you think of some intuition to illustrate why the 2nd order is useful here/what it 'means'?

Not really. Just that it is the 2nd order approximation, which is quadratic.
Since the 1st order approximation has zero effect, we need a higher order.
4. So the Laplacian is just the 2nd order terms of the expansion? (I was thinking they wanted me to apply the laplacian to the average function series I found - ironically a reason I was reluctant to look at the 2nd order terms :-)).

Only the terms where we differentiate the same coordinate twice.

For the hybrid terms (x-a)(y-b) etc. I get zero.

Correct.

For the other terms I get $ \frac{1}{6}{l}^{5}\left( {f}_{xx} + {f}_{yy} + {f}_{zz} \right) $ - is that right so far?
Thanks again.

I get a contribution to the average of $\frac{1}{24}{l}^{2}\left( {f}_{xx} + {f}_{yy} + {f}_{zz} \right) = \frac{1}{24}{l}^{2} \Delta f$

Note that $\int u^2 du = \frac 13 u^3 \Big|_{-l/2}^{l/2} = \frac 13 ((l/2)^3-(-l/2)^3) = \frac 1{12} l^3$.
 
  • #11
Ah, yes - 1/24 (I somehow didn't cube the 1/2). And I did bring in the a,b,c - I need to pay more attention to detail!
I think my extra l2 comes from the $ \int\int dy dz $ ?

If that's right, then with the divisor we have $ \overline{\phi} = 1+ \frac{1}{24} l^2 (\phi_{xx} +\phi_{yy} +\phi_{zz} ) = 1+ \frac{1}{24} l^2\Delta \phi $ ?

As you predicted, the laplacian made its appearance, but the '1' confuses me - although I think I've seen something like $ \left(1 + k \Delta \right)\phi $ somewhere" ...but you said "So we'll need the second order approximation to get how much the average deviates from the center value" - does '1' represent the average and the 2nd order the deviation? Why? Thanks.
 
  • #12
ognik said:
Ah, yes - 1/24 (I somehow didn't cube the 1/2). And I did bring in the a,b,c - I need to pay more attention to detail!
I think my extra l2 comes from the $ \int\int dy dz $ ?

I suspect your extra $\color{red}l^3$ comes from not dividing by the volume yet.

The fact that $l^2$ remains, is because the 2nd derivative has effectively divided the function value by length twice, meaning that has to be compensated.
And indeed, $l^2$ signifies the 2nd order approximation.
The deviation from the actual average will be less than some constant times $l^3$.

If that's right, then with the divisor we have $ \overline{\phi} = 1+ \frac{1}{24} l^2 (\phi_{xx} +\phi_{yy} +\phi_{zz} ) = 1+ \frac{1}{24} l^2\Delta \phi $ ?

As you predicted, the laplacian made its appearance, but the '1' confuses me - although I think I've seen something like $ \left(1 + k \Delta \right)\phi $ somewhere" ...but you said "So we'll need the second order approximation to get how much the average deviates from the center value" - does '1' represent the average and the 2nd order the deviation? Why? Thanks.

I don't know where your $1$ is coming from - it should be $\phi(0,0,0)$.
So:
$$\overline{\phi} \approx \phi(0,0,0) + \frac{1}{24} l^2\Delta \phi$$

In other words, as your problem statement said to show: "the Laplacian of $\phi$ is a measure of deviation of $\overline \phi$ from $\phi(0, 0, 0)$."
(I've added $\phi$ and $\overline\phi$ where it seemed to be missing in the OP.)
 
  • #13
Thanks again for your patience.
My '1' came from the 0th order - $ \phi\left(0,0,0\right)\int\int\int dx dy dz $; divided by $ l^3 $ = 1. But of course that is $ \phi\left(0,0,0\right) $ - so I'm happy :-)

Quick notation question - I have been reluctant to use $ {\phi}_{x} = \pd{\phi}{x} (\ne \d{\phi}{x}) $ because it could also be the x component of a vector or function. Do we just rely on the context, or is there some rule?

I also get mixed up with $ \Delta \: and \: \nabla $.
$ \Delta $ can be either del or the Laplace operator, but $ \nabla ^ 2 $ can also be Laplace ? I trolled through wiki and ended up losing track - hope you might have some wise words for me :-) Thanks.
 
  • #14
ognik said:
Quick notation question - I have been reluctant to use $ {\phi}_{x} = \pd{\phi}{x} (\ne \d{\phi}{x}) $ because it could also be the x component of a vector or function. Do we just rely on the context, or is there some rule?

The rule of thumb is: if it is obvious from the context, we can just use it. If it's not, we either have to specify it (as I did) or otherwise not use it.
Oh, and let's not use 2 different meanings in the same context.
Btw, as long as you specify a notation, you can do whatever you want, including inventing your own.
I also get mixed up with $ \Delta \: and \: \nabla $.
$ \Delta $ can be either del or the Laplace operator, but $ \nabla ^ 2 $ can also be Laplace ? I trolled through wiki and ended up losing track - hope you might have some wise words for me :-) Thanks.

The symbol $\Delta$ is never del (also known as nabla or gradient or $\nabla$). (Nerd)
However, it is most commonly used for delta, which is a difference in a value.
We might write for instance $\Delta \phi = \phi(x,y,z) - \phi(0,0,0)$.The symbol $\nabla$ is nabla (or del or gradient) and means:
$$\nabla = \begin{pmatrix}\pd {}x\\ \pd {}y\\ \pd {}z\end{pmatrix}$$
As a consequence we have the dot product:
$$\nabla \cdot \nabla = \frac {\partial^2}{\partial x^2} + \frac {\partial^2}{\partial y^2} + \frac {\partial^2}{\partial z^2}$$
which is called the laplacian and can also be written as $\nabla^2$ or $\Delta$.
So if you want to use $\Delta$ for delta, I suggest not using it for the laplacian, which is easy, since we can also use $\nabla^2$ for the laplacian.To summarize, we might write:
$$\Delta\phi = \overline\phi - \phi_0 \approx \frac 1 {24} l^2 \nabla^2\phi$$
(Wasntme)
 

Related to Find average from a Taylor's expansion

1. What is a Taylor's expansion?

A Taylor's expansion is a mathematical tool used to approximate a function using a polynomial. It is based on the concept that any function can be represented as an infinite sum of terms, each with a different degree of the independent variable.

2. How do you find the average from a Taylor's expansion?

The average from a Taylor's expansion can be found by taking the coefficient of the first-order term, also known as the linear term. This term represents the slope of the function at a specific point, and the average is equal to the y-value of the function at that point.

3. What is the purpose of finding the average from a Taylor's expansion?

Finding the average from a Taylor's expansion allows us to approximate a function in a specific range around a given point. This can be helpful in solving complex mathematical problems or analyzing data.

4. Can a Taylor's expansion be used to find the average of any function?

Yes, a Taylor's expansion can be used to find the average of any function as long as the function is differentiable at the given point. Additionally, the more terms included in the expansion, the more accurate the average will be.

5. Are there any limitations to using a Taylor's expansion to find the average?

One limitation is that a Taylor's expansion can only approximate a function within a specific range around a given point. It may not accurately represent the behavior of the function outside of this range. Additionally, including too many terms in the expansion can lead to computational errors.

Similar threads

Replies
2
Views
2K
Replies
3
Views
4K
  • Calculus
Replies
15
Views
2K
Replies
3
Views
973
  • Math POTW for Graduate Students
Replies
2
Views
764
Replies
3
Views
1K
Replies
5
Views
601
Replies
5
Views
1K
Replies
3
Views
2K
Back
Top