Message Boards Message Boards

Avoid issue in the function Series[] ?

GROUPS:

I needed to make the first order Taylor series with the function Series. I received a second order term in the result. Mathematica version 11.0.1.0 on Mac.

I think that something is wrong with the function Series[]. I take a simple function as example In[15] and want to obtain Taylor series of the first order on x,y near point (0,0). I received an expression Out[18] which has last term 0.741907xy which is the second order. A right expression Out[19] different from Out[18] can be received by direct calculating Taylor series, In[19]

Clear[f, x, y]
f[x_, y_] = Sin[1 + x + y]/(2 + Cos[2 - x + y])

seri1 = Series[f[x, y], {x, 0, 1}, {y, 0, 1}] // N
seri2 = Expand[Normal[seri1]]
seri3 = N[f[0, 0] + x*(D[f[x, y], x] /. {x -> 0, y -> 0}) + y*(D[f[x, y], y] /. {x -> 0, y -> 0})]
Attachments:
POSTED BY: Ivan Siahlo
Answer
2 months ago

Both x and y are up to first order. The 'cross-term' is then of order 2 in x AND y, but it is of order 1 in both x and y... I think this is normal behaviour.

POSTED BY: Sander Huisman
Answer
2 months ago

The result is correct and is exactly what was requested in the input. If a result based on total degree is wanted, best is to a univariate substitution, as done here. In brief:

f[x_, y_] = Sin[1 + x + y]/(2 + Cos[2 - x + y]);
seri1 = N[Expand[Normal[
     Series[f[x, y] /. Thread[{x, y} -> t*{x, y}], {t, 0, 1}]] /.  t -> 1]]

(* Out[276]= 0.531280931986 + 0.0361207230645 x + 0.646142403765 y *)
POSTED BY: Daniel Lichtblau
Answer
2 months ago

Group Abstract Group Abstract