drlippman/IMathAS

problem about answer with factorial operation

cchuang2009 opened this issue · 2 comments

The input is always treated as right one if any factorial operation is included in answer ( in numfunc format).
How to solve this problem?
Thanks,

Can you give an example of a specific answer and student answer that are scoring incorrectly?

Here the examples

$anstypes=array("numfunc","calcinterval","numfunc","calcinterval","numfunc","calcinterval","calcinterval","numfunc","numfunc","calcinterval")

$variables="x,n"

$a=rand(2,4)
$b=rand(1,4)
$c=rand(1,5)
$d=rand(1,4)
$e=rand(2,9)

#$n=rand(5,8)

$question1=" Consider $a/($b+x), expandeded at x=0, is \sum_{n=0}^oo a_n x^n."

$answer[0]="$a*(-1)^n/$b^(n+1)"
$answer[1]="(-$b,$b)"

$question2=" Consider 1/x, expandeded at x=$c, is \sum_{n=0}^oo a_n (x-$c)^n."

$answer[2]="(-1)^n/$c^(n+1)"
$answer[3]="(0,2*$c)"

$question3=" Consider 1/($d+x)^2, expandeded at x=0, is \sum_{n=0}^oo a_n x^n."

$answer[4]="(-1)^n*(n+1)/$d^(n+2)"
$answer[5]="(-$d,$d)"

$question4=" Infinite series, (1+x)^p where p\lt0, is called binary series,"

$answer[6]="(-1,1)"
$answer[7]="n(2*n-2)!"

$answer[8]="(2 n)!"
$answer[9]="(-$e,$e)"

As well known result:

1/(1-x)=\sum_{n=0}^oo x^n for |x|<1.


Consider the following questions:

  1. $question1
    • coefficient, `a_n`, is $answerbox[0];
    • the series is convergent if `x` in interval, `I`, and `I=` $answerbox[1].
  2. $question2
    • coefficient, `a_n`, is $answerbox[2];
    • the series is convergent if `x` in interval, `I`, and `I=` $answerbox[3].
  3. $question3
    • coefficient, `a_n`, is $answerbox[4];
    • the series is convergent if `x` in interval, `I`, and `I=` $answerbox[5].
  4. $question4
    • the binary series is convergent if `x` in interval, `I`, and `I=` $answerbox[6].
    • For `p=1/2`, and the series is expandand at `x=0` is
      `\sum_{n=0}^oo (-1)^n{a_n}/{2^(2n-1)(n!)^2} x^n` where
      `a_n` is $answerbox[7].
    • For `p=-1/2`, and the series is expandand at `x=0` is
      `\sum_{n=0}^oo (-1)^n{a_n}/{2^(2n)(n!)^2} x^n` where
      `a_n ` is $answerbox[8].
    • Consider the `f(x)=1/{($e+x)^(1/3)}`. Its binaray series is convergent for `x\in I`, i.e. `I` = $answerbox[9].

Note:

  1. Euler number,`e`, input by e, for example: e^2 = `e^2` = exp(2),
  2. Open interval, `\{x \in\mathbb{R} ∣ a \lt x \lt b\}`, input by (a,b),
  3. closed interval, `\{x \in\mathbb{R} ∣ a \le x \le b\}` , input by [a,b],
  4. `n!`, factorial of n, input by n!.
  5. `oo`, positive infinty, input by oo.

the system displays "correct" in answer[2] if input e.