# What is the right answer to a Mathematica quiz question

I would really appreciate it if someone could help me with this multiple choice question, I don't have any more attempts and I already got wrong what I thought the answer was ({x0, x0, .., xn} is not right!).

Im new to Mathematica, but I figure this should be a relatively easy question to answer for someone who knows what you're doing.

Extract from the Mathematica notebook referred to above added.

• Perhaps you could look at the documentation for Table and tell us if anything is unclear to you. See in particular the first few examples. Jul 5, 2017 at 23:42
• Or perhaps try running the code and looking at the variable fvalues. Jul 5, 2017 at 23:48
• 'Image' I can't comment on your post because I don't have enough reputation, but I hope this is what you were asking for.
– Mike
Jul 5, 2017 at 23:48

I conjecture that the 3rd choice in the list of answers you give is the correct one and use Mathematica to verify the conjecture.

a = 1;
b = 2;
n = 10;
Δx = (b - a)/n;
f[x_] = 1/x;


First let us note that

a + 10 Δx == b


True

Now let's look at

Block[{a, b, Δx, f}, Print[Table[f[a + i Δx], {i, 0, n}]]] I use Block to get a symbolic result. Remembering that a + 10 Δx == b, this is the same as the 3rd choice in the list of answers.

Let's test it against fvalues

fvalues = Table[f[i], {i, a, b, Δx}];
fvalues == Table[f[a + i Δx], {i, 0, n}]


True

Q.E.D.