I have tried find the Taylor series expansion for my multivariable function, f[x_, y_, z_] := Exp[I*(x^2 + y^2 + z^2)^(1/2)]
of order 3.
This is what I tried, Expandedfunction = Normal[Series[f[(x - x0)*t + x0, (y - y0)*t + y0, (z - z0)*t + z0], {t, 0, 3}]] /. t -> 1
I followed this answer/question: Multivariable Taylor expansion does not work as expected
However, my output does not get rid of the x0, y0, and z0. This is my Mathematica output,
E^(I Sqrt[x0^2 + y0^2 + z0^2]) - (
I E^(I Sqrt[
x0^2 + y0^2 + z0^2]) (-x x0 + x0^2 - y y0 + y0^2 - z z0 +
z0^2))/Sqrt[x0^2 + y0^2 + z0^2] +
1/2 E^(I Sqrt[
x0^2 + y0^2 +
z0^2]) (-((-x x0 + x0^2 - y y0 + y0^2 - z z0 + z0^2)^2/(
x0^2 + y0^2 + z0^2)) + (
I (x0^2 y^2 - 2 x x0 y y0 + x^2 y0^2 + x0^2 z^2 + y0^2 z^2 -
2 x x0 z z0 - 2 y y0 z z0 + x^2 z0^2 + y^2 z0^2))/(x0^2 +
y0^2 + z0^2)^(3/2)) +
1/3 E^(I Sqrt[
x0^2 + y0^2 + z0^2]) ((
3 I (-x x0 + x0^2 - y y0 + y0^2 - z z0 + z0^2) (x0^2 y^2 -
2 x x0 y y0 + x^2 y0^2 + x0^2 z^2 + y0^2 z^2 - 2 x x0 z z0 -
2 y y0 z z0 + x^2 z0^2 + y^2 z0^2))/(
2 (x0^2 + y0^2 + z0^2)^(
5/2)) + ((-x x0 + x0^2 - y y0 + y0^2 - z z0 + z0^2) (x0^2 y^2 -
2 x x0 y y0 + x^2 y0^2 + x0^2 z^2 + y0^2 z^2 - 2 x x0 z z0 -
2 y y0 z z0 + x^2 z0^2 + y^2 z0^2))/(x0^2 + y0^2 + z0^2)^2 - (
I (-x x0 + x0^2 - y y0 + y0^2 - z z0 +
z0^2) (-((-x x0 + x0^2 - y y0 + y0^2 - z z0 + z0^2)^2/(
x0^2 + y0^2 + z0^2)) + (
I (x0^2 y^2 - 2 x x0 y y0 + x^2 y0^2 + x0^2 z^2 + y0^2 z^2 -
2 x x0 z z0 - 2 y y0 z z0 + x^2 z0^2 + y^2 z0^2))/(x0^2 +
y0^2 + z0^2)^(3/2)))/(2 Sqrt[x0^2 + y0^2 + z0^2]))
I thought that my expanded function would not have x0, y0, and z0 terms. My end goal is to evaluate my function f[x, y, z]
at some point {x, y, z}, but using the Taylor approximated function of order 3 instead. Later, I want to compare my answers such that when I increase the order, the approximated Taylor Polynomial @ {x, y, z} approaches the "exact" function f[x, y, z].
For example for the point {1, 2, 3}, I want to see the following to happen if I increase the order of the Taylor Polynomial.
Expandedfunction/.{x->1, y->2, z->3} ~ f[1, 2, 3]
What am I doing wrong or misunderstanding?