- #1

- 1,707

- 5

- Mathematica
- Thread starter ice109
- Start date

- #1

- 1,707

- 5

- #2

- 586

- 1

- #3

- 1,250

- 2

Collect[Series[Exp[x y], {x, 0, 8}, {y, 0, 8}] , {x, y}]

If that's not what you want, then I fail to understand. I'm sure there must be a way to do what you are asking, however.

- #4

- 1,250

- 2

Code:

```
multiVarSeries[f_, x_List, a_List, k_Integer] := Block[{n, F},
Evaluate[Fold[Sum,
Product[(1/n[i]!) (x[[i]] - a[[i]])^(n[i]), {i, 1, Length[x]}]
((Fold[D, [email protected]@x, Table[{x[[i]], n[i]}, {i, 1, Length[x]}]]) /.
Table[x[[i]] -> a[[i]], {i, 1, Length[x]}]),
Table[{n[i], 1, k}, {i, 1, Length[x]}]]] /. F -> Function[x, f]]
```

multiVarSeries[Exp[x y], {x, y}, {0,0}, 2]

This says to expand the function Exp[x y] with respect to the variables x and y around the point {0,0} up to order 2 (in both variables, I don't let you specify the order separately for each individual variable). The output is of course:

[tex]\frac{x^3 y^3}{6}+\frac{x^2 y^2}{2}+x y[/tex]

- #5

- 1,707

- 5

ps

how can i learn to program mathematica

- #6

- 1,250

- 2

Yes, I understand your complaint with the function. One thing you can do is make n larger than you need and then use a filter to get only the terms you want. It is more work than it is worth for me to change the function to match that behavior.i don't know much about mathematica programming so can you adjust your function so that it computes to a total order of n? e.g. for order 2 xy terms are written out and x^2 and y^2 terms but not x*y^2. and you example seems to show terms up to order

There is no good way. If you are really wealthy, you can do workshops online with Wolfram Inc that will teach you how to program Mathematica. Otherwise you have to do what I did, which is to read the built-in help and practice for months.how can i learn to program mathematica

- #7

- 1,707

- 5

- #8

- 1,250

- 2

What doesn't work and what function are you trying to do this with?

- #9

- 1,707

- 5

so here i am again with the same problem. how in the heck do i get mathematica to give me this representation:

of a function expanded to second order in both of its arguments

of a function expanded to second order in both of its arguments

Last edited by a moderator:

- Last Post

- Replies
- 2

- Views
- 2K

- Last Post

- Replies
- 7

- Views
- 3K

- Last Post

- Replies
- 8

- Views
- 5K

- Last Post

- Replies
- 6

- Views
- 6K

- Last Post

- Replies
- 4

- Views
- 2K

- Last Post

- Replies
- 2

- Views
- 3K

- Last Post

- Replies
- 2

- Views
- 4K

- Last Post

- Replies
- 2

- Views
- 2K

- Last Post

- Replies
- 3

- Views
- 2K

- Last Post

- Replies
- 0

- Views
- 2K