Hello.

I am working with limits and undefined expressions, and I have a question which asks for an elementary function which is not defined at a point x0, but whose limit at x0 exists and is equal to some given number a0.

The student inputs his answer in "ans1", as an formula on the variable x. I can check for the limit easily, but I do not know how to check whether the formula given by the student has x=x0 as a point in its domain. Below is a simplified version of it:

**Question variables**:

x0=rand([-2,-1,0,1,2]); a0=rand([-2,-1,0,1,2]); possible_response(x):=a0*sin(x-x0)/(x-x0);

**Question**:

Write down a formula for \(f(x)\) which defines an elementary function which does not have {@x0@} in its domain, but for which \(\displaystyle{\lim_{x\to {@x0@}}f(x)={@a0@}}\). Answer: f(x)=ans1 validation:ans1

Checking for the limit works well with AlgEquiv and Maxima's limit function (even for in/undefined limits), but I do not know how to check if x=x0 is in the domain of ans1. Whenever I try to evaluate ans1 at x=x0 via subst([x=x0],ans1), if it is not in its domain (e.g. ans1=a0*sin(x-x0)/(x-x0)), I get a "division by zero" error and no points are given,

Thanks, Christopher Sangwin,Tim Hunt, for this amazing plugin.