Correctness checking the domain

I want students to restrict the domain of a function in a graph between -2 and 4. So the correct answer would be f(x)=2x+3 {-2 ≤ x ≤ 4}. Is there a way to check this and have it display a checkmark in the dashboard?

How will students be interacting with the screen?

They will just be entering it in a line of the graph. Here is the activity I am working on. They are asked to restrict the function on slide 3.

I experimented on this activity but didn’t have any luck:

If needed I could use an input box that is pre-populated with the equation of the line and just have the students add the restriction. However, I do want the graph to display the restriction if I go that route.

Cool Ideas. I’m playing with creating a similar activity. Wondering if you ever figured it out?

Unfortunately no. I just checked each student’s slide to make sure it was correct.

I think Webinar 5 video will help with correctness. I’m watching it now. Introduction to the Computation Layer #5
I also just got info about an example for inputting any equation into graph.
Table items to Graphing Horiz/Vert Lines via CL - #4 by Jay

I am sure there are various ways to check the correctness of a restricted domain. It is not something I have built myself, but depending on what exactly the purpose is but I would think you would…

  1. Let f be the student function and g be the desired function.
  2. Set your desired function with parameters (maybe a,b?) for the restricted domain.
  3. Create a list of inputs along the restricted domain. Something like X=[a,a+.1,…b].
  4. Check to see the restricted portion of the domain is the same function. (i.e. f(X)-g(X)=0; or some other tolerance level)
  5. Check to see that the function is undefined where it should be… For example f(a-.1) and f(b+.1) should be undefined, you might even make lists A=[a-.1,…-10] and B=[b+.1,…10]?

I know those are not the most concrete set of directions…I will try to build an example if I find the time.

That wasn’t too bad…

It worked for the one function I checked… feel free to look for bugs!

I think testing a single point to the left and right of the restriction (with a small epsilon) would suffice, but I built the example using a list of points. When I first built it with lists, I tried to use total(f(A)), but that would make a wide array of answers correct so I switched over to quantile(f(A),0). The tolerance is set to .1

Just be careful because I believe the above example only works with ≤ ≥ and not with < >, though it could be easily tweaked to do so instead.

In looking for a simpler solution I was surprised to discover that CL cannot check for equality between two lists (see attached). Though I supose CL support for numberLists is limited in general.

Yes, that’s the type of thing that Jay’s Webinar 5 guides us through. I’m currently looking at 19 minutes. so slightly before that is were it starts.