# Evaluating a List of Functions

I have a list of scalar functions of two variables. Say, it is:

list1 = {Sin[x]*Cos[y], Exp[x] - Log[y] + x^2, sin[x], Sin[x]/Sec[y]}


I have another list containing the inputs to each scalar function in the list:

list2 = {{0.5,0.6},{0.6,0.7},{0.7,0.8},{0.8,0.9}}


How do I evaluate each function in list1 at the values x and y corresponding to the relevant position in list2

MapThread[Function[{x, y}, #] @@ #2 &, {list1, list2}]

{0.395687, 2.53879, sin[0.7], 0.445916}


Old misunderstood:

list1 /. Thread[{x, y} -> #] & /@ list2

{
{0.395687, 2.40955, sin[0.5], 0.395687},
{0.431862, 2.53879, sin[0.6], 0.431862},
{0.448831, 2.7269, sin[0.7], 0.448831},
{0.445916, 2.9709, sin[0.8], 0.445916}
}

• Shouldn't I be getting a list where each entry is a single real number? Implicitly, I have assumed that the first entry in list2 corresponds to x and the second entry in list2 corresponds to y. Sep 8, 2016 at 8:24
• As I understand it the OP only wants the diagonal of your result... Sep 8, 2016 at 8:28
• What I want is that the first "function" in list 1 is evaluate at the first entry in list 2, the second "function" in list 1 is evaluate at the second entry in list 2 and so on. Sep 8, 2016 at 8:28
• @sebhofer thanks, fixed.
– Kuba
Sep 8, 2016 at 8:30

another version

list1 /. {x -> #1, y -> #2} & @@@ list2

{{0.395687, 2.40955, sin[0.5], 0.395687},
{0.431862, 2.53879, sin[0.6], 0.431862},
{0.448831, 2.7269, sin[0.7],  0.448831},
{0.445916, 2.9709, sin[0.8], 0.445916}}