Taylor expansion of second order

In summary, the conversation involves finding the Taylor expansion of second order for two given functions with a center point. The summary includes the formula for the Taylor expansion, the calculations for each function, and a suggestion to improve the calculation for one of the functions.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

I have to find the Taylor expansion of second order of the following functions with center the given point $(x_0, y_0)$.

  1. $f(x, y)=(x+y)^2, x_0=0, y_0=0$
  2. $f(x, y)=e^{-x^2-y^2}\cos (xy), x_0=0, y_0=0$

I have done the following:

The Taylor expansion of second order of $f: \mathbb{R}^n \rightarrow \mathbb{R}$ is:

$$f(\overrightarrow{x_0}+\overrightarrow{h})=f(\overrightarrow{x_0})+\sum_{i=1}^{n}h_i \frac{\partial{f}}{\partial{x_i}}(\overrightarrow{x_0})+\frac{1}{2}\sum_{i,j=1}^{n}h_ih_j\frac{\partial^2{f}}{\partial{x_i}\partial{x_j}}(\overrightarrow{x_0})+R_2(\overrightarrow{h}, \overrightarrow{x_0})$$

where $\frac{R_2(\overrightarrow{h}, \overrightarrow{x_0})}{||\overrightarrow{h}||^2} \rightarrow 0$ when $\overrightarrow{h} \rightarrow \overrightarrow{0}$.

  1. $$f((x_0, y_0)+(h_1, h_2))=f(x_0, y_0)+h_1\frac{\partial{f}}{\partial{x}}(x_0, y_0)+h_2\frac{\partial{f}}{\partial{y}}(x_0, y_0)+\frac{1}{2}h_1^2\frac{\partial^2{f}}{\partial{x^2}}(x_0, y_0)+\frac{1}{2}h_1 h_2 \frac{\partial^2{f}}{\partial{x}\partial{y}}(x_0, y_0)+\frac{1}{2}h_2h_1\frac{\partial^2{f}}{\partial{y}\partial{x}}(x_0, y_0)+\frac{1}{2}h_2^2\frac{\partial^2{f}}{\partial{y^2}}(x_0, y_0)+R_2(\overline{h}, (x_0, y_0))$$

    We have:

    $$f(0, 0)=0 \\ \frac{\partial{f}}{\partial{x}}=2(x+y) \Rightarrow \frac{\partial{f}}{\partial{x}}(0,0)=0 \\ \frac{\partial{f}}{\partial{y}}=2(x+y) \Rightarrow \frac{\partial{f}}{\partial{y}}(0,0)=0 \\ \frac{\partial^2{f}}{\partial{x^2}}=2 \Rightarrow \frac{\partial^2{f}}{\partial{x^2}}(0,0)=2 \\ \frac{\partial^2{f}}{\partial{y^2}}=2 \Rightarrow \frac{\partial^2{f}}{\partial{y^2}}(0,0)=2 \\ \frac{\partial^2{f}}{\partial{x}\partial{y}}=2 \Rightarrow \frac{\partial^2{f}}{\partial{x}\partial{y}}(0,0)=2$$

    So $$f(h_1, h_2)=\frac{1}{2}h_1^22+h_1h_22+\frac{1}{2}h_2^22+R_2(\overrightarrow{h}, \overrightarrow{0})=h_1^2+2h_1h_2+h_2^2+R_2(\overrightarrow{h}, \overrightarrow{0})=(h_1+h_2)^2+R_2(\overrightarrow{h}, \overrightarrow{0})$$ Since $f(h_1, h_2)=f(h_1, h_2)+R_2(\overrightarrow{h}, \overrightarrow{0})$

    so $R_2(\overrightarrow{h}, \overrightarrow{0})=0$
  2. $$f((x_0, y_0)+(h_1, h_2))=f(x_0, y_0)+h_1\frac{\partial{f}}{\partial{x}}(x_0, y_0)+h_2\frac{\partial{f}}{\partial{y}}(x_0, y_0)+\frac{1}{2}h_1^2\frac{\partial^2{f}}{\partial{x^2}}(x_0, y_0)+\frac{1}{2}h_1 h_2 \frac{\partial^2{f}}{\partial{x}\partial{y}}(x_0, y_0)+\frac{1}{2}h_2h_1\frac{\partial^2{f}}{\partial{y}\partial{x}}(x_0, y_0)+\frac{1}{2}h_2^2\frac{\partial^2{f}}{\partial{y^2}}(x_0, y_0)+R_2(\overrightarrow{h}, (x_0, y_0))$$

    We have:

    $$f(0,0)=1 \\ \frac{\partial{f}}{\partial{x}}=e^{-x^2-y^2}(-2x\cos (xy)-y\sin (xy)) \Rightarrow \frac{\partial{f}}{\partial{x}}(0,0)=0 \\ \frac{\partial{f}}{\partial{y}}=e^{-x^2-y^2}(-2y\cos (xy)-x\sin (xy)) \Rightarrow \frac{\partial{f}}{\partial{y}}(0,0)=0 \\ \frac{\partial^2{f}}{\partial{x^2}}=e^{-x^2-y^2}((4x^2-y^2-2)\cos (xy)+4xy\sin (xy)) \Rightarrow \frac{\partial^2{f}}{\partial{x^2}}(0,0)=-2 \\ \frac{\partial^2{f}}{\partial{y^2}}=e^{-x^2-y^2}((-4y^2-xy-2)\cos (xy)+4 xy \sin (xy)) \Rightarrow \frac{\partial^2{f}}{\partial{y^2}}(0,0)=-2 \\ \frac{\partial^2{f}}{\partial{x}\partial{y}}=e^{-x^2-y^2}(3xy \cos(xy)+(2y^2+2xy-1)\sin (xy)) \Rightarrow \frac{\partial^2{f}}{\partial{x}\partial{y}}(0,0)=0$$

    So $$f(h_1, h_2)=1+\frac{1}{2}h_1^2(-2)+\frac{1}{2}h_2^2(-2)+R_2(\overrightarrow{h}, \overrightarrow{0})=1-h_1^2-h_2^2+R_2(\overrightarrow{h}, \overrightarrow{0})$$
    where $\frac{R_2(\overrightarrow{h}, \overrightarrow{0})}{||\overrightarrow{h}||^2} \rightarrow 0$ when $\overrightarrow{h} \rightarrow \overrightarrow{0}$.

Is this correct?? (Wondering) Could I improve something at the formulation?? (Wondering)
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Hi! (Blush)

mathmari said:
  1. $f(x, y)=(x+y)^2, x_0=0, y_0=0$

You're expansion looks fine. (Nod)

You can do it a bit quicker though.
From the definition of $f$ we have:
$$f(x_0+h_1, y_0+h_2)=f(0+h_1, 0+h_2)=(h_1+h_2)^2=h_1^2 + 2h_1 h_2 + h_2^2$$
This is a 2nd order polynomial and as such it will be equal to the Taylor expansion with $R_2(\overrightarrow{h}, \overrightarrow{0})=0$. (Emo)
2. $f(x, y)=e^{-x^2-y^2}\cos (xy), x_0=0, y_0=0$

$$\frac{\partial{f}}{\partial{x}}=e^{-x^2-y^2}(-2x\cos (xy)-y\sin (xy)) \Rightarrow \frac{\partial{f}}{\partial{x}}(0,0)=0 \\ \frac{\partial{f}}{\partial{y}}=e^{-x^2-y^2}(-2y\cos (xy)-x\sin (xy)) \Rightarrow \frac{\partial{f}}{\partial{y}}(0,0)=0 \\ \frac{\partial^2{f}}{\partial{x^2}}=e^{-x^2-y^2}((4x^2-y^2-2)\cos (xy)+4xy\sin (xy)) \Rightarrow \frac{\partial^2{f}}{\partial{x^2}}(0,0)=-2 \\ \frac{\partial^2{f}}{\partial{y^2}}=e^{-x^2-y^2}((-4y^2-xy-2)\cos (xy)+4 xy \sin (xy)) \Rightarrow \frac{\partial^2{f}}{\partial{y^2}}(0,0)=-2 \\ \frac{\partial^2{f}}{\partial{x}\partial{y}}=e^{-x^2-y^2}(3xy \cos(xy)+(2y^2+2xy-1)\sin (xy)) \Rightarrow \frac{\partial^2{f}}{\partial{x}\partial{y}}(0,0)=0$$

I believe your calculations of $\frac{\partial^2{f}}{\partial{y^2}}$ and $\frac{\partial^2{f}}{\partial{x}\partial{y}}$ are not correct although the resulting values are correct. (Worried)

For the rest it looks fine to me. (Nod)
 

Related to Taylor expansion of second order

What is the Taylor expansion of second order?

The Taylor expansion of second order is a mathematical technique used to approximate a function by representing it as a polynomial. It is a more accurate representation of a function compared to the first order Taylor expansion, as it includes the first and second derivatives of the function.

Why is the second order Taylor expansion important?

The second order Taylor expansion is important because it allows us to approximate a function at a specific point, as well as estimate the behavior of the function around that point. This can be useful in various areas of science and engineering, such as in optimization problems or in predicting the behavior of physical systems.

What is the formula for the second order Taylor expansion?

The formula for the second order Taylor expansion is f(x) = f(a) + f'(a)(x-a) + \frac{1}{2}f''(a)(x-a)^2, where f(x) is the function, a is the point of expansion, f'(x) is the first derivative of the function, and f''(x) is the second derivative of the function.

Can the second order Taylor expansion be used for any function?

No, the second order Taylor expansion can only be used for functions that are infinitely differentiable (i.e. have continuous derivatives of all orders). If a function is not infinitely differentiable, the Taylor expansion may not provide an accurate approximation of the function.

How is the second order Taylor expansion different from the first order Taylor expansion?

The second order Taylor expansion includes the second derivative of the function, while the first order Taylor expansion only includes the first derivative. This makes the second order Taylor expansion a more accurate approximation of the function, especially for functions with non-linear behavior. Additionally, the first order Taylor expansion only provides a linear approximation, while the second order Taylor expansion provides a quadratic approximation.

Similar threads

Replies
5
Views
479
Replies
1
Views
1K
Replies
4
Views
3K
Replies
1
Views
2K
  • Special and General Relativity
Replies
14
Views
816
  • Calculus
Replies
2
Views
1K
Replies
3
Views
1K
Replies
1
Views
1K
Back
Top