So i have to find approximate value of function e^(0,1)sin(0,49pi)
so i started to take x = 0 and x0 = 0.1 y=0.5pi and y0=-0.01pi
and after counting derivatives and plugging (0.1,0.5pi):
df/dx=1 df/dy=0 df^2/dx^2=1 df^2/dy^2=-1 df^2/dydx=0
I got this formula
T(0.1,0.49pi)= 1+0.1 - 1/2*(0.49pi)^2 +(0.1)^2/2
which led me far from the approximation which should keep being close to 1.104626...
i want to know what i did wrong in here because i used to make things like this f(x,y)+df/dx(x-x0)+df/dy(y-y0)+1/2((df^2/dx^2)(x-xo)^2+(df^2/dy^2)(y-y0)^2+(df^2/dxdy)(y-y0)(x-x0)
$f(x, y) = e^x sin(y) $
The taylor expansion is as follows:
Define the point $P_0$ about which you're expanding, and the point $P$ at which you wanna compute the function.
Now, let $V = P - P_0$ , and
Let $ G = \nabla f$ be the gradient of $f$ evaluated at $P_0$, and $H$ be its hessian matrix evaluated at $P_0$.
$ f(x, y) = f(x_0, y_0) + G^T V + \dfrac{1}{2} V^T H V $
In this example, $P_0 = (0, \dfrac{\pi}{2}) $, $V = (0.1, -0.01 \pi )$
The gradient is $ G = ( e^x sin(y) , e^x cos(y) ) $
So at $P_0$ it is equal to $G = ( 1 , 0 ) $
The hessian matrix is
$ H(x, y) = \begin{bmatrix} e^x sin(y) && e^x cos(y) \\ e^x cos(y) && - e^x sin(y) \end{bmatrix} $
So, at $P_0$ , it is equal to
$ H =\begin{bmatrix} 1 && 0 \\ 0 && -1 \end{bmatrix} $
Therefore, the Taylor expansion is
$ T = 1 + 0.1 + 0.5 (0.1^2 - (-0.01 \pi)^2 ) = 1.1045065$