## PREP 2014 Question Authoring - Archived

### Re: setting test points

by Davide Cervone -
Number of replies: 0
It is also possible to use two separate contexts (one for each formula) with their limits set differently. For example:
Context("Numeric");
$ans_causal = Formula("$A*($p1)**n +$B*($p3)**n ")->reduce; Context("Numeric"); Context()->variables->add(n => ['Real', limits=>[-10,0], resolution=>1]);$ans_noncausal = Formula("-$C*($p2)**(-n) ")->reduce;

Here, the second Context("Numeric") gets you a fresh copy of the Numeric context, without the previous changes. Since MathObjects retain the context in which they were created, both have the proper limits.
$f = Compute("x+1")->with(limits => [0,10], resolution => 1);$g = Compute("x-1")->with(limits => [-10,0], resolution => 1);