Syntax to calculate sum with maxima or wxmaxima using different variables

So I'm not sure if I'm right here but I can try:

So we are having a statistics class at uni. The question is:

$x_{1}= 5$, $x_{2}= 3$, $x_{3}= 7$

$y_{1}= 6$, $y_{2}= 4$, $y_{3}= 12$

Calculate following:

$\sum_{i=2}^{3}(x_{i}+y_{i}) =$

I know it's actually quit trivial to calculate this by hand but I would really like to know how I can calculate such stuff using wxmaxima.

Can anybody help me?

-

(Give a man a fish)

x:[5,3,7];
y:[6,4,12];
sum(x[i]+y[i], i, 2, 3);


(Teach a man to fish ;)

At the wxmaxima command line, type describe(sum) or example(sum)

(The parenthetical remarks refer to an old saying, my favorite version of which is, "Build a man a fire and he'll be warm for a night. Set a man on fire and he'll be warm for the rest of his life.")

-
Cool, thanks alot! I just couldn't figure out how to save the values. (x:[5,3,7];) Did figure out this part though: sum(x[i]+y[i], i, 2, 3); but wasn't sure it was right. Trust me,I was fishing for 3h but didn't catch anything! ;) – k3njiy Feb 16 '12 at 12:12
Glad I could help. Yeah, some things in maxima are a little weird. It's the only language I've used that defines variables using colons, like x:1. – William DeMeo Feb 16 '12 at 12:54